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.

Bug 1183122

Summary: rhsmd/subman dbus traceback on 'attach --pool'
Product: Red Hat Enterprise Linux 7 Reporter: Adrian Likins <alikins>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WORKSFORME QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.1CC: ovasik
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-21 21:22:35 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:
Bug Depends On:    
Bug Blocks: 1005618    
Attachments:
Description Flags
pprint status info of cert sorter status none

Description Adrian Likins 2015-01-16 18:17:06 UTC
Description of problem:

[subscription-manager (master % u=)]$ sudo bin/subscription-manager attach --pool 8a8d01384af34594014af345d63a05b5
Successfully attached a subscription for: Multi-Attribute Stackable (2 GB, 2 Cores)
Traceback (most recent call last):
  File "/home/adrian/src/subscription-manager/bin/subscription_manager/dbus_interface.py", line 59, in emit_status
    self.validity_iface.emit_status()
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.KeyError: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/libexec/rhsmd", line 227, in emit_status
    refresh_compliance_status(self._dbus_properties)
  File "/usr/libexec/rhsmd", line 138, in refresh_compliance_status
    label = reason['attributes']['product_id']
KeyError: 'product_id'



The system and server were heavily loaded at the time, doing lots of hypervisorCheckins, so
maybe hard to reproduce.

Running it again for a different pool against a "local" cp with test data:

# 8a8d01384af34594014af345e1f71453 is a "Cores Package (26 cores)" pool
[subscription-manager (master % u=)]$ sudo bin/subscription-manager attach --pool 8a8d01384af34594014af345e1f71453
Successfully attached a subscription for: Cores Package (26 cores)
Traceback (most recent call last):
  File "/home/adrian/src/subscription-manager/bin/subscription_manager/dbus_interface.py", line 59, in emit_status
    self.validity_iface.emit_status()
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.KeyError: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/libexec/rhsmd", line 227, in emit_status
    refresh_compliance_status(self._dbus_properties)
  File "/usr/libexec/rhsmd", line 138, in refresh_compliance_status
    label = reason['attributes']['product_id']
KeyError: 'product_id'



[subscription-manager (master % u=)]$ sudo bin/subscription-manager attach --pool 8a8d01384af34594014af345dcdb0f55
Successfully attached a subscription for: Awesome OS Server Basic (data center)
Traceback (most recent call last):
  File "/home/adrian/src/subscription-manager/bin/subscription_manager/dbus_interface.py", line 59, in emit_status
    self.validity_iface.emit_status()
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.KeyError: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/libexec/rhsmd", line 229, in emit_status
    refresh_compliance_status(self._dbus_properties)
  File "/usr/libexec/rhsmd", line 140, in refresh_compliance_status
    label = reason['attributes']['product_id']
KeyError: 'product_id'

That pool is for:
Subscription Name:   Awesome OS Server Basic (data center)
Provides:            
SKU:                 awesomeos-server-basic-dc
Contract:            1
Pool ID:             8a8d01384af34594014af345dcdb0f55
Provides Management: No
Available:           10
Suggested:           1
Service Level:       None
Service Type:        Self-Support
Subscription Type:   Standard
Ends:                01/15/2016
System Type:         Physical



Version-Release number of selected component (if applicable):
3004641f07fd5d0bf247418c5b7faf245dfe8222
subman master on jav 15

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Adrian Likins 2015-01-16 18:22:06 UTC
Also, looks like those pools caused some rulefailed reasons.

Server log:

2015-01-16 13:14:33,673 [req=e414273d-a03c-420e-873f-69cd5cd7f994, org=admin] WARN  org.candlepin.controller.CandlepinPoolManager - Entitlement not granted: [rulefailed.consumer.already.has.product]


A pretty printed version of the results of:

status = sorter.get_compliance_status()      # rhsm_d.py:127

is attached

Comment 4 Adrian Likins 2015-01-16 18:23:02 UTC
Created attachment 980890 [details]
pprint status info of cert sorter status

Comment 6 Adrian Likins 2015-01-19 19:44:38 UTC
Leaning towards blocker as this will cause lots of support/etc, even though it doesn't really prevent subscription. But it sure looks ugly.

Comment 8 Adrian Likins 2015-01-19 23:13:16 UTC
pr at https://github.com/candlepin/subscription-manager/pull/1113

Comment 9 John Sefler 2015-01-21 21:22:35 UTC
Offending implementation of RFE Bug 884285 was reverted for RHEL7.1 which in turn fixes this bug for RHEL7.1.

[root@jsefler-os7 ~]# rpm -q --changelog subscription-manager | head -5
* Tue Jan 20 2015 William Poteat <wpoteat> 1.13.17-1
- Revert "884285: Needs to maintain loop for dbus calls" (alikins)
- Revert "1159266: rhsm-icon -i fails with "TypeError: 'NoneType' object has no attribute '__getitem__'""
- Revert "Send list of compliance reasons on dbus"

The automated tests that were repeatedly encountered this bug are now passing.

VERIFIED: Moving to CLOSED WORKSFORME against subscription-manager-1.13.17-1.el7