Arulraj_J
(Arulraj J)
January 29, 2014, 3:55am
1
Along with ansible tasks i was calling a python script named ‘rbupgrade.py’. During this python script execution anisble hangs and couldn’t move further.
[root@cu028 ~]# ps -ef|grep py
root 19725 19588 0 09:22 pts/0 00:00:00 grep py
root 27594 1 0 Jan26 ? 00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp
sf-admin 27806 1 0 Jan26 ? 00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp
root 29513 1 0 Jan26 ? 00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp
root 29623 29620 0 Jan26 ? 00:00:00 /opt/collabnet/teamforge/runtime/bin/wrapper/python /opt/collabnet/teamforge/runtime/scripts/timestamp
root 30469 1 0 Jan26 ? 00:00:00 /bin/sh -c /usr/bin/python /root/.ansible/tmp/ansible-1390720907.78-64524173882964/command; rm -rf /root/.ansible/tmp/ansible-1390720907.78-64524173882964/ >/dev/null 2>&1
root 30488 30469 0 Jan26 ? 00:00:00 /usr/bin/python /root/.ansible/tmp/ansible-1390720907.78-64524173882964/command
root 30489 30488 0 Jan26 ? 00:00:00 [rbupgrade.py]
[root@cu028 ~]#
Please help me in this problem…
tannerjc
(James Tanner)
January 29, 2014, 4:13pm
2
Follow the instructions in this thread: https://groups.google.com/forum/#!msg/ansible-project/JdZWzLeZMmk/93W-42MP9U0J
Once you have the trace data, we may be able to offer more advice.
I have a hunch that the "rbupgrade.py" script may not like not being run without a shell or may be asking for input. Perhaps try using the "shell:" module instead of "command:".
Arulraj_J
(Arulraj J)
February 3, 2014, 7:25am
3
This is were the trace stops
python -m trace --trace /root/.ansible/tmp/ansible-1390720907.78-64524173882964/command
— modulename: subprocess, funcname: close_unregister_and_remove
subprocess.py(1357): poller.unregister(fd)
subprocess.py(1358): self._fd2file[fd].close()
subprocess.py(1359): self._fd2file.pop(fd)
subprocess.py(1395): for fd, mode in ready:
subprocess.py(1386): while self._fd2file:
subprocess.py(1387): try:
subprocess.py(1388): ready = poller.poll(self._remaining_time(endtime))
— modulename: subprocess, funcname: _remaining_time
subprocess.py(766): if endtime is None:
subprocess.py(767): return None
FYI, called python script ‘rbupgrade.py’ will run locally in the ansible server itself.
Arulraj_J
(Arulraj J)
February 10, 2014, 4:04am
4
I even tried by executing as shell command, but no help.
Is this a bug in latest ansible? i didn’t face this problem with earlier versions…
We are pretty sure nothing has changed here.
Is “rbupgrade” something standard? What is it’s usual running time?
Most likely the script is clinging on to standard input, you might wish to try feeding /dev/null into the program.