Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
cannot use pxssh.py which is part of pexpect, always running into timeout:
Version-Release number of selected component (if applicable):
pexpect-2.3-6.el6.noarch
How reproducible:
echo <<EOF > ssh.py
import pxssh
s = pxssh.pxssh()
if not s.login ('localhost', 'myuser', 'mypass'):
print "SSH session failed on login."
print str(s)
else:
print "SSH session login successful"
s.sendline ('ls -l')
s.prompt() # match the prompt
print s.before # print everything before the prompt.
s.logout()
EOF
Steps to Reproduce:
1. python ssh.py
2. see error msg
Actual results:
Traceback (most recent call last):
File "ssh.py", line 3, in <module>
if not s.login ('localhost', 'myuser', 'mypassword'):
File "/usr/lib/python2.6/site-packages/pxssh.py", line 243, in login
if not self.synch_original_prompt():
File "/usr/lib/python2.6/site-packages/pxssh.py", line 134, in synch_original_prompt
self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the cache before getting the prompt
File "/usr/lib/python2.6/site-packages/pexpect.py", line 815, in read_nonblocking
r,w,e = self.__select([self.child_fd], [], [], timeout)
File "/usr/lib/python2.6/site-packages/pexpect.py", line 1549, in __select
return select.select (iwtd, owtd, ewtd, timeout)
Expected results:
Output of ssh command "ls -l"
Additional info:
Fix:
132a133,134
> self.sendline()
> time.sleep(0.5)
add this before line 134, and it works as expected.
This should also affect rhel5 pexpect package, but not verified.
@Benjamin:
Thanks for bugreport. According to my research it is enough to just add
self.sendline()
can you confirm it too? I would prefer not to add additional delays if it is not necessary.
@Alan:
pexpect-u ->
it requires python3 which will be in rhel7 only partially and fence-agents were not tested with it at all
package renaming -> it was obtained from fedora and no-one complained, otherwise it will be fixed; this way we have to wait for rhel8
Description of problem: cannot use pxssh.py which is part of pexpect, always running into timeout: Version-Release number of selected component (if applicable): pexpect-2.3-6.el6.noarch How reproducible: echo <<EOF > ssh.py import pxssh s = pxssh.pxssh() if not s.login ('localhost', 'myuser', 'mypass'): print "SSH session failed on login." print str(s) else: print "SSH session login successful" s.sendline ('ls -l') s.prompt() # match the prompt print s.before # print everything before the prompt. s.logout() EOF Steps to Reproduce: 1. python ssh.py 2. see error msg Actual results: Traceback (most recent call last): File "ssh.py", line 3, in <module> if not s.login ('localhost', 'myuser', 'mypassword'): File "/usr/lib/python2.6/site-packages/pxssh.py", line 243, in login if not self.synch_original_prompt(): File "/usr/lib/python2.6/site-packages/pxssh.py", line 134, in synch_original_prompt self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the cache before getting the prompt File "/usr/lib/python2.6/site-packages/pexpect.py", line 815, in read_nonblocking r,w,e = self.__select([self.child_fd], [], [], timeout) File "/usr/lib/python2.6/site-packages/pexpect.py", line 1549, in __select return select.select (iwtd, owtd, ewtd, timeout) Expected results: Output of ssh command "ls -l" Additional info: Fix: 132a133,134 > self.sendline() > time.sleep(0.5) add this before line 134, and it works as expected. This should also affect rhel5 pexpect package, but not verified.