Commit Graph

25 Commits (3944083effe6ed3bb7593d8530bdbdb79fa5b821)

Author SHA1 Message Date
David Wilson f304bf7cb4 ansible: repro for issue #118. 8 years ago
David Wilson 8ac3f3134c Minor cleanup. 8 years ago
David Wilson 6931cc10c4 importer: avoid duplicate module load(!); closes #113.
Amazed this one managed to scrape through for so long. Calling
__import__ from within find_module() was causing the target module, in
this case cookielib, to be loaded *then overwritten* by a subsequent
duplicate load higher in the stack.

The result is that cookielib was loaded twice, and, per usual Python
import semantics, a reference to the partially initialized first
cookielib was installed in sys.modules while its code executed.

At the end of cookielib on 2.x, it imports _LWPCookieJar, which in turn
imports the partially built cookielib from sys.modules, then subclasses
the CookieJar from /that/ module.

Everything is wonderful. Then the call returns back up into the import
mechanism which restarts the entire process -- only this time,
_LWPCookieJar is /not/ reinitialized, so the copy in sys.modules is
still left with types pointing at the old module!

So the duplicate import creates a new CookieJar which is not the base
class of LWPCookieJar. Tada! 3 hours debugging.

This is probably a performance fix in disguise, didn't realize things
were so broken. It may also be a regression elsewhere. Urgently need to
finish the tests.
8 years ago
David Wilson dc0b28491a examples: enable the strategy by default 8 years ago
David Wilson 1a2a5b052f issue #113: import crash reproduction 8 years ago
David Wilson ff151e5145 examples: beginnings of repro for issue #109 8 years ago
David Wilson ab4439e64f sudo: accept -n too (issue #108) 8 years ago
David Wilson a39ab8fa54 ansible: basic support for ssh_args 8 years ago
David Wilson 2a88b6264f examples: longer (but still crap) async_polling.yml 8 years ago
David Wilson a26e1589e2 examples: import broken non_python_modules.yml. 8 years ago
David Wilson 950e9f3364 ansible: support environment: too. 8 years ago
David Wilson 80b56e61f5 examples: simplistic async_polling.yml 8 years ago
David Wilson a0756755bc Remove whoami.yml, it's now done by delegate_to.yml. 8 years ago
David Wilson 365c4382dd ansible: basic regression test for delegation/sudo 8 years ago
David Wilson 6442aa47d1 ansible: fix become:true with sudo:true 8 years ago
David Wilson 97ff132efd ansible: better emulate _low_level_execute_command()
Still needs a ton of work to emulate argument handling, shell selection,
and output emulation in every case. Unsurprisingly, Ansible documents
none of this.
8 years ago
David Wilson 49d944340d examples: simplify example playbooks. 8 years ago
David Wilson 7fb0fa3872 examples: rename playbooks for clarity. 8 years ago
David Wilson 6658596c38 docs: initial Ansible extension docs. 8 years ago
David Wilson 81580c1b3f examples: add test case for local Ansible connections 8 years ago
David Wilson 28d5de77a3 ansible: we're gonna need more playbook steps 8 years ago
David Wilson 1c6e529458 ansible: delete old needless host_vars directory 8 years ago
David Wilson 2efb790a2f ansible: add become test case 8 years ago
David Wilson 3a96389d08 ansible: automatically configure connection plug-in. 8 years ago
David Wilson 1a119cb08b ansible: import example playbook 8 years ago