Skip to content

Exception: API.bootstrap() already called using redhat.rhel_idm.ipaclient_setup_nss with strategy mitogen_linear #1327

@aarora2022

Description

@aarora2022

I am using Mitogen 0.3.26 along with Anisble core 2.16.14 and python 3.11. While calling the Redhat IDM collection via playbook with mitogen installed in execution environment , its giving API already bootstrap error

My Execution enviroment ansible.cfg looks like below

[defaults]
interpreter_python = auto
strategy_plugins = /usr/local/lib/python3.11/site-packages/ansible_mitogen/plugins/strategy
callbacks_enabled = timer,profile_tasks
host_key_checking = False
 
[mitogen]
mitogen_via_localhost = false
 
[ssh_connection]
pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=2m -o ControlPath=/tmp/ansible-ssh-%h-%p-%r -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null

I have mentioned strategy=mitogen_linear in my playbook .

Ansible job error details are as below

module_stdout: ''
module_stderr: |
  Traceback (most recent call last):
    File "master:/usr/local/lib/python3.11/site-packages/ansible_mitogen/runner.py", line 1043, in _run
      self._run_code(code, mod)
    File "master:/usr/local/lib/python3.11/site-packages/ansible_mitogen/runner.py", line 1007, in _run_code
      exec(code, vars(mod))
    File "master:/runner/requirements_collections/ansible_collections/redhat/rhel_idm/plugins/modules/ipaclient_setup_nss.py", line 602, in <module>
    File "master:/runner/requirements_collections/ansible_collections/redhat/rhel_idm/plugins/modules/ipaclient_setup_nss.py", line 306, in main
    File "/usr/lib/python3.9/site-packages/ipalib/plugable.py", line 441, in bootstrap
      self.__doing('bootstrap')
    File "/usr/lib/python3.9/site-packages/ipalib/plugable.py", line 425, in __doing
      raise Exception(
  Exception: API.bootstrap() already called
exception: |
  Traceback (most recent call last):
    File "master:/usr/local/lib/python3.11/site-packages/ansible_mitogen/runner.py", line 1043, in _run
      self._run_code(code, mod)
    File "master:/usr/local/lib/python3.11/site-packages/ansible_mitogen/runner.py", line 1007, in _run_code
      exec(code, vars(mod))
    File "master:/runner/requirements_collections/ansible_collections/redhat/rhel_idm/plugins/modules/ipaclient_setup_nss.py", line 602, in <module>
    File "master:/runner/requirements_collections/ansible_collections/redhat/rhel_idm/plugins/modules/ipaclient_setup_nss.py", line 306, in main
    File "/usr/lib/python3.9/site-packages/ipalib/plugable.py", line 441, in bootstrap
      self.__doing('bootstrap')
    File "/usr/lib/python3.9/site-packages/ipalib/plugable.py", line 425, in __doing
      raise Exception(
  Exception: API.bootstrap() already called
msg: |-
  MODULE FAILURE
  See stdout/stderr for the exact error
rc: 1
ansible_facts:
  discovered_interpreter_python: /usr/bin/python3
_ansible_no_log: false
changed: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions