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 1207958 - Manually attached subscriptions in GUI are missing in My Subscriptions tab.
Summary: Manually attached subscriptions in GUI are missing in My Subscriptions tab.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.7
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel67
TreeView+ depends on / blocked
 
Reported: 2015-04-01 06:08 UTC by qianzhan
Modified: 2015-07-22 06:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 06:53:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
can not open subscription-manager-gui after attaching subscriptions manually in GUI.png (456.88 KB, image/png)
2015-04-01 06:20 UTC, qianzhan
no flags Details
auto-attached subscription in GUI (110.29 KB, image/png)
2015-04-02 03:10 UTC, qianzhan
no flags Details
manually attached subscription in GUI (136.91 KB, image/png)
2015-04-02 03:10 UTC, qianzhan
no flags Details
entitlement.tar (22.86 KB, application/x-gzip)
2015-04-09 03:12 UTC, qianzhan
no flags Details
sam_install_manifest.zip (428.35 KB, application/zip)
2015-04-09 03:14 UTC, qianzhan
no flags Details
subscriptions can be displayed.png (136.45 KB, image/png)
2015-04-17 07:24 UTC, qianzhan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1345 0 normal SHIPPED_LIVE subscription-manager and python-rhsm bug fix and enhancement update 2015-07-20 17:59:53 UTC

Description qianzhan 2015-04-01 06:08:52 UTC
Description of problem:
Manually attached subscriptions in GUI are missing in My Subscriptions tab.

Version-Release number of selected component (if applicable):
candlepin-0.9.6.5-1.el6sam.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.9.6.5-1.el6sam.noarch
candlepin-tomcat6-0.9.6.5-1.el6sam.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.3.1-1.el6sam.noarch
katello-cli-common-1.4.3.1-1.el6sam.noarch
katello-common-1.4.3.28-1.el6sam_splice.noarch
katello-configure-1.4.5.1-3.el6sam.noarch
katello-glue-candlepin-1.4.3.28-1.el6sam_splice.noarch
katello-glue-elasticsearch-1.4.3.28-1.el6sam_splice.noarch
katello-headpin-1.4.3.28-1.el6sam_splice.noarch
katello-headpin-all-1.4.3.28-1.el6sam_splice.noarch
katello-selinux-1.4.4-2.el6sat.noarch
ruby193-rubygem-katello-redhat-access-engine-0.0.1-1.el6sam.noarch
thumbslug-0.0.40-1.el6sam.noarch
thumbslug-selinux-0.0.40-1.el6sam.noarch
subscription-manager: 1.14.1-1.el6
python-rhsm: 1.14.1-1.el6

How reproducible:
always

Steps to Reproduce:
1. Open subscription-manager-gui.
2. Register and auto-attach.
3. Update available subscriptions, and attach them manually in GUI. Check the attached subscriptions in My Subscriptions tab: Only auto-attached subscription can be seen.

4. List the consumed subscriptions in CLI: the attached subscriptions are in output.


Actual results:
As step 3.

Expected results:
All the attached subscriptions should be displayed in My Subscriptions tab.

Additional info:
When attaching the subscriptions against stage candlepin, all subscriptions can be displayed in My Subscription tab.

Comment 1 qianzhan 2015-04-01 06:19:47 UTC
(In reply to qianzhan from comment #0)

> 
> Steps to Reproduce:
> 1. Open subscription-manager-gui.
> 2. Register and auto-attach.
> 3. Update available subscriptions, and attach them manually in GUI. Check
> the attached subscriptions in My Subscriptions tab: Only auto-attached
> subscription can be seen.
> 
> 4. List the consumed subscriptions in CLI: the attached subscriptions are in
> output.

Step 5. Close subscription-manager-gui, and re-open it: failed. see attachment "can not open subscription-manager-gui after attaching subscriptions manually in GUI.png"

Comment 2 qianzhan 2015-04-01 06:20:16 UTC
Created attachment 1009471 [details]
can not open subscription-manager-gui after attaching subscriptions manually in GUI.png

Comment 4 qianzhan 2015-04-01 06:44:03 UTC
(In reply to qianzhan from comment #0)

> Steps to Reproduce:

> 3. Update available subscriptions, and attach them manually in GUI. Check
> the attached subscriptions in My Subscriptions tab: Only auto-attached
> subscription can be seen.
> 

When manually attaching a subscripion in CLI, it can be displayed in GUI.

Comment 5 J.C. Molet 2015-04-01 15:07:10 UTC
I cannot reproduce this against standalone candlepin using the same version of subscription manager.  Can you provide more info about which subscripiton(s) you are trying to attach and the products you have?  Am I correct in thinking you can only reproduce this against your katello server?

Comment 6 John Sefler 2015-04-01 20:45:53 UTC
Based on the stack trace in attachment 1009471 [details], my guess is that a second subscription that provides for a product that is already installed and auto-subscribed is being manually subscribed and it comes from a different contract number than the subscription that was auto-subscribed.  Therefore the subscription-manager-gui is trying to consolidate all of the contract numbers into a comma separated list and render it as a string the in the Installed Product details pane.   But maybe katello is returning a list of null contracts which is causing the subscription-manager-gui to throw a traceback on bad data.

That's my guess.  I think there is some bad or missing contract data in the subscriptions and either katello is not returning them or subscription-manager is not gracefully handling a missing contract.

Comment 7 qianzhan 2015-04-02 03:09:27 UTC
(In reply to J.C. Molet from comment #5)
> I cannot reproduce this against standalone candlepin using the same version
> of subscription manager.  Can you provide more info about which
> subscripiton(s) you are trying to attach and the products you have?  Am I
> correct in thinking you can only reproduce this against your katello server?

For example, I manually attached the following subscription with SKU MCT2738, and the 'Red Hat Employee Subscription' with SKU SYS0395 is auto-attached during registration.

Attachments 'auto-attanched subscription in GUI.png' and 'manually attached subscription in GUI.png' are references too.

[root@dhcp-128-72 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   OpenShift Enterprise Standard, 4 Core, 32 GB
Provides:            Oracle Java (for RHEL Server)
                     Red Hat OpenShift Enterprise Application Node
                     Red Hat Software Collections Beta (for RHEL Server)
                     JBoss Enterprise Web Server
                     Red Hat Enterprise Linux Server
                     Red Hat Beta
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat OpenShift Enterprise Client Tools
SKU:                 MCT2738
Contract:            10697963
Account:             5501040
Serial:              6409221765214751642
Pool ID:             8ac201184c72e65e014c72e9914903d1
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Level:       Standard
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              12/31/2014
Ends:                12/30/2015
System Type:         Physical

Subscription Name:   Red Hat Employee Subscription
Provides:            Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Enterprise Linux High Availability (for RHEL
                     Server)
                     Red Hat Enterprise Linux Resilient Storage (for RHEL
                     Server)
SKU:                 SYS0395
Contract:            
Account:             5501040
Serial:              2938464246228582804
Pool ID:             8ac201184c72e65e014c72e9904302f5
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       None
Service Type:        Self-Support
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              12/31/2014
Ends:                12/30/2015
System Type:         Physical

Comment 8 qianzhan 2015-04-02 03:10:13 UTC
Created attachment 1009932 [details]
auto-attached subscription in GUI

Comment 9 qianzhan 2015-04-02 03:10:58 UTC
Created attachment 1009933 [details]
manually attached subscription in GUI

Comment 10 John Sefler 2015-04-02 13:56:13 UTC
Notice the empty contract number on the Red Hat Employee Subscription in comment 7.  I think that's evidence that my hunch in comment 6 is correct.  For the Product's Subscription Details pane under the Installed Products tab, subscription-manager-gui is trying to concatenate both contract numbers (10697963 and null) from the two subscriptions that provide for the same installed product, Red Hat Enterprise Linux Server, and place it in the Status field.  That's were the traceback is coming from.

Comment 11 Adrian Likins 2015-04-07 15:41:03 UTC
(In reply to John Sefler from comment #10)
> Notice the empty contract number on the Red Hat Employee Subscription in
> comment 7.  I think that's evidence that my hunch in comment 6 is correct. 
> For the Product's Subscription Details pane under the Installed Products
> tab, subscription-manager-gui is trying to concatenate both contract numbers
> (10697963 and null) from the two subscriptions that provide for the same
> installed product, Red Hat Enterprise Linux Server, and place it in the
> Status field.  That's were the traceback is coming from.

Sounds right. installedtab.InstalledProductsTab,_calc_subs_providing populates
the list fed to friendly_join, and there are no None checks there. It needs to learn to tolerate no contract.

That said, does it make sense for a cert to have an order with no contract value?
What changed that causes that?

Comment 14 Adrian Likins 2015-04-07 18:11:43 UTC
https://github.com/candlepin/subscription-manager/pull/1156
has a client change to handle that case.

But the more interesting issue is how did the contract number not get set?

Comment 16 qianzhan 2015-04-09 03:12:26 UTC
Created attachment 1012493 [details]
entitlement.tar

Comment 18 qianzhan 2015-04-09 03:14:16 UTC
Created attachment 1012500 [details]
sam_install_manifest.zip

Comment 20 qianzhan 2015-04-10 05:38:00 UTC
Waiting for new RHEL6.7 build to verify this bug.

Comment 21 qianzhan 2015-04-17 07:24:20 UTC
Created attachment 1015458 [details]
subscriptions can be displayed.png

Comment 22 qianzhan 2015-04-17 07:27:28 UTC
Verified.

Version-Release number of selected component (if applicable):
candlepin-0.9.6.5-1.el6sam.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.9.6.5-1.el6sam.noarch
candlepin-tomcat6-0.9.6.5-1.el6sam.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.3.1-1.el6sam.noarch
katello-cli-common-1.4.3.1-1.el6sam.noarch
katello-common-1.4.3.28-1.el6sam_splice.noarch
katello-configure-1.4.5.1-3.el6sam.noarch
katello-glue-candlepin-1.4.3.28-1.el6sam_splice.noarch
katello-glue-elasticsearch-1.4.3.28-1.el6sam_splice.noarch
katello-headpin-1.4.3.28-1.el6sam_splice.noarch
katello-headpin-all-1.4.3.28-1.el6sam_splice.noarch
katello-selinux-1.4.4-2.el6sat.noarch
ruby193-rubygem-katello-redhat-access-engine-0.0.1-1.el6sam.noarch
thumbslug-0.0.40-1.el6sam.noarch
thumbslug-selinux-0.0.40-1.el6sam.noarch
subscription-manager: 1.14.5-1.el6
python-rhsm: 1.14.2-1.el6

subscription with contract number and subscription without contract number, can both be displayed in 'My Subscriptions' Tab. please see attachment 'subscriptions can be displayed.png'

Moving this bug to VERIFIED.

Comment 23 errata-xmlrpc 2015-07-22 06:53:44 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-1345.html


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