Skip to content

Test fail with become_user in make_tmp_path.yml but works locally #692

@s1113950

Description

@s1113950

When running this PR: #658

From here, copied in case the link expires: https://dev.azure.com/dw-mitogen/Mitogen/_build/results?buildId=790&view=logs&j=fa8bcf4d-d390-5291-b04f-0e6afdb08a32&t=3ae5371e-f71d-5b96-255d-41f780f14324

TASK [Try writing to temp directory for the readonly_homedir user script=from ansible.module_utils.basic import get_module_path
path = get_module_path() + '/foo.txt'
result['path'] = path
open(path, 'w').write("bar")
] ***
task path: /Users/runner/runners/2.164.8/work/1/s/tests/ansible/integration/action/make_tmp_path.yml:131
[task 4254] 01:48:46.938134 D ansible_mitogen.process: will use multiplexer 0 (/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/mitogen_unix_cnuAuJ.sock) to connect to "target"
[task 4254] 01:48:46.939074 D mitogen.unix: client: connecting to /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/mitogen_unix_cnuAuJ.sock
[task 4254] 01:48:46.939765 D mitogen.unix: client: local ID is 10073, remote is 0
[mux  3582] 01:48:46.939811 D mitogen.unix: listener: accepted connection from PID 4254: unix_client.4254
[mux  3582] 01:48:46.941767 D mitogen.parent: starting function call to ssh.localhost: mitogen.parent._proxy_connect(method_name=u'sudo', name=None, kwargs=Kwargs({u'username': u'mitogen__readonly_homedir', u'remote_name': None, u'profiling': False, u'sudo_path': u'sudo', u'python_path': [u'/usr/bin/python'], 'unidirectional': True, u'debug': False, u'password': None, u'sudo_args': [u'-H', u'-S', u'-n'], u'connect_timeout': 10}))
[mux  3582] 01:48:46.943608 D mitogen.[ssh.localhost]: Dispatcher: dispatching (None, u'mitogen.parent', None, u'_proxy_connect', (), Kwargs({'method_name': u'sudo', 'name': None, 'kwargs': Kwargs({u'username': u'mitogen__readonly_homedir', u'password': None, u'profiling': False, u'sudo_path': u'sudo', u'python_path': [u'/usr/bin/python'], 'unidirectional': True, u'debug': False, u'remote_name': None, u'sudo_args': [u'-H', u'-S', u'-n'], u'connect_timeout': 10})}))
[mux  3582] 01:48:46.944395 D mitogen.parent.[ssh.localhost]: creating connection to context 1009 using mitogen.sudo
[mux  3582] 01:48:46.946509 D mitogen.parent.[ssh.localhost]: command line for Connection(None): sudo -u mitogen__readonly_homedir -H -- /usr/bin/python -c "import codecs,os,sys;_=codecs.decode;exec(_(_(\"eNqFkcFLwzAUxu/9K3p7CYtbusEqhYCyg3gYQhF30CFpm2qwS0Lars6/3rdOXDsP3t4v35f3Pd5L2UbYeuq0U4QGnnUD0mWIUFr/QWgSHOuidXPCWcQ5PXPKhuRRjU6cV7ZWJB2CH8JmCB0CBtYHjK9kg6m7UIgQCuk7bSCUpuhF9anytpFZpXp51tZ+lmkzc4fm3RrAOS9tE9G/7JWvtTXPyWLbxyqz1x4ZbtO7Jw5bMf528iBWZCywMU6A7HRj35RJfGuM8jdrmV9FS349rWwuq2QRz2MKNMB2ndeNIhGD9f3jA+f8xQCOkdsCt02DlXglx30X1imDWwafAZ16JQsSxXzJKYMv7bBT6cTZt2HQZXA8Qel+AlZ9fVrrhbv7z/13ymg85e/B5vQb3H+0CQ==\".encode(),\"base64\"),\"zip\"))"
[mux  3582] 01:48:46.966627 D mitogen.parent.[ssh.localhost]: child for Connection(None) started: pid:4255 stdin:30 stdout:30 stderr:28
[mux  3582] 01:48:46.987828 D mitogen.parent.[ssh.localhost]: sudo.mitogen__readonly_homedir: (unrecognized): sudo: runas gid 4294967295: invalid value
[mux  3582] 01:48:46.988303 D mitogen.parent.[ssh.localhost]: sudo.mitogen__readonly_homedir: (unrecognized): sudo: runas_gid=4294967295: invalid value
[mux  3582] 01:48:46.988794 D mitogen.[ssh.localhost]: <Side of sudo.mitogen__readonly_homedir fd 30>: empty read, disconnecting
[mux  3582] 01:48:46.989234 D mitogen.[ssh.localhost]: BootstrapProtocol(sudo.mitogen__readonly_homedir): disconnecting
[mux  3582] 01:48:46.989614 D mitogen.[ssh.localhost]: <Side of sudo.mitogen__readonly_homedir fd 28>: empty read, disconnecting
[mux  3582] 01:48:46.989998 D mitogen.parent.[ssh.localhost]: failing connection sudo.mitogen__readonly_homedir due to EofError(u'EOF on stream; last 100 lines received:\nsudo: runas gid 4294967295: invalid value\nsudo: runas_gid=4294967295: invalid value',)
[mux  3582] 01:48:46.990407 D mitogen.parent.[ssh.localhost]: PopenProcess sudo.mitogen__readonly_homedir pid 4255: exited with return code 1
[mux  3582] 01:48:46.990789 D mitogen.[ssh.localhost]: SetupProtocol(sudo.mitogen__readonly_homedir): disconnecting
[mux  3582] 01:48:46.991178 D mitogen.[ssh.localhost]: SetupProtocol(sudo.mitogen__readonly_homedir): disconnecting
[mux  3582] 01:48:46.991543 D mitogen.[ssh.localhost]: Dispatcher: Message(1006, 0, 0, 101, 1038, '\x80\x02(NX\x0e\x00\x00\x00mitogen.parentNX\x0e\x00\x00\x00_proxy_connect)cmitog'..410) -> {u'msg': 'error occurred on host Mac-1608.local: EOF on stream; last 100 lines received:\nsudo: runas gid 4294967295: invalid value\nsudo: runas_gid=4294967295: invalid value', u'id': None, u'name': None}
[task 4254] 01:48:46.992739 D mitogen: MitogenProtocol(unix_listener.3582): disconnecting
[mux  3582] 01:48:46.993331 D mitogen: <Side of unix_client.4254 fd 123>: empty read, disconnecting
[task 4254] 01:48:46.993378 D mitogen: Waker(fd=57/58): disconnecting
[mux  3582] 01:48:46.993779 D mitogen: MitogenProtocol(unix_client.4254): disconnecting
[task 4254] 01:48:46.993911 D mitogen: Router(Broker(fb90)): stats: 0 module requests in 0 ms, 0 sent (0 ms minify time), 0 negative responses. Sent 0.0 kb total, 0.0 kb avg.
fatal: /Users/runner/runners/2.164.8/work/1/s/tests/ansible/integration/action/make_tmp_path.yml:131: [target]: FAILED! => {
  msg: error occurred on host Mac-1608.local: EOF on stream; last 100 lines received:
  msg: sudo: runas gid 4294967295: invalid value

This test works locally on the branch though after manually running _user_accounts.yml to set up test users:

/tmp/mitogen/tests/ansible$ cd ../.. && python setup.py install && cd - && ANSIBLE_STRATEGY=mitogen_linear ./run_ansible_playbook.py integration/action/make_tmp_path.yml -l target -k -K

I tried to get it to work with Mac 10.13,10.14, and 10.15. My Mac locally runs 10.14.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciIssues related to CI in either Travis or Azure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions