OK, I 'think' I've gotten to the root of this particular problem, and it
doesn't appear to have anything to do with python or binaries to generate
checksums.
I was able to reproduce the same command hanging issue by just performing
an SSH with the same arguments that Ansible uses. After process of
elimination, I was able to reasonably conclude that my issue is with
pseudo-tty alocation on AIX.
In Ansible, part of the SSH arguments that are passed are '-tt'. Looking
at the man pages for '-t':
Forces pseudo-tty allocation. This can be used to execute arbitrary
screen-based programs on a remote machine, which can be very useful, e.g.
when implementing menu services. Multiple -t options force tty allocation,
een if ssh has no local tty
I'm guessing there is something hokey using pseudo-tty allocation in AIX,
or perhaps how their implementation of the OpenSSH client handles it
(openssh version from IBM as of AIX7.1.2.4 is version 6.0p1). I did some
comparisons of debug output from SSH sessions that hung and those that
didn't, but it was hard to determine where the issue may have been just
from that.
It appears that pseudo-tty's are only required when needing an interactive
shell. I have not been able to find the reason that Ansible 'needs' a
pseudo-tty. There were some vague references online that default
configured sudoers requires tty (requiretty); when actually the DEFAULT for
sudo is to NOT require a tty. This appears to have been changed from the
default by RHEL around RHEL5. In fact, in Ansible's ssh.py, there are
comments that lead me to believe that they DON'T want to utilize a tty at
all (issues with the modules due to python interactive mode inserting empty
lines).
Testing my 'fix' involved changing the line in ssh.py that adds '-tt' to
the ssh_cmd array, and change it to '-T' (this disables pseudo-tty
allocation). After this change, I have not been able to reproduce my
issues with copy/template plays hanging, or any others for that matter.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/82226d21-6980-4514-a4d1-b9a2f531b9df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.