-
Notifications
You must be signed in to change notification settings - Fork 199
ec2_group
module doesn't work with Mitogen 0.2.4
#536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same as #511 |
Somehow explicit localhost's python_path has been broken. To confirm, do you have 'localhost' listed explicitly in your inventory? I see here by removing it (and receiving the default implicit localhost Ansible provides), the problem disappears. This is almost certainly due to the python_path changes done during the delegate_to fiasco. |
Since you asked on #511, I tried your suggestion there; neither of We do have localhost:
ansible_connection: local
readiness: ready
stack: prod Does the default localhost go via SSH rather than local? (The other two variables are things that normally get set via the ec2.py inventory plugin, but localhost doesn't come from EC2, of course.) |
The implicit localhost gets I've found the problem and it's the opposite to what was expected -- somehow it is using my virtualenv Python interpreter path over SSH, which is completely wrong |
Kicking myself. I filed a bug to verify this stuff before cutting release, and didn't even make it through all the tickets. Fatigue :/ https://github.com/dw/mitogen/issues/476 |
This was needed at some point in the past, but the tests don't seem to care about it any more. We'll fix any CI breakage by changing the tests, since verifying implicit localhost behaviour is important.
While fixing delegate_to, this un-hardwiring of /usr/bin/python happened. It was always incorrect.
* origin/dmw: docs: update Changelog; closes #511, closes #536. docs: update Changelog release date. issue #536: disable transport_config tests on vanilla issue #536: restore correct Python interpreter selection behaviour. issue #536: connection_delegation/ tests were erroneously broken tests: define MITOGEN_INVENTORY_FILE even if -i unspecified. issue #536: add tests for each ansible_python_interpreter case. issue #536: stop defining explicit localhost in inventory. tests: allow running Ansible tests locally without -udmw again. stable: fix preamble_size on stable docs. issue #481: add test.
0.2.5 will be out before end of the week, sorry for the trouble This is now on the master branch and will make it into the next release. To be updated when a new release is made, subscribe to https://networkgenomics.com/mail/mitogen-announce/ Thanks for reporting this! |
Hm, I tried this with master just now (5c5e9fb), and my playbook above still fails, same error. |
Can you please check/paste output of:
This diagnosis method is new in 0.2.4, so it won't work with 0.2.2 or 0.2.3. It will list a "method" and "python_path". For implicit localhost, it will be method "local" and the same Python interpreter as was used to run Ansible -- maybe from a virtualenv. For explicit localhost, it would have "python_path" == "/usr/bin/python" by default, and "method" "ssh" by default. I have reproduced your config locally and confirmed "a" fix for 0.2.3, but apparently your case still differs somehow |
I think the
|
Putting instructions here as they're lengthy and reusable :) Per IRC,
The output of this module will contain a You can compare the output of those keys with the same module run under vanilla -- just drop the ANSIBLE_STRATEGY from the command line. Any difference in the run impacting import will be visible from these two variables |
With
With
|
With Mitogen 0.2.2, for comparison:
|
As discussed on IRC, I made this change:
Here's the log from running my playbook above: ansible.log |
Regardless of the version of simplejson loaded in the master, load up the ModuleResponder cache with our 2.4-compatible version. To cope with simplejson being loaded due to modules like ec2_group that try to import it before importing 'json', also update target.py to remove it from the whitelist if a local 'json' module import succeeds.
* origin/dmw: docs: update Changelog. issue #536: rework how 2.3-compatible simplejson is served .github: add some more questions to issue template docs: duplicate word docs: update Changelog. tests/ansible: Spec.become_method() test & mitogen_via= fix. setup.py: include LICENSE; closes #538. tests/ansible: Spec.become() test tests/ansible: Spec.password() test, document interactive pw limitation. tests/ansible: Spec.remote_user() test & mitogen_via= fix. tests/ansible: Spec.remote_addr() test & mitogen_via= fix. tests/ansible: Spec.transport() test. docs: lighter pink docs: add 'Fixes' heading docs: more margin tweaks for changelog docs: tighter <p> margins, even less shouting, red headings docs: tidy up footer and GitHub link docs: enable fixed_sidebar docs: sans-serif fonts, reduce shouty headings issue #536: add mitogen_via= tests too. ansible: fix a crash on 2.3 when mitogen_via= host is missing. tests: for 2.3 compatibility, disable gcloud.py for now
My reproducer now works fine with |
* origin/dmw: issue #537: disable just the trivial LinuxPolicyTest on Travis. docs: update Changelog; closes #537. ansible: refactor affinity class and add abstract tests. Bump version for release. docs: update Changelog. core: serialize calls to _service_stub_main(). docs: update Changelog; closes #532. issue #532: PushFileService race. docs: more concise Changelog. issue #541: changelog typos. ansible: quiesce boto logger; closes #541. docs: update Changelog. tests/ansible: Spec.port() test & mitogen_via= fix. Update copyright year everywhere. tests/ansible: Spec.become_pass() test. docs: remove top "Table of Contents" link docs: remove a little more top margin wastage tests/ansible: Spec.become_user() test. docs: update Changelog; closes #539. issue #539: disable logger propagation. ansible: capture stderr stream of async tasks. Closes #540. docs: update Changelog. issue #536: rework how 2.3-compatible simplejson is served .github: add some more questions to issue template docs: duplicate word docs: update Changelog. tests/ansible: Spec.become_method() test & mitogen_via= fix. setup.py: include LICENSE; closes #538. tests/ansible: Spec.become() test tests/ansible: Spec.password() test, document interactive pw limitation. tests/ansible: Spec.remote_user() test & mitogen_via= fix. tests/ansible: Spec.remote_addr() test & mitogen_via= fix. tests/ansible: Spec.transport() test. docs: lighter pink docs: add 'Fixes' heading docs: more margin tweaks for changelog docs: tighter <p> margins, even less shouting, red headings docs: tidy up footer and GitHub link docs: enable fixed_sidebar docs: sans-serif fonts, reduce shouty headings issue #536: add mitogen_via= tests too. ansible: fix a crash on 2.3 when mitogen_via= host is missing. tests: for 2.3 compatibility, disable gcloud.py for now docs: update Changelog; closes #511, closes #536. docs: update Changelog release date. issue #536: disable transport_config tests on vanilla issue #536: restore correct Python interpreter selection behaviour. issue #536: connection_delegation/ tests were erroneously broken tests: define MITOGEN_INVENTORY_FILE even if -i unspecified. issue #536: add tests for each ansible_python_interpreter case. issue #536: stop defining explicit localhost in inventory. tests: allow running Ansible tests locally without -udmw again. stable: fix preamble_size on stable docs. issue #481: add test.
With Mitogen 0.2.4, this playbook:
Produces this output:
It works fine with Mitogen 0.2.2; it fails with 0.2.4, whether the security group already exists or not.
Here's a log with
-vvv
: ansible.logThe text was updated successfully, but these errors were encountered: