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.
Bug 1073947 - Fence-agent (ssh) fails on login if identity file was used
Summary: Fence-agent (ssh) fails on login if identity file was used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: fence-agents
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Marek Grac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 1075683 1075691 1113520
TreeView+ depends on / blocked
 
Reported: 2014-03-07 14:38 UTC by Ondrej Mular
Modified: 2015-03-05 09:06 UTC (History)
4 users (show)

Fixed In Version: fence-agents-4.0.11-1.el7
Doc Type: Bug Fix
Doc Text:
Prior to this update, fence agents that connected using the SSH protocol failed on login if an identity file was used as the method of authentication. The bug has been fixed and these fence agents now successfully authenticate through an identity file.
Clone Of:
: 1075683 1075691 (view as bug list)
Environment:
Last Closed: 2015-03-05 09:06:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0393 0 normal SHIPPED_LIVE fence-agents bug fix and enhancement update 2015-03-05 14:00:54 UTC

Description Ondrej Mular 2014-03-07 14:38:23 UTC
Description of problem:
Fence-agent (ssh) fails on login if identity file was used, because of uncaught exception.

How reproducible:
use identity file as authentication method in fence-agent

Steps to Reproduce:
1. fence_alom -a node -l username -k ~/.ssh/id_rsa -o status

Actual results:
Traceback (most recent call last):
  File "fence_alom", line 65, in <module>
    main()
  File "fence_alom", line 52, in main
    conn = fence_login(options)
  File "/.../fencing.py", line 1027, in fence_login
    "Enter passphrase for key '" + options["--identity-file"] + "':" ], int(options["--login-timeout"]))
  File "/.../fencing.py", line 383, in log_expect
    result = self.expect(pattern, timeout)
  File "/usr/lib/python2.7/site-packages/pexpect.py", line 1310, in expect
    compiled_pattern_list = self.compile_pattern_list(pattern)
  File "/usr/lib/python2.7/site-packages/pexpect.py", line 1229, in compile_pattern_list
    raise TypeError ('Argument must be one of StringTypes, EOF, TIMEOUT, SRE_Pattern, or a list of those type. %s' % str(type(p)))
TypeError: Argument must be one of StringTypes, EOF, TIMEOUT, SRE_Pattern, or a list of those type. <type 'list'>

Expected results:
Status: ON

Comment 2 Marek Grac 2014-03-12 15:50:48 UTC
Patch is in upstream now: 

https://git.fedorahosted.org/cgit/fence-agents.git/commit/?id=a90a90cf56f713be9a4064a02c0f630425b2091c

Unit test:

before applying patch:
[root@virt-135 ~]# fence_apc -a node -l username -k /etc/passwd -o status -x -n 1
Traceback (most recent call last):
  File "/sbin/fence_apc", line 289, in ?
    main()
  File "/sbin/fence_apc", line 259, in main
    conn = fence_login(options)
  File "/usr/lib/fence/fencing.py", line 925, in fence_login
    result = conn.log_expect(options, [ options["-c"], "Are you sure you want to continue connecting (yes/no)?", "Enter passphrase for key '"+options["-k"]+"':" ], int(options["-y"]))
  File "/usr/lib/fence/fencing.py", line 406, in log_expect
    result = self.expect(pattern, timeout)
  File "/usr/lib/python2.4/site-packages/pexpect.py", line 1310, in expect
    compiled_pattern_list = self.compile_pattern_list(pattern)
  File "/usr/lib/python2.4/site-packages/pexpect.py", line 1229, in compile_pattern_list
    raise TypeError ('Argument must be one of StringTypes, EOF, TIMEOUT, SRE_Pattern, or a list of those type. %s' % str(type(p)))
TypeError: Argument must be one of StringTypes, EOF, TIMEOUT, SRE_Pattern, or a list of those type. <type 'list'>

after applying patch:
fence_apc -a node -l username -k /etc/passwd -o status -x -n 1
Unable to connect/login to fencing device

Comment 4 Marek Grac 2014-09-03 11:59:20 UTC
Patch is part of the fence-agents 4.0.11

Comment 8 errata-xmlrpc 2015-03-05 09:06:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0393.html


Note You need to log in before you can comment on or make changes to this bug.