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 743710 - Subscription manager displays incorrect status for partially subscribed subscription
Summary: Subscription manager displays incorrect status for partially subscribed subsc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: beta
: 6.3
Assignee: William Poteat
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 738066
TreeView+ depends on / blocked
 
Reported: 2011-10-05 19:17 UTC by J.C. Molet
Modified: 2013-01-10 10:56 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:03:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
partial_subscription (79.18 KB, image/png)
2012-03-15 10:40 UTC, Shwetha Kallesh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0804 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2012-06-19 19:51:31 UTC

Description J.C. Molet 2011-10-05 19:17:05 UTC
Description of problem:
When you are subscribed to a non-multi-entitlement subscription partially, your status for that product is green (or valid, when it should be yellow or red.

Version-Release number of selected component (if applicable):
[root@mgmt5 candlepin]# git show
commit 5340dfd5b25440d227ee22940da712516a4989bb
 (this includes new healing feature)

python-rhsm-0.96.13-1.git.0.a237980.el6.noarch
subscription-manager-firstboot-0.96.13-1.git.0.b1b0502.el6.x86_64
subscription-manager-0.96.13-1.git.0.b1b0502.el6.x86_64
subscription-manager-gnome-0.96.13-1.git.0.b1b0502.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.  Populate candlepin with TESTDATA=1
2.  Copy over 27060.pem to your products folder (may be possible with other
products)
3.  Make sure your cpu sockets are 4.  In a /etc/rhsm/facts/override.facts you
can add: {"cpu.cpu_socket(s)":"4", "lscpu.cpu_socket(s)":"4"}
4.  Autosubscribe  (see Bug 743704 )
4a. OR instead of auto-subscribing, import the 'Awesome OS Workstation Bits' subscription  

Actual results:
[root@jmolet-vm0 product]# ls
27060_.pem
[root@jmolet-vm0 product]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:         Awesome OS Workstation Bits
Version:             6.1                      
Arch:                ALL                      
Status:              Not Subscribed           
Starts:                                       
Expires:                                      

[root@jmolet-vm0 product]# cd
[root@jmolet-vm0 ~]# subscription-manager facts --list | grep cpu_socket
cpu.cpu_socket(s): 4
lscpu.cpu_socket(s): 4
[root@jmolet-vm0 ~]# subscription-manager register --user testuser1 --pass
password --org admin
The system has been registered with id: b6aea3ae-e8a1-4eff-8f47-8b75da5cf708 

[root@jmolet-vm0 ~]# subscription-manager list --available | grep Workstation
-A 7
[root@jmolet-vm0 ~]# # ^^^ THIS TELLS ME I SHOULDN'T BE ABLE TO SUBSCRIBE TO
THIS WORKSTATION SUBSCRIPTION, Next command shows it is only a 2 socket sub: 

[root@jmolet-vm0 facts]# curl -k -u admin:admin
https://mgmt5.rhq.lab.eng.bos.redhat.com:8443/candlepin/pools/8a90f88f32d31d280132d31e09830675
| json_reformat | grep sockets -B 1 -A 1

      "productId": "awesomeos-workstation-basic",
      "name": "sockets",
      "value": "2",

[root@jmolet-vm0 ~]# subscription-manager list --available --all | grep
Workstation -A 7
ProductName:        Awesome OS Workstation Basic
ProductId:          awesomeos-workstation-basic
PoolId:             8a90f88f32d31d280132d31e095f0669
Quantity:           10                       
Multi-Entitlement:  No                       
Expires:            10/03/2012               
MachineType:        physical                 

--
ProductName:        Awesome OS Workstation Basic
ProductId:          awesomeos-workstation-basic
PoolId:             8a90f88f32d31d280132d31e09830675
Quantity:           5                        
Multi-Entitlement:  No                       
Expires:            10/03/2012               
MachineType:        physical  
Expected results:

[root@jmolet-vm0 ~]# subscription-manager subscribe --auto
Installed Product Current Status:

ProductName:          Awesome OS Workstation Bits
Status:                Subscribed               

                       ^^^^^^^^^^^ wut?

In the GUI, the icon shows as a green circle, and that your entitlement is fully valid.

Expected results:
The Status should report as partially subscribed, and in the GUI you should get a yellow triangle icon for this product.

Comment 4 Devan Goodwin 2011-11-07 16:32:46 UTC

*** This bug has been marked as a duplicate of bug 740377 ***

Comment 5 Devan Goodwin 2011-12-12 20:07:10 UTC
My mistake, didn't realize this was for a non-multi-entitlement subscription. Not a dupe.

Comment 6 Devan Goodwin 2011-12-13 19:57:13 UTC
It might be worth arguing this should be green.

The concept of you need x entitlements to cover your y sockets is only introduced via stacking, if the subscription *only* has multi-entitle, this is a different situation, originally for things like bulk transfer of entitlements to domains and such.

We definitely do not start comparing socket count to those provided by entitlements unless they are stacked, I'm not sure we should be.

So this situation I think should be green.

But, perhaps we should change the rules server side to flat out reject the entitlement if it's for too few sockets for your system, regardless if multi-entitle is on and how many you asked for. (as it's not a stacked subscription)

Comment 7 William Poteat 2011-12-15 14:24:44 UTC
rejecting this bind will stop us from fulfilling a bind across multiple pools [i.e. 3 from pool A then 3 from pool B]

Comment 9 Shwetha Kallesh 2012-03-15 10:40:07 UTC
Created attachment 570245 [details]
partial_subscription

Comment 10 Shwetha Kallesh 2012-03-15 10:43:59 UTC
Moving to verified

RPM used:
[root@dhcp201-162 facts]# rpm -qa | grep subscription-manager
subscription-manager-0.99.10-1.git.0.e9e8bf7.el6.x86_64
subscription-manager-migration-0.99.10-1.git.0.e9e8bf7.el6.x86_64
subscription-manager-firstboot-0.99.10-1.git.0.e9e8bf7.el6.x86_64
subscription-manager-migration-data-1.12.2-1.git.0.ede4958.el6.noarch
subscription-manager-gnome-0.99.10-1.git.0.e9e8bf7.el6.x86_64
subscription-manager-debuginfo-0.99.9-1.el6.x86_64

[root@dhcp201-162 pki]# subscription-manager import --certificate=/etc/pki/tmp/cert.pem 
Successfully imported certificate cert.pem


[root@dhcp201-162 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Awesome OS Workstation Bits
Version:              	6.1                      
Arch:                 	ALL                      
Status:               	Partially Subscribed     
Starts:               	None                     
Expires:              	None

Comment 12 spandey 2012-03-22 10:26:12 UTC
[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Awesome OS Workstation Bits
Product ID:           	27060                    
Version:              	6.1                      
Arch:                 	ALL                      
Status:               	Partially Subscribed     
Starts:               	                         
Expires:              	
[root@localhost ~]# cat  /etc/pki/entitlement/5354276907180864381.pem >> t1.pem
[root@localhost ~]# cat  /etc/pki/entitlement/5354276907180864381-key.pem >> t1.pem
[root@localhost ~]# subscription-manager unsubscribe --all
[root@localhost ~]# subscription-manager import --certificate=/root/t1.pem 
Successfully imported certificate t1.pem
[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Awesome OS Workstation Bits
Product ID:           	27060                    
Version:              	6.1                      
Arch:                 	ALL                      
Status:               	Partially Subscribed     
Starts:               	                         
Expires:        

Awesome OS Workstation Bits is non multi entitlement cert.

Moving status to verified

Comment 14 errata-xmlrpc 2012-06-20 13:03:37 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.

http://rhn.redhat.com/errata/RHBA-2012-0804.html


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