This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 966429 - Display bonus pool in subscription-manager-gui
Display bonus pool in subscription-manager-gui
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: candlepin-bugs
IDM QE LIST
:
Depends On:
Blocks: rhsm-rhel65
  Show dependency treegraph
 
Reported: 2013-05-23 05:26 EDT by gaoshang
Modified: 2013-11-21 16:25 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 16:25:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
all_subscriptions (357.61 KB, image/png)
2013-05-23 05:26 EDT, gaoshang
no flags Details
auto-attach (95.12 KB, image/png)
2013-05-23 06:16 EDT, gaoshang
no flags Details
my-subscriptions (351.20 KB, image/png)
2013-05-23 06:21 EDT, gaoshang
no flags Details

  None (edit)
Description gaoshang 2013-05-23 05:26:28 EDT
Created attachment 752057 [details]
all_subscriptions

Description of problem:
When testing virt-who function, if host consumed a subscription which can generate bonus pool, the bonus pool can be shown in guest by command "subscription-manager list --available", see following "Virtual" subscription:
	[root@6 ~]# subscription-manager list --available
	+-------------------------------------------+
	    Available Subscriptions
	+-------------------------------------------+
	Subscription Name:    	Red Hat Employee Subscription
	SKU:                  	SYS0395
	Pool Id:              	8ac28d993d85ce8a013d85d2f490006a
	Quantity:             	45
	Service Level:        	None
	Service Type:         	None
	Multi-Entitlement:    	No
	Ends:                 	09/26/2013
	System Type:          	Physical

	Subscription Name:    	Red Hat Employee Subscription
	SKU:                  	SYS0395
	Pool Id:              	8ac28d993e502f34013ed00de8014a3d
	Quantity:             	Unlimited
	Service Level:        	None
	Service Type:         	None
	Multi-Entitlement:    	No
	Ends:                 	09/26/2013
	System Type:          	Virtual

but this "Virtual" subscription can not be shown in subscription-manager-gui

Version-Release number of selected component (if applicable):

[root@6 ~]# rpm -qa | grep subscription-manager
subscription-manager-gui-1.1.23-1.el6.x86_64
subscription-manager-1.1.23-1.el6.x86_64
subscription-manager-firstboot-1.1.23-1.el6.x86_64

[root@6 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.4 (Santiago)

How reproducible:
always

Steps to Reproduce:
1. Prepare one physical host with RHEL6.4_Server_x86_64 system installed, install kvm on it.
2. Install one guest on above host with RHEL6.4_Server_x86_64 system.
3. Register both the host and guest to the same SAM server.
4. Subscribe host a subscription that can generate bonus pool.
5. Open subscription-manager-gui, click "All Available Subscriptions" tab, unselect all the filter options and click "Update" button.

Actual results:
Failed to display bonus pool in subscription-manager-gui

Expected results:
Display bonus pool in subscription-manager-gui

Additional info:
According to rhsm log, 6 pools has been found but only 5 shown in gui, see the attachment all_subscriptions

[root@6 Desktop]# tail -f /var/log/rhsm/rhsm.log 

2013-05-23 05:03:16,227 [DEBUG]  @filter.py:93 - filters changed: {'show_no_overlapping': True, 'show_compatible': False, 'contains_text': '', 'show_installed': False}
2013-05-23 05:03:16,228 [DEBUG]  @managerlib.py:511 - Filtering 0 total pools
2013-05-23 05:03:16,228 [DEBUG]  @managerlib.py:533 - 	Removed 0 pools overlapping existing entitlements
2013-05-23 05:03:16,228 [DEBUG]  @managerlib.py:547 - 	Removed 0 pools that we're already subscribed to
2013-05-23 05:03:16,228 [DEBUG]  @managerlib.py:550 - 	0 pools to display, 0 filtered out
2013-05-23 05:03:16,713 [DEBUG]  @filter.py:93 - filters changed: {'show_no_overlapping': False, 'show_compatible': False, 'contains_text': '', 'show_installed': False}
2013-05-23 05:03:16,713 [DEBUG]  @managerlib.py:511 - Filtering 0 total pools
2013-05-23 05:03:16,713 [DEBUG]  @managerlib.py:547 - 	Removed 0 pools that we're already subscribed to
2013-05-23 05:03:16,713 [DEBUG]  @managerlib.py:550 - 	0 pools to display, 0 filtered out
2013-05-23 05:03:26,495 [DEBUG]  @managerlib.py:478 - Refreshing pools from server...
2013-05-23 05:03:26,495 [INFO]  @cache.py:160 - Checking current system info against cache: /var/lib/rhsm/facts/facts.json
2013-05-23 05:03:26,496 [INFO]  @cache.py:175 - No changes.
2013-05-23 05:03:26,496 [INFO]  @cache.py:215 - Server does not support packages, skipping profile upload.
2013-05-23 05:03:26,496 [DEBUG]  @connection.py:360 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-05-23 05:03:26,496 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2013-05-23 05:03:26,496 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-05-23 05:03:26,497 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-05-23 05:03:26,497 [DEBUG]  @connection.py:381 - Making request: GET /subscription/consumers/92c73ca9-3613-4f7a-a1aa-37cf3746b0e1/owner
2013-05-23 05:03:26,609 [DEBUG]  @connection.py:394 - Response status: 200
2013-05-23 05:03:26,610 [DEBUG]  @connection.py:360 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-05-23 05:03:26,610 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2013-05-23 05:03:26,610 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-05-23 05:03:26,611 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-05-23 05:03:26,612 [DEBUG]  @connection.py:381 - Making request: GET /subscription/owners/ACME_Corporation/pools?consumer=92c73ca9-3613-4f7a-a1aa-37cf3746b0e1&activeon=2013-05-23T05%3A03%3A26-04%3A00
2013-05-23 05:03:26,749 [DEBUG]  @connection.py:394 - Response status: 200
2013-05-23 05:03:26,752 [INFO]  @cache.py:160 - Checking current system info against cache: /var/lib/rhsm/facts/facts.json
2013-05-23 05:03:26,754 [INFO]  @cache.py:175 - No changes.
2013-05-23 05:03:26,755 [INFO]  @cache.py:215 - Server does not support packages, skipping profile upload.
2013-05-23 05:03:26,755 [DEBUG]  @connection.py:360 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-05-23 05:03:26,755 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2013-05-23 05:03:26,755 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-05-23 05:03:26,759 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-05-23 05:03:26,759 [DEBUG]  @connection.py:381 - Making request: GET /subscription/consumers/92c73ca9-3613-4f7a-a1aa-37cf3746b0e1/owner
2013-05-23 05:03:26,847 [DEBUG]  @connection.py:394 - Response status: 200
2013-05-23 05:03:26,847 [DEBUG]  @connection.py:360 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-05-23 05:03:26,848 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2013-05-23 05:03:26,848 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-05-23 05:03:26,848 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-05-23 05:03:26,849 [DEBUG]  @connection.py:381 - Making request: GET /subscription/owners/ACME_Corporation/pools?consumer=92c73ca9-3613-4f7a-a1aa-37cf3746b0e1&listall=true&activeon=2013-05-23T05%3A03%3A26-04%3A00
2013-05-23 05:03:27,030 [DEBUG]  @connection.py:394 - Response status: 200
2013-05-23 05:03:27,033 [DEBUG]  @connection.py:360 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-05-23 05:03:27,037 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2013-05-23 05:03:27,037 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-05-23 05:03:27,037 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-05-23 05:03:27,038 [DEBUG]  @connection.py:381 - Making request: GET /subscription/consumers/92c73ca9-3613-4f7a-a1aa-37cf3746b0e1/entitlements
2013-05-23 05:03:27,123 [DEBUG]  @connection.py:394 - Response status: 200
2013-05-23 05:03:27,124 [DEBUG]  @managerlib.py:497 - found 6 pools:
2013-05-23 05:03:27,124 [DEBUG]  @managerlib.py:498 -    6 compatible
2013-05-23 05:03:27,124 [DEBUG]  @managerlib.py:499 -    0 incompatible
2013-05-23 05:03:27,124 [DEBUG]  @managerlib.py:500 -    0 already subscribed
2013-05-23 05:03:27,125 [DEBUG]  @managerlib.py:511 - Filtering 6 total pools
2013-05-23 05:03:27,125 [DEBUG]  @managerlib.py:547 - 	Removed 0 pools that we're already subscribed to
2013-05-23 05:03:27,125 [DEBUG]  @managerlib.py:550 - 	6 pools to display, 0 filtered out
Comment 2 gaoshang 2013-05-23 06:15:29 EDT
If host auto subscribe a subscription that can generate bonus pool, auto subscribe the guest in command line will select the bonus pool, this is correct.

But auto subscribe the guest in subscription-manager-gui, only Physical pool can be shown, see the attachment auto-attach, it will cause only Physical pool can be autosubscribed in gui.
Comment 3 gaoshang 2013-05-23 06:16:14 EDT
Created attachment 752117 [details]
auto-attach
Comment 4 gaoshang 2013-05-23 06:21:03 EDT
When subscribed a bonus pool in guest, under "My Subscriptions" tab, the "Type" details should be "Virtual" instead of "Physical", see attachment my-subscriptions
Comment 5 gaoshang 2013-05-23 06:21:43 EDT
Created attachment 752134 [details]
my-subscriptions
Comment 7 Michael Stead 2013-08-29 10:25:23 EDT
There seem to be 3 parts to this bug. I'll attempt to address them here.

1. Initial problem discussed in the Description. In this case, the virtual subscription is not present.

Please check to see if the "Type" column in the "All Available Subscriptions" tab show's a value of "Both" for the subscription in question. If it does, the virtual subscription can be selected via the contract selection dialog. This dialog will be displayed after the subscription is selected, and "attach" is clicked.

2. As per comment2 and comment4, you are seeing a type of Physical because the autobind routine is picking that subscription over the virtual one. Changes that were implemented to the autobind routine *should* address this issue. These changes ensure that guests prefer virtual subscriptions, when possible, during auto-attach. The fact that it seemed to work in the CLI, is likely due to the fact that the virtual subscription was found first. Please retest against the latest version of candlepin to see if this has been resolved.

3. The subscription list as shown in attachment 752117 [details] could likely use a little more information. Perhaps we could display the "Type" of subscription here as a hint. Is this something that we should address?
Comment 8 Michael Stead 2013-09-18 13:14:05 EDT
Point 3 in comment 7 has been addressed in BZ 1009600

Please retest and verify points 1 and 2 in comment 7.
Comment 9 gaoshang 2013-09-22 04:40:25 EDT
(In reply to Michael Stead from comment #8)
> Point 3 in comment 7 has been addressed in BZ 1009600
> 
> Please retest and verify points 1 and 2 in comment 7.

I have verified points 1 and 2 in RHEL-5.10-Server--x86_64-RC-1.4(20130910.0) against SAM-1.3.0-RHEL-6-snapshot-7.1 and passed, please see following details:

points 1, We can display and subscribe bonus pool via subscribption-manager-gui now.

points 2, Autobind bonus pool succeed and "Type" under "My Subscriptions" tab is "Virtual".

as for points 3, we'll verify it when BZ 1009600 fixed.

So marked this bug as VERIFIED, thanks.
Comment 10 errata-xmlrpc 2013-11-21 16:25:58 EST
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-1659.html

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