Bug 2000326

Summary: Status of installed product is shown as "Not subscribed" when the system is actually "Partially subscribed"
Product: Red Hat Enterprise Linux 8 Reporter: Chris Snyder <csnyder>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.5CC: arpandey, candlepin-bugs, jhnidek, jsefler, redakkan, rhsm-qe
Target Milestone: rcKeywords: Triaged
Target Release: 8.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.25-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1999048 Environment:
Last Closed: 2022-05-10 15:22:57 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:
Bug Depends On: 1999048    
Bug Blocks:    

Description Chris Snyder 2021-09-01 21:23:36 UTC
+++ This bug was initially created as a clone of Bug #1999048 +++

Description of problem:


Version-Release number of selected component (if applicable):
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.20-1
subscription management rules: 5.41
subscription-manager: 1.29.18-2.el9

How reproducible:
always

Steps to Reproduce:
1.Modify the system facts to create a partial subscription scenario

#echo '{"virt.is_guest":"False", "cpu.cpu_socket(s)":"22"}' > /etc/rhsm/facts/custom.facts

2. Register and attach only 4 quantity of the subscription

3.Installed product status  on CLI is displayed correctly , but the install product status on cockpit was show as "Not subscribed" ( PFA: notsubscribed.png) 

# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Red Hat Enterprise Linux Server, Standard (Physical or Virtual Nodes):
- Only supports 4 of 22 sockets.

System Purpose Status: Not Specified

# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        9.0
Arch:           x86_64
Status:         Partially Subscribed
Status Details: Only supports 4 of 22 sockets.
Starts:         08/05/2021
Ends:           08/04/2022


Actual results:
Installed product status in cockpit is shown as 'Not subscribed (Not supported by a valid subscription)' 


Expected results:
It should be 'Partially Subscribed'

Additional info:

Comment 3 Archana Pandey 2021-12-13 08:26:14 UTC
Pre-verification:  

reproducer : on subscription-manager-1.28.24-1.el8.x86_64

Steps to Reproduce: subscription-manager-1.28.24-1.el8.x86_64

[root@kvm-08-guest14 ~]# rpm -qa subscription-manager
subscription-manager-1.28.24-1.el8.x86_64
[root@kvm-08-guest14 ~]# 

1. Modify the system facts to create a partial subscription scenario as follow

#echo '{"virt.is_guest":"False", "cpu.cpu_socket(s)":"4"}' > /etc/rhsm/facts/custom.facts


2. Register and attach only 2 quantity of the subscription

Installed product status  on CLI is displayed correctly , but the install product status on cockpit was show as "Not subscribed" ( PFA: attachment 1846016 [details]) 

==================================================================================================================================

Pre-verification steps: verifying on subscription-manager-1.28.24-1.git.31.ca7fb0c.el8.x86_64

[root@kvm-08-guest14 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.24-1.git.31.ca7fb0c.el8

[root@kvm-08-guest14 ~]# subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        8.6
Arch:           x86_64
Status:         Partially Subscribed
Status Details: Only supports 2 of 4 sockets.
Starts:         12/10/2021
Ends:           12/09/2022

[root@kvm-08-guest14 ~]# 
[root@kvm-08-guest14 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Red Hat Enterprise Linux Server, Standard (Physical or Virtual Nodes):
- Only supports 2 of 4 sockets.

System Purpose Status: Not Specified

Actual Results: Installed product status on CLI and cockpit is shown as "Partially Subscribed" ( PFA: attachment 1846017 [details]) 

Expected results: It should be 'Partially Subscribed'

Verification:PASSED

Comment 8 Archana Pandey 2022-01-12 12:52:03 UTC
Final Verification: verifying on subscription-manager-1.28.25-1.el8.x86_64

Beaker Test information:
                         HOSTNAME=ibm-x3650m4-01-vm-05.ibm2.lab.eng.bos.redhat.com
                            JOBID=6180347
                         RECIPEID=11270693
                    RESULT_SERVER=
                           DISTRO=RHEL-8.6.0-20220110.3
                     ARCHITECTURE=x86_64

[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.25-1.el8
[root@ibm-x3650m4-01-vm-05 ~]# 

1. Modify the system facts to create a partial subscription scenario as follow

#echo '{"virt.is_guest":"False", "cpu.cpu_socket(s)":"4"}' > /etc/rhsm/facts/custom.facts


2. Register and attach only 2 quantity of the subscription and check status

[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for x86_64
Product ID:     479
Version:        8.6
Arch:           x86_64
Status:         Partially Subscribed
Status Details: Only supports 2 of 4 sockets.
Starts:         12/02/2021
Ends:           12/01/2022

[root@ibm-x3650m4-01-vm-05 ~]# 
[root@ibm-x3650m4-01-vm-05 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Red Hat Enterprise Linux Server Entry Level, Self-support:
- Only supports 2 of 4 sockets.

System Purpose Status: Not Specified

[root@ibm-x3650m4-01-vm-05 ~]# 
[root@ibm-x3650m4-01-vm-05 ~]# 
[root@ibm-x3650m4-01-vm-05 ~]# rpm -qa --changelog subscription-manager | grep 2000326
- 2000326: Fixed partially subscribed product in Cockpit plugin
[root@ibm-x3650m4-01-vm-05 ~]# 

Actual Results: Installed product status on CLI and cockpit is shown as "Partially Subscribed" (Attachment #1850371 [details]) 

Expected results: It should be 'Partially Subscribed'

Verification:PASSED

Comment 10 errata-xmlrpc 2022-05-10 15:22:57 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 (subscription-manager bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2022:2047