Open varac opened 5 years ago
Oh, maybe it's worth mentioning that we use ansible_python_interpreter: "/usr/bin/env python3"
as group var.
Also, all other playbook resources work fine, k8s
is the only one that fails with mitogen.
so, does it work when you patch it to install openshift with the pip module prior to the call to the k8s module that requires the openshift python client?
Le mar. 19 mars 2019 à 23:26, Varac notifications@github.com a écrit :
Also, all other playbook resources work fine, k8s is the only one that fails with mitogen.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dw/mitogen/issues/569#issuecomment-474608871, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFxrNpFUYGcJKZtW5XL4DS44nYOxEHKks5vYWQfgaJpZM4b9O-V .
I forgot to mention that openshift
is already installed in the docker image as pip3 module.
This was neccessary to make it work before, without mitogen. With mitogen it fails.
I'm still hit by this, here's the task output from ansible-playbook run with -vvv
:
k8s-mitogen-py3.log
I could reproduce the same behaviuour with a debian stable host instead of ubuntu 18.04.
@jpic Could it be that mitogen can't deal with the situation that openshift got installed in the same playbook run ? Cause when I re-run the playbook everything is fine. Can I use a different strategy for this particular task so it creates a new connection i.e. ?
For now I'm using this workaround:
I install the openshift
pip3 package in a dedicated role in the very first beginning, with the standard ansible linear
strategy. After this, all subsequent roles are using mitogen_linear
strategy, which works fine this way.
When I use mitogen_linear
in this setup also for the first role, it breaks.
@varac sorry for the huge delay. It possibly looks like a different import error is being masked.
Unfortunately Ansible has this horrible idiom of turning any error into a simple 'not installed' boolean, so this has happened a few times.
Can you try editing module_utils/k8s/common.py
of your Ansible install, and inserting the word raise
on a new line immediately above HAS_K8S_MODULE_HELPER = False
, with indentation matching the line below, and rerun.
You should get a huge stack trace because now it is crashing, and the stack trace should report the true import error
same for me
I'm using this ansible k8s ansible resource:
It works fine without mitogen, but fails once I use mitogen:
See attached verbose log for more details.
2.7.9
No
module_utils
loaded?No
Do you mean ansible master or mitogen master ? I didn't try any.
No
Host: Docker image based on alpine:3.9 Target: Ubuntu 18.04
Host: 3.6.8 Target: 3.6.7
mitogen-k8s.log