Skip to content
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

Shell module within become_method sudo and become_flags error #343

Closed
luca0x333 opened this issue Aug 13, 2018 · 2 comments
Closed

Shell module within become_method sudo and become_flags error #343

luca0x333 opened this issue Aug 13, 2018 · 2 comments
Labels
ansible Issues relating to Mitogen for Ansible bug Code feature that hinders desired execution outcome sudo Issues impacting mostly sudo.py target:v0.2 Bugs to be fixed in 0.2 stable series user-reported

Comments

@luca0x333
Copy link

Hi there,

I am using Ansible 2.6 and mitogen-0.2-2, i got an issue when running the shell module within become_method and become_flags:

- name: example
  become: yes
  become_method: sudo
  become_flags: '-iS'
  become_user: user
  shell: |
    bundle exec rails runner...
  args:
    chdir: ~/current
  delegate_to: example.local

basically i use '-i' to get a login shell when i run bundle, without mitogen works fine.

Error message:

error occurred on host server.example.local: sudo: no such option: -i
[pid 13375] 11:07:15.682284 D mitogen: Context(2, u'ssh.server.example.com').call_async(): mitogen.parent._proxy_connect(method_name=u'sudo', name=None, kwargs=Kwargs({u'username': u'api', u'profiling': False, u'sudo_path': None, u'python_path': u'/usr/bin/python', 'unidirectional': True, u'debug': False, u'password': [secret], u'sudo_args': [u'-H', u'-S', u'-n', u'-i'], u'connect_timeout': 150}))
ERROR! [pid 13375] 11:07:15.683348 E mitogen.ctx.fork.25691: mitogen: Router(Broker(0x7f338a461690)): no route for Message(0, 3, 3, 102, None, "mitogen\x0010\x00register(Context(2, 'parent'), mitogen."..72), my ID is 3
[pid 13375] 11:07:15.695036 D mitogen.ctx.fork.25691: mitogen: Connected to Context(2, 'parent'); my ID is 3, PID is 25691
[pid 13375] 11:07:15.695646 D mitogen.ctx.fork.25691: mitogen: Recovered sys.executable: '/usr/bin/python'
[pid 13375] 11:07:15.702568 D mitogen: ModuleResponder(Router(Broker(0x7f602c50f4d0)))._on_get_module('mitogen.sudo')
[pid 13375] 11:07:15.707397 D mitogen: _send_load_module(mitogen.ssh.Stream(u'ssh.server.example.com'), u'mitogen.sudo')
[pid 13375] 11:07:15.729510 D mitogen.ctx.ssh.server.example.com: mitogen: Importer(): master doesn't know 'mitogen.optparse'
[pid 13394] 11:07:15.735877 D mitogen: mitogen.core.Stream(u'unix_listener.13375').on_disconnect()
[pid 13394] 11:07:15.737226 D mitogen: Waker(Broker(0x7f602bc73290) rfd=15, wfd=16).on_disconnect()
[pid 13375] 11:07:15.737274 D mitogen: mitogen.core.Stream(u'unix_client.13394').on_disconnect()

Thanks

@dw
Copy link
Member

dw commented Aug 13, 2018

Hi there,

This is now on dmw branch, and should be on master in the coming days. Note that per the docs 2.6 is not yet supported, there is still breakage I'm working through -- temp file handling has changed, and a new module exit method was introduced that broke the file module.

To be updated when a new release is made, subscribe to https://networkgenomics.com/mail/mitogen-announce/

Thanks for reporting this!

@luca0x333
Copy link
Author

Ok great thanks a lot.

So far except this error no issues with 2.6

@dw dw added bug Code feature that hinders desired execution outcome ansible Issues relating to Mitogen for Ansible sudo Issues impacting mostly sudo.py user-reported target:v0.2 Bugs to be fixed in 0.2 stable series labels Aug 17, 2018
@dw dw closed this as completed in 2d50270 Aug 19, 2018
PatrickCoakley23 pushed a commit to cyara/mitogen that referenced this issue Nov 10, 2023
…_number_addition_fix

fixes as per feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Issues relating to Mitogen for Ansible bug Code feature that hinders desired execution outcome sudo Issues impacting mostly sudo.py target:v0.2 Bugs to be fixed in 0.2 stable series user-reported
Projects
None yet
Development

No branches or pull requests

2 participants