Exeception with setns connection method - kubectl_path #409
Comments
Thanks a ton for reporting this. It is poor PR review on my part :( The fix is simple enough -- remove that line. But I'm keeping this open until I've fleshed out some stub tests covering connection.py<->Mitogen integration, to match the stub Mitogen<->third party tool integration I've started doing for the core library (tests/data/stubs/). Might not be practical to setup tests for kubectl/lxc-info, but it sure is possible to ensure the code is at least trying to run the corresponding tools |
The trouble with setns in particuar is that it needs to be root to execute the relevant syscalls. It is actually the only method with that problem |
Allows us to reference them from playbooks easily.
So every method can be redirected to a stub implementation.
Cheers Jonathan! Shouldn't happen again :) 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! |
No worries! I'll spin OSA again and see what pops up :) |
I've opened #403 for your OpenStack patches. Probably a tiny amount of work to merge it up, just haven't had a chance to look yet |
I gave openstack-ansible a spin again with mitogen.
Current master of OSA + this patch on top https://review.openstack.org/#/c/591236/, adjusted to pick up current Mitogen master.
This patch applied to mitogen to make setns connection work with OSA inventory jrosser@b1e9283
Result is an expection at the first point a connection is attempted to a container.
TASK [lxc_container_create : Gather container facts] ***************************
ERROR! [pid 22863] 17:58:55.598590 E mitogen: mitogen.service.Pool(0x7f96d1c05fd0, size=16, th='mitogen.service.Pool.7f96d1c05fd0.worker-10'): while invoking u'get' of u'ansible_mitogen.services.ContextService'
Traceback (most recent call last):
File "/etc/ansible/roles/mitogen/mitogen/service.py", line 519, in _on_service_call
return invoker.invoke(method_name, kwargs, msg)
File "/etc/ansible/roles/mitogen/mitogen/service.py", line 253, in invoke
response = self._invoke(method_name, kwargs, msg)
File "/etc/ansible/roles/mitogen/mitogen/service.py", line 239, in _invoke
ret = method(**kwargs)
File "/etc/ansible/roles/mitogen/ansible_mitogen/services.py", line 423, in get
reraise(*result)
File "/etc/ansible/roles/mitogen/ansible_mitogen/services.py", line 381, in _wait_or_start
response = self._connect(key, spec, via=via)
File "/etc/ansible/roles/mitogen/ansible_mitogen/services.py", line 330, in _connect
context = method(via=via, unidirectional=True, **spec['kwargs'])
File "/etc/ansible/roles/mitogen/mitogen/parent.py", line 1663, in setns
return self.connect(u'setns', **kwargs)
File "/etc/ansible/roles/mitogen/mitogen/parent.py", line 1621, in connect
return self._connect(klass, name=name, **kwargs)
File "/etc/ansible/roles/mitogen/mitogen/parent.py", line 1600, in _connect
stream = klass(self, context_id, **kwargs)
File "/etc/ansible/roles/mitogen/mitogen/parent.py", line 912, in init
super(Stream, self).init(*args, **kwargs)
File "/etc/ansible/roles/mitogen/mitogen/core.py", line 1083, in init
self.construct(**kwargs)
File "/etc/ansible/roles/mitogen/mitogen/setns.py", line 139, in construct
super(Stream, self).construct(**kwargs)
File "/etc/ansible/roles/mitogen/mitogen/parent.py", line 923, in construct
super(Stream, self).construct(**kwargs)
TypeError: construct() got an unexpected keyword argument 'kubectl_path'
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: super(Stream, self).construct(**kwargs)
fatal: [aio1_horizon_container-e7a20bec]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
The text was updated successfully, but these errors were encountered: