mitogen
mitogen copied to clipboard
Playbook using kubernetes.core fails when using mitogen_linear strategy
When running a simple playbook to create a namespace using kuberenetes.core.k8s
module fails with the following error when mitogen is enabled.
PLAY [Create a namespace] *********************************************************************************************************************************************************************************************
TASK [Creating namespace] *********************************************************************************************************************************************************************************************
fatal: [172.24.0.2]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "Failed to import the required Python library (kubernetes) on 3c295df4a8a8's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
PLAY RECAP ************************************************************************************************************************************************************************************************************
172.24.0.2 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
See https://github.com/markafarrell/mitogen-k8s-google-auth-repro for reproduction instructions.
It appears to be related to the version of google-auth
python module that is installed.
Using version 2.21.0
the playbook can be successfully run with mitogen but using version 2.22.0
causes the above failure.
https://github.com/googleapis/google-auth-library-python/compare/v2.21.0...v2.22.0#diff-f7c93c24116089dc7e88f361b4c769fd33bbf2b7b38d902945d8b226dc4b5c9b
This issue is not encountered when using the normal linear strategy (i.e with mitogen disabled)
Hi, problem comes from this PR - https://github.com/googleapis/google-auth-library-python/pull/1205
If I create empty file touch /usr/lib/python3.9/site-packages/google/__init__.py
everything start working with mitogen without errors on import google
module.