Bug 962520 - rct cat-cert is throwing AttributeError: 'Content' object has no attribute 'arches' against older candlepin's entitlement
Summary: rct cat-cert is throwing AttributeError: 'Content' object has no attribute 'a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Devan Goodwin
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510
TreeView+ depends on / blocked
 
Reported: 2013-05-13 18:33 UTC by John Sefler
Modified: 2013-09-30 23:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 23:08:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Comment 4 Rehana 2013-05-14 08:13:07 UTC
Observed the same error, against the local candlepin serer(which does not yet support arch-based content)

[root@rehana-candlepin candlepin]# git show-ref | grep master
d1bbd4b107c7cec49e92f29a9304c153c3021aa8 refs/heads/master
d1bbd4b107c7cec49e92f29a9304c153c3021aa8 refs/remotes/origin/master

[root@hp-bl460cgen8-01 entitlement]# rct cat-cert /etc/rhsm/ca/candlepin-ca.pem 

+-------------------------------------------+
	Identity Certificate
+-------------------------------------------+

Certificate:
	Path: /etc/rhsm/ca/candlepin-ca.pem
	Version: 1.0
	Serial: 15563296091388015524
	Start Date: 2013-05-14 08:00:44+00:00
	End Date: 2014-05-14 08:00:44+00:00
	Alt Name: None

Subject:
	C: US
	CN: 10.70.35.139
	L: Raleigh

[root@hp-bl460cgen8-01 product]# subscription-manager register --org=admin --auto-attach
Username: admin
Password: 
The system has been registered with ID: e7485dc4-0b70-41a3-996c-40366375e392 
Installed Product Current Status:
Product Name: Shared Storage Bits
Status:       Subscribed

Product Name: Awesome OS Server Bits
Status:       Subscribed

[root@hp-bl460cgen8-01 product]# cd ../entitlement/
[root@hp-bl460cgen8-01 entitlement]# ll
total 16
-rw------- 1 root root 1679 May 14 04:04 7607312508875120605-key.pem
-rw-r--r-- 1 root root 2460 May 14 04:04 7607312508875120605.pem
[root@hp-bl460cgen8-01 entitlement]# rct cat-cert 7607312508875120605.pem 
Traceback (most recent call last):
  File "/usr/bin/rct", line 44, in ?
    sys.exit(abs(main() or 0))
  File "/usr/bin/rct", line 39, in main
    return RctCLI().main()
  File "/usr/share/rhsm/subscription_manager/cli.py", line 160, in main
    return cmd.main()
  File "/usr/share/rhsm/rct/commands.py", line 39, in main
    return_code = self._do_command()
  File "/usr/share/rhsm/rct/cert_commands.py", line 73, in _do_command
    skip_products=self.options.no_products)
  File "/usr/share/rhsm/rct/printing.py", line 210, in printc
    printer.printc(cert)
  File "/usr/share/rhsm/rct/printing.py", line 113, in printc
    print self.cert_to_str(cert)
  File "/usr/share/rhsm/rct/printing.py", line 171, in cert_to_str
    s.append("\n%s" % content_printer.as_str(c))
  File "/usr/share/rhsm/rct/printing.py", line 90, in as_str
    s.append("\t%s: %s" % (_("Arches"), ", ".join(content.arches)))
AttributeError: 'Content' object has no attribute 'arches'

on 

[root@hp-bl460cgen8-01 entitlement]# rpm -qa | grep subsc
subscription-manager-gui-1.8.7-1.el5
subscription-manager-1.8.7-1.el5
subscription-manager-firstboot-1.8.7-1.el5
subscription-manager-migration-1.8.7-1.el5
subscription-manager-migration-data-1.11.2.7-1.el5
subscription-manager-debuginfo-1.8.7-1.el5

Comment 5 Devan Goodwin 2013-05-17 16:20:46 UTC
Caused by mismatched python-rhsm and subscription-manager.

Adrian has already fixed in master by adding dep.

Comment 7 Dan Lah 2013-05-21 19:03:07 UTC
devel_ack+

Comment 9 Sharath Dwaral 2013-05-22 17:43:00 UTC
Version: 

Brew Build
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.7-1
subscription-manager: 1.8.8-1.el5
python-rhsm: 1.8.11-1.el5_9

Steps:

# subscription-manager clean
# subscription-manager register --org=admin --auto-attach
Username: testuser1
Password: 
The system has been registered with ID: e9fe8474-ed5a-4b53-b318-681bec6dafd8 
Installed Product Current Status:
Product Name: Awesome OS for ia64 Bits
Status:       Not Subscribed

Product Name: Stackable with Awesome OS for x86_64 Bits
Status:       Subscribed

Product Name: Awesome OS Developer Basic
Status:       Not Subscribed

Product Name: Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits
Status:       Subscribed

...
...
...

# cd /etc/pki/entitlement
# ll
total 192
-rw------- 1 root root 1675 May 22 13:29 1304899599699857195-key.pem
-rw-r--r-- 1 root root 2249 May 22 13:29 1304899599699857195.pem
-rw------- 1 root root 1675 May 22 13:29 1572989496463051343-key.pem
-rw-r--r-- 1 root root 2379 May 22 13:29 1572989496463051343.pem
-rw------- 1 root root 1675 May 22 13:29 1585833795797851259-key.pem
-rw-r--r-- 1 root root 2396 May 22 13:29 1585833795797851259.pem
-rw------- 1 root root 1675 May 22 13:29 1840276809173460994-key.pem
-rw-r--r-- 1 root root 2558 May 22 13:29 1840276809173460994.pem
-rw------- 1 root root 1675 May 22 13:29 2146709793337180308-key.pem
-rw-r--r-- 1 root root 2294 May 22 13:29 2146709793337180308.pem
-rw------- 1 root root 1675 May 22 13:29 2202265541354303114-key.pem
-rw-r--r-- 1 root root 2119 May 22 13:29 2202265541354303114.pem
-rw------- 1 root root 1675 May 22 13:29 3287455852208744842-key.pem
-rw-r--r-- 1 root root 2428 May 22 13:29 3287455852208744842.pem
-rw------- 1 root root 1675 May 22 13:29 3896479052607143669-key.pem
-rw-r--r-- 1 root root 2278 May 22 13:29 3896479052607143669.pem
-rw------- 1 root root 1675 May 22 13:31 4268313221566932900-key.pem
-rw-r--r-- 1 root root 2245 May 22 13:31 4268313221566932900.pem
-rw------- 1 root root 1675 May 22 13:29 4716264784492957234-key.pem
-rw-r--r-- 1 root root 1969 May 22 13:29 4716264784492957234.pem
-rw------- 1 root root 1675 May 22 13:29 5771939887066814567-key.pem
-rw-r--r-- 1 root root 2558 May 22 13:29 5771939887066814567.pem
-rw------- 1 root root 1675 May 22 13:29 7763715850719598718-key.pem
-rw-r--r-- 1 root root 2549 May 22 13:29 7763715850719598718.pem

# rct cat-cert 7763715850719598718.pem

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: 7763715850719598718.pem
	Version: 3.2
	Serial: 7763715850719598718
	Start Date: 2013-05-22 00:00:00+00:00
	End Date: 2014-05-22 00:00:00+00:00
	Pool ID: 8a90f8333eccde1f013eccdf65a40496

Subject:
	CN: 8a90f8333eccde1f013ecd498d971422

Product:
	ID: 801
	Name: RAM Limiting Product
	Version: 1.0
	Arch: x86_64
	Tags: 

Order:
	Name: RAM/Cores Package (8GB, 4 cores)
	Number: order-8675309
	SKU: ram-cores-8gb-4cores
	Contract: 163
	Account: 12331131231
	Service Level: 
	Service Type: 
	Quantity: 10
	Quantity Used: 1
	Socket Limit: 
	RAM Limit: 8
	Core Limit: 4
	Virt Limit: 
	Virt Only: False
	Subscription: 
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

Content:
	Type: yum
	Name: always-enabled-content
	Label: always-enabled-content
	Vendor: test-vendor
	URL: /foo/path/always/$releasever
	GPG: /foo/path/always/gpg
	Enabled: True
	Expires: 200
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: awesomeos
	Label: awesomeos
	Vendor: Red Hat
	URL: /path/to/$basearch/$releasever/awesomeos
	GPG: /path/to/awesomeos/gpg/
	Enabled: True
	Expires: 3600
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: awesomeos-i686
	Label: awesomeos-i686
	Vendor: Red Hat
	URL: /path/to/awesomeos/i686
	GPG: /path/to/awesomeos/gpg/
	Enabled: False
	Expires: 3600
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: awesomeos-ia64
	Label: awesomeos-ia64
	Vendor: Red Hat
	URL: /path/to/awesomeos/ia64
	GPG: /path/to/awesomeos/gpg/
	Enabled: False
	Expires: 3600
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: awesomeos-ppc
	Label: awesomeos-ppc
	Vendor: Red Hat
	URL: /path/to/awesomeos/ppc
	GPG: /path/to/awesomeos/gpg/
	Enabled: False
	Expires: 3600
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: awesomeos-ppc64
	Label: awesomeos-ppc64
	Vendor: Red Hat
	URL: /path/to/awesomeos/ppc64
	GPG: /path/to/awesomeos/gpg/
	Enabled: False
	Expires: 3600
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: awesomeos-s390x
	Label: awesomeos-s390x
	Vendor: Red Hat
	URL: /path/to/awesomeos/s390x
	GPG: /path/to/awesomeos/gpg/
	Enabled: False
	Expires: 3600
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: awesomeos-x86_64
	Label: awesomeos-x86_64
	Vendor: Red Hat
	URL: /path/to/awesomeos/x86_64
	GPG: /path/to/awesomeos/gpg/
	Enabled: False
	Expires: 3600
	Required Tags: 
	Arches: 

Content:
	Type: yum
	Name: never-enabled-content
	Label: never-enabled-content
	Vendor: test-vendor
	URL: /foo/path/never
	GPG: /foo/path/never/gpg
	Enabled: False
	Expires: 600
	Required Tags: 
	Arches: 

VERIFIED against both standalone and Stage server.

Comment 11 errata-xmlrpc 2013-09-30 23:08:17 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.

http://rhn.redhat.com/errata/RHBA-2013-1332.html


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