Bug 1008462 - Virtual sub pool disappears from list --avail if you register the client via firstboot
Virtual sub pool disappears from list --avail if you register the client via ...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Michael Stead
John Sefler
:
Depends On:
Blocks: rhsm-rhel65
  Show dependency treegraph
 
Reported: 2013-09-16 08:10 EDT by Shwetha Kallesh
Modified: 2013-09-24 07:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-24 07:21:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
RHSM.log (31.77 KB, text/plain)
2013-09-16 08:10 EDT, Shwetha Kallesh
no flags Details
Guest and host details (36.59 KB, text/plain)
2013-09-23 04:30 EDT, Shwetha Kallesh
no flags Details

  None (edit)
Description Shwetha Kallesh 2013-09-16 08:10:46 EDT
Created attachment 798262 [details]
RHSM.log

Description of problem:
Virtual sub pool disappears from list --avail if you register the client via firstboot

Version-Release number of selected component (if applicable):
[root@rhel65 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.27-1
subscription-manager: 1.10.2-1.git.18.e239552.el6
python-rhsm: 1.10.2-1.git.4.3048ab5.el6

How reproducible:


Steps to Reproduce:
    [root@rhel65 ~]# subscription-manager list --avail | grep Instance -A9
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a241179184014117929337084a
    Available:         10
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Physical
     
    --
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a2411791840141179293510859
    Available:         10
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Physical
     
    --
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a2411791840141261e80132c32
    Available:         1
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Virtual
     
    [root@rhel65 ~]# subscription-manager unregister
    System has been unregistered.
    [root@rhel65 ~]# firstboot -r
    firstboot DEBUG: Loading consumer info from identity certificates.
    firstboot DEBUG: Loading current RPM profile.

    [root@rhel65 ~]# subscription-manager list --avail | grep Instance -A9
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a24117918401411792b408135d
    Available:         9
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Physical
     
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a24117918401411792b3ef134e
    Available:         20
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Physical
     
    [root@rhel65 ~]# subscription-manager list --consumed
    +-------------------------------------------+
       Consumed Subscriptions
    +-------------------------------------------+
    Subscription Name: Awesome OS Instance Based (Standard Support)
    Provides:          Awesome OS Instance Server Bits
    SKU:               awesomeos-instancebased
    Contract:          46
    Account:           12331131231
    Serial:            7564644561605407729
    Pool ID:           8ac6a3a24117918401411792b408135d
    Active:            True
    Quantity Used:     1
    Service Level:     Standard
    Service Type:      L1-L3
    Status Details:    
    Starts:            09/13/2013
    Ends:              09/13/2014
     
     
     
    [root@rhel65 ~]# subscription-manager register --org=admin
    Username: admin
    Password:
    The system has been registered with ID: ca94c884-253b-4416-b2de-c38facc5aebf
    [root@rhel65 ~]# subscription-manager list --consumed
    No consumed subscription pools to list
    [root@rhel65 ~]# subscription-manager list --avail | grep Instance -A9
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a241179184014117929337084a
    Available:         10
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Physical
     
    --
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a2411791840141179293510859
    Available:         10
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Physical
     
    --
    Subscription Name: Awesome OS Instance Based (Standard Support)
    SKU:               awesomeos-instancebased
    Pool ID:           8ac6a3a2411791840141261e80132c32
    Available:         1
    Service Level:     Standard
    Service Type:      L1-L3
    Multi-Entitlement: Yes
    Ends:              09/13/2014
    System Type:       Virtual


Actual results:


Expected results:


Additional info:
Comment 2 Michael Stead 2013-09-16 13:17:32 EDT
I don't think that this is a bug, but I will need you to confirm.

After guest registration via firstboot, I think that the virt subscription dissapears because the system has consumed the single virt subscription that is available on autobind. Here's the output from my tests (same versions installed).

[root@rhel65 mstead]# subscription-manager list --consumed
No consumed subscription pools to list

[root@rhel65 mstead]# subscription-manager list --avail | grep -A9 Instance
Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           ff8080814126b6cd014126b845640523
Available:         10
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              09/15/2014
System Type:       Physical

--
Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           ff8080814126b6cd014126b8458c0531
Available:         18
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              09/15/2014
System Type:       Physical

Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           ff8080814126b6cd014126cf806c1471
Available:         1
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              09/15/2014
System Type:       Virtual

[root@rhel65 mstead]# subscription-manager unregister
System has been unregistered.

[root@rhel65 mstead]# firstboot -r
##### CUT OUTPUT OF FIRSTBOOT TO KEEP THIS POST SHORT
##### I ran through the entire firstboot process


[root@rhel65 mstead]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Instance Based (Standard Support)
Provides:          Awesome OS Instance Server Bits
SKU:               awesomeos-instancebased
Contract:          43
Account:           12331131231
Serial:            5428224129733415195
Pool ID:           ff8080814126b6cd014126cf806c1471
Active:            True
Quantity Used:     1
Service Level:     Standard
Service Type:      L1-L3
Status Details:    
Starts:            09/15/2013
Ends:              09/15/2014



[root@rhel65 mstead]# subscription-manager list --avail | grep -A9 Instance
Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           ff8080814126b6cd014126b845640523
Available:         10
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              09/15/2014
System Type:       Physical

--
Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           ff8080814126b6cd014126b8458c0531
Available:         18
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              09/15/2014
System Type:       Physical


At this point it appears that I have reproduced what was reported. But looking at the output a little closer, we can see that the available quantities have not changed on the Physical subscriptions, and that the Pool ID on the consumed sub matches that of the Virtual subscription's Pool ID on the inital list of all available subs.

Using 'rct' on the entitlement shows us that autobind selected the ONLY virtual instance based subscription matching the installed product, and since the pool is now exhausted of entitlements, it does not show up.

[root@rhel65 mstead]# rct cc /etc/pki/entitlement/5428224129733415195.pem --no-content

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

Certificate:
	Path: /etc/pki/entitlement/5428224129733415195.pem
	Version: 3.2
	Serial: 5428224129733415195
	Start Date: 2013-09-16 00:00:00+00:00
	End Date: 2014-09-16 00:00:00+00:00
	Pool ID: ff8080814126b6cd014126cf806c1471

Subject:
	CN: ff8080814126b6cd014127b9b3cb14ee

Issuer:
	C: US
	CN: boogady
	L: Raleigh

Product:
	ID: 32060
	Name: Awesome OS Instance Server Bits
	Version: 6.1
	Arch: ALL
	Tags: 

Order:
	Name: Awesome OS Instance Based (Standard Support)
	Number: order-8675309
	SKU: awesomeos-instancebased
	Contract: 43
	Account: 12331131231
	Service Level: Standard
	Service Type: L1-L3
	Quantity: 1
	Quantity Used: 1
	Socket Limit: 2
	RAM Limit: 
	Core Limit: 
	Virt Only: True    <----- This is from a virtual subscription
	Subscription: 
	Stacking ID: 15
	Warning Period: 0
	Provides Management: False



Please retest this to see if you get the same results.
Comment 3 Michael Stead 2013-09-17 14:20:31 EDT
A commit was added to the master branch of subscription-manager that might make these sort of things more visible.

https://github.com/candlepin/subscription-manager/pull/770

Something else to try would be to select 'manually attach' during the firstboot registration process, and then list subs after firstboot exits.

Please retest.
Comment 4 Shwetha Kallesh 2013-09-18 03:44:28 EDT
I can still reproduce 

[root@rhel65 product]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.27-1
subscription-manager: 1.10.2-1.git.23.1161f9e.el6
python-rhsm: 1.10.2-1.git.4.3048ab5.el6


[root@rhel65 product]# subscription-manager unregister
This system is currently not registered.

[root@rhel65 product]# firstboot -r
firstboot DEBUG: Loading consumer info from identity certificates.

[root@rhel65 product]# subscription-manager list --avail | grep -A9 Instance
Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           8ac6a3a2412fbeec01412fc0214f1315 -----------> this pool id is the same one in the consumed list
Available:         9
Suggested:         0
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              09/18/2014
System Type:       Physical
--
Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           8ac6a3a2412fbeec01412fc021381306
Available:         20
Suggested:         0
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              09/18/2014
System Type:       Physical
[root@rhel65 product]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Instance Based (Standard Support)
Provides:          Awesome OS Instance Server Bits
SKU:               awesomeos-instancebased
Contract:          46
Account:           12331131231
Serial:            425395623188623983
Pool ID:           8ac6a3a2412fbeec01412fc0214f1315  ---------> same as physical pool id in the list --avail above
Active:            True
Quantity Used:     1
Service Level:     Standard
Service Type:      L1-L3
Status Details:    
Starts:            09/18/2013
Ends:              09/18/2014
System Type:       Physical

[root@rhel65 product]# ls /etc/pki/entitlement/
425395623188623983-key.pem  425395623188623983.pem
[root@rhel65 product]# rct cat-cert /etc/pki/entitlement/425395623188623983.pem

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

Certificate:
	Path: /etc/pki/entitlement/425395623188623983.pem
	Version: 3.2
	Serial: 425395623188623983
	Start Date: 2013-09-18 00:00:00+00:00
	End Date: 2014-09-18 00:00:00+00:00
	Pool ID: 8ac6a3a2412fbeec01412fc0214f1315

Subject:
	CN: 8ac6a3a2412fbeec01412ff8b54915b7

Issuer:
	C: US
	CN: 10.70.35.34
	L: Raleigh

Product:
	ID: 32060
	Name: Awesome OS Instance Server Bits
	Version: 6.1
	Arch: ALL
	Tags: 
	Brand Type: OS

Order:
	Name: Awesome OS Instance Based (Standard Support)
	Number: order-8675309
	SKU: awesomeos-instancebased
	Contract: 46
	Account: 12331131231
	Service Level: Standard
	Service Type: L1-L3
	Quantity: 10
	Quantity Used: 1
	Socket Limit: 2
	RAM Limit: 
	Core Limit: 
	Virt Only: False ---------------------> which makes the pool physical
	Subscription: 
	Stacking ID: 15
	Warning Period: 0
	Provides Management: False
Comment 5 Devan Goodwin 2013-09-20 10:28:44 EDT
Shwetha, in firstboot, once you're past the point of registration and are looking at the screen where you select pools, could you leave firstboot running and do the following:

- switch to a terminal (leave firstboot open) or ssh in from another system
- run subscription-manager identity to get the UUID
- add the results of a command like this to the bug:

curl -k -u admin:admin "https://localhost:8443/candlepin/consumers/8f0a5331-bb1f-4a23-bc26-ebcf03f50a48"

(switching the UUID for your guest UUID)

For completeness, could you do the same for the host as well please.
Comment 6 Carter Kozak 2013-09-20 11:24:10 EDT
Are you sure the host machine is still subscribed to Awesome OS Instance Based?  If not, there will be no virtual pools.  In the latest test, there don't appear to be any virtual pools available, so you wouldn't get a virtual pool attached, this seems correct.
Comment 7 Shwetha Kallesh 2013-09-23 04:30:52 EDT
Created attachment 801542 [details]
Guest and host details

Devan,

Please find details in attachment.

version on guest:
[root@rhel65 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.27-1
subscription-manager: 1.10.2-1.git.38.20a82f5.el6
python-rhsm: 1.10.2-1.git.4.3048ab5.el6


Version on host:
[root@shwethahostname ~]# subscription-manager version
server type: RHN Classic and Red Hat Subscription Management
subscription management server: 0.8.27-1
subscription-manager: 1.10.2-1.git.38.20a82f5.el6
python-rhsm: 1.10.2-1.git.4.3048ab5.el6
Comment 8 Shwetha Kallesh 2013-09-23 04:33:34 EDT
Carter,yes the host machine is still registered and subscribed to Awesome OS Instance Based
Comment 9 Michael Stead 2013-09-23 11:11:42 EDT
Looking at the consumer data provided in comment 7, it appears that the guest is registered with a different owner that the host. This would explain why the virtual subscription is not available to the guest, and would explain some of the quantity issues reported.

Please re-test again and ensure that the guest is registered in firstboot with the same org/owner as the host.
Comment 10 Shwetha Kallesh 2013-09-24 03:27:40 EDT
It works fine when registered with same owner.
Comment 11 Michael Stead 2013-09-24 07:21:33 EDT
In that case I am closing as not a bug as the virtual subscription should not be available outside of the host's consumer and this appears to be working as expected.

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