Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1197897

Summary: subscription-manager status is yellow due to 24-hour subscription despite redundant coverage from a green subscription
Product: [Community] Candlepin (Migrated to Jira) Reporter: John Sefler <jsefler>
Component: candlepinAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: wpoteat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-10 17:43:58 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:

Description John Sefler 2015-03-02 23:02:04 UTC
Description of problem:
In the scenario I will present below, I have one installed product from a standalone candlepin with TESTDATA deployed...

1. On a virtual system, I attach an entitlement from an unlimited bonus pool subscription.  This makes my system green (status is "Current" and installed product is Subscribed).

2. Then, although I am already compliant, I attach an entitlement from a 24 hour pool that provides for the same installed engineering product as the subscription in step 1.  This makes my system yellow (status is "Insufficient").  I think this is wrong.  If you run list --installed, it will show that my installed product is fully "Subscribed" which is true, and therefore should not appear in the status report as insufficient.

3. Once I remove the entitlement from the unlimited bonus pool subscription, Then the installed product appears as "Partial" and appears on the status report as insufficient since "Guest has not been reported on any host and is using a temporary unmapped guest subscription."  This is okay.


Overall, it is my opinion that when the same provided product is covered by both a 24-hour entitlement as well as a non-24-hour entitlement, then the list --installed report should show the "Subscribed" status (which it does now) and status should report "Current" (which it does NOTt do now).

In my opinion there is no need to throw a yellow alarm to a user whose provided products are legitimately covered by normal pools simply because a entitlement from a 24-hour pool has been attached.



Version-Release number of selected component (if applicable):
[root@jsefler-f14-candlepin candlepin]# git log | head -1
commit 6721eb1f5a4eb37152a75fbbb11cad0eec3ef0ea   <===== candlepin commit level
[root@jsefler-os6 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.45-1
subscription management rules: 5.14
subscription-manager: 1.14.1-1.el6
python-rhsm: 1.14.1-1.el6


How reproducible:


Steps to Reproduce:
[root@jsefler-os6 ~]# subscription-manager register
Username: testuser1 
Password: 
Organization: admin
The system has been registered with ID: f6ed95cb-55ec-4044-859d-9c9e7e09973a 
[root@jsefler-os6 ~]# 
[root@jsefler-os6 ~]# subscription-manager list --installed 

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Not Subscribed
Status Details: Not supported by a valid subscription.
Starts:         
Ends:    

STEP 1:  attach an entitlement from an unlimited bonus pool subscription

[root@jsefler-os6 ~]# subscription-manager list --available --matches "awesomeos-virt-unlmtd-phys"
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Awesome OS physical with unlimited guests
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-virt-unlmtd-phys
Contract:            4
Pool ID:             8a9087e34bdb9471014bdb95c01c1c60
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Level:       
Service Type:        
Subscription Type:   Standard
Ends:                02/29/2016
System Type:         Virtual

[root@jsefler-os6 ~]# subscription-manager attach --pool 8a9087e34bdb9471014bdb95c01c1c60
Successfully attached a subscription for: Awesome OS physical with unlimited guests
[root@jsefler-os6 ~]# 
[root@jsefler-os6 ~]# subscription-manager list --installed

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Subscribed
Status Details: 
Starts:         03/01/2015
Ends:           02/29/2016

[root@jsefler-os6 ~]# 
[root@jsefler-os6 ~]# subscription-manager status 
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current


NOTICE: Above my installed product is "Subscribed" and the system status is "Current" just as expected.


Step 2:  attach an entitlement from a 24 hour pool



[root@jsefler-os6 ~]# subscription-manager list --available --matches "*datacenter*"
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Awesome OS Virtual Datacenter
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-virt-datacenter
Contract:            5
Pool ID:             8a9087e34bdb9471014bdb95b2171900
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Level:       
Service Type:        
Subscription Type:   Standard
Ends:                02/29/2016
System Type:         Virtual

[root@jsefler-os6 ~]# subscription-manager attach --pool 8a9087e34bdb9471014bdb95b2171900
Successfully attached a subscription for: Awesome OS Virtual Datacenter
[root@jsefler-os6 ~]# 
[root@jsefler-os6 ~]# subscription-manager list --installed

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Subscribed
Status Details: 
Starts:         03/01/2015
Ends:           02/29/2016

[root@jsefler-os6 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Awesome OS Server Bits:
- Guest has not been reported on any host and is using a temporary unmapped guest subscription.


NOTICE: the installed product above is still fully "Subscribed", but the system status is suddenly "Insufficient" due to "Guest has not been reported on any host and is using a temporary unmapped guest subscription.".  That seems like an unnecessary alarm considering that my installed product is "Subscribed".


STEP3:  now remove the first entitlement...

[root@jsefler-os6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Awesome OS physical with unlimited guests
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-virt-unlmtd-phys
Contract:            4
Account:             12331131231
Serial:              1475526050730712161
Pool ID:             8a9087e34bdb9471014bdb95c01c1c60
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              03/01/2015
Ends:                02/29/2016
System Type:         Virtual

Subscription Name:   Awesome OS Virtual Datacenter
Provides:            Awesome OS Server Bits
SKU:                 awesomeos-virt-datacenter
Contract:            5
Account:             12331131231
Serial:              5864682224526230801
Pool ID:             8a9087e34bdb9471014bdb95b2171900
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       
Service Type:        
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              03/01/2015
Ends:                03/03/2015
System Type:         Virtual

[root@jsefler-os6 ~]# subscription-manager remove --serial 1475526050730712161
Serial numbers successfully removed at the server:
   1475526050730712161
1 local certificate has been deleted.
[root@jsefler-os6 ~]# 
[root@jsefler-os6 ~]# subscription-manager list --installed 

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Partially Subscribed
Status Details: Guest has not been reported on any host and is using a temporary unmapped guest subscription.
Starts:         03/01/2015
Ends:           02/29/2016

[root@jsefler-os6 ~]# subscription-manager status 
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Awesome OS Server Bits:
- Guest has not been reported on any host and is using a temporary unmapped guest subscription.


NOTICE: now we have a legitimate reason to be yellow, since the installed product is "Partially Subscribed" due to "Guest has not been reported on any host and is using a temporary unmapped guest subscription."






Actual results:
above

Expected results:
Expected the system status after step 2 to be "Current".

Comment 1 William Poteat 2015-03-10 17:43:58 UTC
In the compliance returned the issue is simply the unmapped guest entitlement.

We used this previously on partial stacks when no product cert existed.

The use of a temp sub = yellow for consumer. Each product is judged individually based on compliance.