Bug 1353662

Summary: AttributeError: 'Identity' object has no attribute 'keypath'
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Chris Snyder <csnyder>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: urgent Docs Contact:
Priority: high    
Version: 7.3CC: csnyder, redakkan, skallesh, vrjain
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 20:29:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Sefler 2016-07-07 16:10:34 UTC
Description of problem:
Something bad was merged in CI build https://rhsm-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/QE-RPMs/job/rhsm_master.el7/489/ which is causing a deep regression.  All subscription-manager modules are failing with this error.

Version-Release number of selected component (if applicable):
[root@jsefler-rhel7 ~]# rpm -q subscription-manager
subscription-manager-1.17.8-1.git.24.240a5de.el7.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel7 ~]# subscription-manager version
'Identity' object has no attribute 'keypath'


[root@jsefler-rhel7 ~]# tail -f /var/log/rhsm/rhsm.log
2016-07-07 12:06:57,402 [ERROR] subscription-manager:7796 @managercli.py:174 - exception caught in subscription-manager
2016-07-07 12:06:57,402 [ERROR] subscription-manager:7796 @managercli.py:175 - 'Identity' object has no attribute 'keypath'
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 81, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 72, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2731, in main
    managerlib.check_identity_cert_perms()
  File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 811, in check_identity_cert_perms
    certs = [ident.keypath(), ident.certpath()]
AttributeError: 'Identity' object has no attribute 'keypath'





Actual results:
  above

Expected results:
  no AttributeError

Additional info:

Comment 2 Chris Snyder 2016-07-07 19:54:28 UTC
PR for review here:

https://github.com/candlepin/subscription-manager/pull/1447

Comment 3 vritant 2016-07-11 22:58:27 UTC
Pull Request:
https://github.com/candlepin/subscription-manager/pull/1447/commits
Commits:
dfec791e8a0e3dc15a8d5ba474a0a75c76b795d3

Comment 5 Shwetha Kallesh 2016-07-14 04:50:57 UTC
reproducer :
[root@dhcp35-45 home]# subscription-manager version
'Identity' object has no attribute 'keypath'


---------------------------------------------------------------
verification:

[root@dhcp35-45 ~]# subscription-manager register --force
The system with UUID 95287ecd-7e04-43b5-b6a3-41b73654755b has been unregistered
Registering to: subscription.rhn.stage.redhat.com:443/subscription
Username: qa
Password: 
The system has been registered with ID: d31bcd77-5067-4b9f-9516-6199e030d11c 
[root@dhcp35-45 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.15-1
subscription management rules: 5.15.1
subscription-manager: 1.17.9-1.el7
python-rhsm: 1.17.5-1.git.0.265c7c6.el7

Comment 7 errata-xmlrpc 2016-11-03 20:29:55 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/RHSA-2016-2592.html