Bug 668032

Summary: rhsm not logging subscriptions and products properly
Product: Red Hat Enterprise Linux 6 Reporter: J.C. Molet <jmolet>
Component: subscription-managerAssignee: Adrian Likins <alikins>
Status: CLOSED ERRATA QA Contact: J.C. Molet <jmolet>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: alikins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:38:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 639436    
Description Flags
command line history none

Description J.C. Molet 2011-01-07 17:55:50 UTC
Created attachment 472269 [details]
command line history

Description of problem:
When subscribing to a subscription with bundled products, the names of the products aren't properly listed as being added in the log.  Only the first item in the list of products is logged.  

Additionally the subscription name is not logged and only the pool ID is given (not very human readable).

Ideally all of this information would be logged upon a subscribe or unsubscribe as these are the elements being displayed and dealt with when using subscription-manager list commands or using the gui.

Version-Release number of selected component (if applicable):
[root@jmolet-vm1 rhsm]# rpm -qa | grep subscription

Steps to Reproduce:
1. install subscription manager and all required dependencies.
2. register subscription manager
3. subscribe to a subscription with bundled (>1) products.
Actual results:
The subsciption is referred to in log by pool ID.
Only the first product is logged as being installed

Expected results:
The subscription is referred to in the log by pool ID and the subscription name.
All products are logged as being installed.

Additional info:
Attached to this is a log of the commands I used to replicate this.
Below is the relevant part of /etc/rhsm/rhsm.log:

2011-01-07 12:36:27,559 [INFO] _do_command() @managercli.py:443 - Info: Successfully subscribed the machine the Entitlement Pool 8a90f88e2ca760c9012ca7615a4e01b7
2011-01-07 12:36:28,101 [INFO] perform() @certlib.py:137 - certs updated:
Total updates: 1
Found (local) serial# []
Expected (UEP) serial# [14129442178924125]
Added (new)
  [sn:14129442178924125 (High availability (cluster suite),) @ /etc/pki/entitlement/14129442178924125.pem]
Deleted (rogue):
Expired (not deleted):
Expired (deleted):

Comment 1 Adrian Likins 2011-01-13 17:02:45 UTC
commit 73c4b80612feca270bd39012763a5f74bac7ab52
Author: Adrian Likins <alikins@redhat.com>
Date:   Wed Jan 12 12:33:58 2011 -0500

    668032: Log all bundled products on subscription
    Previously we were logging the first product, now log all
    the bundled products as well. Ditto for syslog.

Comment 2 J.C. Molet 2011-01-19 20:16:45 UTC
works as in:

2011-01-19 15:15:24,838 [INFO] perform() @certlib.py:137 - certs updated:
Total updates: 1
Found (local) serial# []
Expected (UEP) serial# [1151295468122654138]
Added (new)
  [sn:1151295468122654138 (Red Hat Enterprise Linux Load Balancer (for RHEL Entitlement),) @ /etc/pki/entitlement/1151295468122654138.pem]
  [sn:1151295468122654138 (Red Hat Enterprise Linux Resilient Storage (for RHEL Entitlement),) @ /etc/pki/entitlement/1151295468122654138.pem]
  [sn:1151295468122654138 (Red Hat Enterprise Linux Entitlement,) @ /etc/pki/entitlement/1151295468122654138.pem]
  [sn:1151295468122654138 (Red Hat Enterprise Linux Scalable File System (for RHEL Entitlement),) @ /etc/pki/entitlement/1151295468122654138.pem]
  [sn:1151295468122654138 (Red Hat Enterprise Linux High Availability (for RHEL Entitlement),) @ /etc/pki/entitlement/1151295468122654138.pem]
Deleted (rogue):
Expired (not deleted):
Expired (deleted):

Comment 3 errata-xmlrpc 2011-05-19 13:38:37 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.