Closed joaocc closed 9 years ago
Did you run the command in an interactive shell or did it run in background?
I'm running in a bash script, but from an interactive session. It also happens when it is run by vagrant provisioning.
I was confused first by the first line:
lxc_container: console.c: lxc_console: 700 stdin is not a tty
The problem is, that this line should execute local_cmd:
pid = self.container.attach(_lxc.attach_run_command, local_cmd,
stdout=write_stdout,
stderr=write_stderr)
This call comes from liblxc and forks usually off and executes a command inside the container namespace. However in this case it fails and an invalid pid is returned.
Could you rerun ansible by prepending strace -f
and give me the output?
I can no longer reproduce this because the provisioning has changed. If I run into it again I will fetch the info. Thx
So i will close this issue for the moment
Hi, I started having these messages. Any idea on what may be the cause? This happens when running ansible on a lxc-host (local connection) an trying to gather facts in lxc-guests (via lxc connection).
´´´´ lxc_container: console.c: lxc_console: 700 stdin is not a tty fatal: [h-piwik] => Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/ansible/runner/init.py", line 582, in _executor exec_rc = self._executor_internal(host, new_stdin) File "/usr/lib/pymodules/python2.7/ansible/runner/init.py", line 785, in _executor_internal return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args) File "/usr/lib/pymodules/python2.7/ansible/runner/init.py", line 1032, in _executor_internal_inner result = handler.run(conn, tmp, module_name, module_args, inject, complex_args) File "/usr/lib/pymodules/python2.7/ansible/runner/action_plugins/normal.py", line 57, in run return self.runner._execute_module(conn, tmp, module_name, module_args, inject=inject, complex_args=complex_args) File "/usr/lib/pymodules/python2.7/ansible/runner/init.py", line 470, in _execute_module tmp = self._make_tmp_path(conn) File "/usr/lib/pymodules/python2.7/ansible/runner/init.py", line 1288, in _make_tmp_path result = self._low_level_exec_command(conn, cmd, None, sudoable=False) File "/usr/lib/pymodules/python2.7/ansible/runner/init.py", line 1169, in _low_level_exec_command in_data=in_data) File "/usr/share/ansible_plugins/connection_plugins/lxc/lxc.py", line 63, in exec_command (pid, returncode) = os.waitpid(pid, 0) OSError: [Errno 10] No child processes ´´´´
Thanks