Bug 1652870

Summary: "System Purpose Status" is displayed as "Partial" when all system purpose attributes are ""
Product: Red Hat Enterprise Linux 8 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: Nikos Moumoulidis <nmoumoul>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: blc, csnyder, jsefler, jwboyer, nmoumoul, qianzhan, skallesh
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1678363 (view as bug list) Environment:
Last Closed: 2019-06-14 01:17:46 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: 1660878, 1674415, 1674419    
Bug Blocks:    
Attachments:
Description Flags
should_be_matched_or_None-specified.png
none
should_be_matched.png
none
should_be_mismatched.png none

Description Rehana 2018-11-23 11:18:30 UTC
Description of problem:


Version-Release number of selected component (if applicable):
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.3.10-1
subscription management rules: 5.29
subscription-manager: 1.23.8-1.el8

How reproducible:
Always

Steps to Reproduce:
1. make sure all the system purpose attributes are unset 
# syspurpose show
{
  "usage": "",
  "service_level_agreement": "",
  "role": "",
  "addons": []
}

2.Register and auto-attach subscription 
# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux for ARM 64 High Touch Beta
Product ID:     489
Version:        8.0 HTB
Arch:           aarch64
Status:         Subscribed
Status Details: 
Starts:         Thursday 08 November 2018
Ends:           Thursday 07 November 2019

[root@cav-sabre-cn99xx-01 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux High Touch Beta
Provides:            Red Hat Enterprise Linux for x86_64 High Touch Beta
                     Red Hat Enterprise Linux 7 Workstation High Touch Beta
                     Red Hat Container Images HTB
                     Red Hat Enterprise Linux for IBM z Systems High Touch Beta
                     Red Hat Enterprise Linux for Power, little endian High Touch Beta
                     Red Hat CodeReady Linux Builder for x86_64 High Touch Beta
                     Red Hat Enterprise Linux 7 for HPC Compute Node High Touch Beta
                     Red Hat CodeReady Linux Builder for Power, little endian High Touch Beta
                     Red Hat Enterprise Linux for ARM 64 High Touch Beta
                     Red Hat Enterprise Linux for Real Time High Touch Beta
                     Red Hat Enterprise Linux Atomic Host HTB
                     Red Hat CodeReady Linux Builder for ARM 64 High Touch Beta
                     Red Hat Enterprise Linux High Availability High Touch Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems High Touch Beta
                     Red Hat Enterprise Linux 7 Load Balancer High Touch Beta
                     Red Hat Enterprise Linux Resilient Storage High Touch Beta
                     Red Hat Enterprise Linux for Real Time for NFV High Touch Beta
                     Red Hat Enterprise Linux 7 Desktop High Touch Beta
SKU:                 RH00076
Contract:            11668021
Account:             6151598
Serial:              8370465090188350780
Pool ID:             8a99f9ad66baea7d0166f318bd2308f3
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Self-Support
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Thursday 08 November 2018
Ends:                Thursday 07 November 2019
System Type:         Physical


3.Execute `subscription-manager status`

Actual results:
# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: partial


Expected results:
Notice the system purpose status is displayed as "Partial" , as per the design the valid values for system purpose status are "Matched"/Mismatched/None specified"

Additional info:

Comment 3 Nikos Moumoulidis 2018-12-19 13:38:28 UTC
The change required in subscription-manager for this, is dependent on the CP-side change in https://bugzilla.redhat.com/show_bug.cgi?id=1660878

Comment 4 Nikos Moumoulidis 2019-01-11 10:15:58 UTC
The main change will be implemented in candlepin in the bz mentioned in comment 3.
The change posted for this bz in subscription-manager is to handle & show the superset of all possible statuses (matched, mismatched, not specified, valid, invalid, partial, unknown) for backwards compatibility.

Comment 16 Rehana 2019-02-07 09:56:22 UTC
Reproducing the issues against stage candlepin and earlier version of subscription-manager that did not include the fix for backward compatibility 

subscription management server: 2.3.12-1
subscription management rules: 5.30.1
subscription-manager: 1.23.8-14.el8

Set role on the system and register and auto-attach 

# syspurpose set-role "Red Hat Enterprise Linux Server"
role set to Red Hat Enterprise Linux Server
Unable to send system purpose to subscription management serve


# subscription-manager register --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: *******
Password: 
The system has been registered with ID: 4d8cebe3-ea59-4fbc-8d94-e5657b5c0fc2
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64 High Touch Beta
Status:       Subscribed


# curl -k -u username:password --request GET "https://subscription.rhsm.stage.redhat.com:443/subscription/pools/8a99f9aa6885be6e0168a281a4077772?include=productId&include=productAttributes" | python3 -mjson.tool | grep roles -A3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1011    0  1011    0     0    421      0 --:--:--  0:00:02 --:--:--   421
            "name": "roles",
            "value": "Red Hat Enterprise Linux Server"
        },

[root@kvm-01-guest21 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Current  --Notice the status current 

Remove the subscription and check the status again 

[root@kvm-01-guest21 ~]# subscription-manager remove --all
2 local certificates have been deleted.
2 subscriptions removed at the server.

[root@kvm-01-guest21 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Enterprise Linux for x86_64 High Touch Beta:
- Not supported by a valid subscription.

System Purpose Status: Invalid --> Notice the status as "Invalid"

Unset the role and remove all subscription and check the status 


[root@kvm-01-guest21 ~]# syspurpose unset-role 
role unset
System purpose successfully sent to subscription management server.

[root@kvm-01-guest21 ~]# syspurpose show
{}
System purpose successfully sent to subscription management server.

[root@kvm-01-guest21 ~]# subscription-manager remove --all
2 local certificates have been deleted.
2 subscriptions removed at the server.

[root@kvm-01-guest21 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Enterprise Linux for x86_64 High Touch Beta:
- Not supported by a valid subscription.

System Purpose Status: Current

Comment 17 qianzhan 2019-02-18 07:53:20 UTC
Failed when verifying this bug on RHEL-8.0.0-20190213.0 against Satellite6.5-snapshot15:

subscription-manager-1.23.8-26.el8.x86_64
dnf-plugin-subscription-manager-1.23.8-26.el8.x86_64
subscription-manager-cockpit-1.23.8-26.el8.noarch
python3-subscription-manager-rhsm-1.23.8-26.el8.x86_64
subscription-manager-rhsm-certificates-1.23.8-26.el8.x86_64
tfm-rubygem-katello-3.10.0.20-1.el7sat.noarch
katello-3.10.0-0.6.rc1.el7sat.noarch
candlepin-2.5.8-1.el7.noarch

1. Register the system and auto-attached.

2. Not setting any system purpose values, and check 'subscription-manager status' output on RHEL8.0:

The system purpose status on RHEL8 is 'Unknown'. Please refer attachment 'should_be_matched_or_None-specified.png'

3. Set SLA as self-support(the consumed subscription provides SLA self-support), and check 'subscription-manager status' output on RHEL8.0:
The system purpose status on RHEL8 is 'Unknown'. Please refer attachment 'should_be_matched.png'

4. Set SLA as premium(the consumed subscription provides SLA self-support), and check 'subscription-manager status' output on RHEL8.0:
The system purpose status on RHEL8 is 'Unknown'. Please refer attachment 'should_be_mismatched.png'

So moving this bug to NEW from ON_QA.

Comment 18 qianzhan 2019-02-18 08:00:55 UTC
Created attachment 1535826 [details]
should_be_matched_or_None-specified.png

Comment 19 qianzhan 2019-02-18 08:01:50 UTC
Created attachment 1535827 [details]
should_be_matched.png

Comment 20 qianzhan 2019-02-18 08:02:28 UTC
Created attachment 1535828 [details]
should_be_mismatched.png

Comment 25 Rehana 2019-02-19 10:06:33 UTC
Verifying bug against master :
===========================

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.6.1-1
subscription management rules: 5.32
subscription-manager: 1.23.8-26.el8

Verify the system purpose status against master on the following scenarios 

1) On a unregistered system 

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

System Purpose Status: Unknown

Status should be "Unknown" on a unregistered system --> PASS

2) 
2.a) On a registered system , but NO system purpose values exists and no subscriptions are attached  

# subscription-manager register --username=**** --password=****** --org=admin
Registering to: server.usersys.redhat.com:8443/candlepin
The system has been registered with ID: bdbc5077-395b-4eb2-baf6-0fb68c446166
The registered system name is: kvm-01-guest25.lab.eng.brq.redhat.com

# syspurpose show
{}
System purpose successfully sent to subscription management server.

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

SP Server Bits:
- Not supported by a valid subscription.

System Purpose Status: Not Specified

^^ system purpose status should be "Not specified" when no system purpose values are specified on the system --PASS

2.b ) On a registered system  with subscription attached , but NO system purpose values speified

# subscription-manager register --username=******** --password=**** --org=admin --auto-attach
Registering to: server.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 15048181-b72d-4405-831a-f5f2b7310c04
The registered system name is: kvm-01-guest25.lab.eng.brq.redhat.com
Installed Product Current Status:
Product Name: SP Server Bits
Status:       Subscribed

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

System Purpose Status: Not Specified

[root@kvm-01-guest25 ~]# syspurpose show
{}
System purpose successfully sent to subscription management server.

System purpose status should still be "Not Specified" -- PASS

3.Specify system purpose value , Register the system and then check the status 

[root@kvm-01-guest25 ~]# syspurpose set-sla "Premium"
service_level_agreement set to Premium
Unable to send system purpose to subscription management server
[root@kvm-01-guest25 ~]# syspurpose show
{
  "service_level_agreement": "Premium"
}
Unable to send system purpose to subscription management server

# subscription-manager register --username=*** --password=** --org=admin
Registering to: server-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 581461d7-f808-45e4-9ab8-7c4367455a81
The registered system name is: kvm-01-guest25.lab.eng.brq.redhat.com

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

SP Server Bits:
- Not supported by a valid subscription.

System Purpose Status: Mismatched

^^ system purpose status should be "Mismatched" as there is no subscription attached on system -- > PASS

4. Auto-attach a subscription and verify the status again


# subscription-manager  attach --auto
Installed Product Current Status:
Product Name: SP Server Bits
Status:       Subscribed

# subscription-manager  list --consumed | grep "Service"
Service Level:       Premium
Service Type:        L1-L3

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

System Purpose Status: Matched

^^ status should be "Matched" -- > PASS

5. Now lets try to create a "partial"status by following comment 24 instructions

SLA set to "Standard" ,register and auto-attach

# syspurpose show
{
  "service_level_agreement": "Standard"
}
Unable to send system purpose to subscription management server

# subscription-manager register --username=********* --password=****** --org=admin --auto-attach
Registering to: server-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 4d704aa4-890a-4529-8306-7bde1fa64afb
The registered system name is: kvm-01-guest25.lab.eng.brq.redhat.com
Installed Product Current Status:
Product Name: SP Server Bits
Status:       Subscribed

Product Name: SP Starter Pack Bits
Status:       Subscribed

# subscription-manager  list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   SP Starter Pack (S: Premium, R: SP Starter)
Provides:            SP Starter Pack Bits
                     SP Server Bits
SKU:                 sp-starter-pack
Contract:            0
Account:             12331131231
Serial:              7742507014447815093
Pool ID:             8ac6a33e6905043101690505c290048b
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Tuesday 19 February 2019
Ends:                Wednesday 19 February 2020
System Type:         Physical

^^ premium subscription was attached to provide content for installed products 

Check the status 

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

System Purpose Status: Mismatched

^^ should be mismatched -- PASS

Now manually attach a "Standard" subscription to match the SLA specified on the system

# subscription-manager  list --available | grep -A5 "Service Level:       Standard" -B5
Contract:            1
Pool ID:             8ac6a33e6905043101690505c361049a
Provides Management: Yes
Available:           10
Suggested:           1
Service Level:       Standard
Service Type:        L1-L3
Subscription Type:   Standard
Starts:              Tuesday 19 February 2019
Ends:                Wednesday 19 February 2020
System Type:         Physical
--
# subscription-manager  attach --pool 8ac6a33e6905043101690505c361049a
Successfully attached a subscription for: SP Server Standard (U: Development, R: SP Server)

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

System Purpose Status: Matched

Status should be "Matched", since one of the subscription on the system now satisfies the SLA specified 

# subscription-manager  list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   SP Starter Pack (S: Premium, R: SP Starter)
Provides:            SP Starter Pack Bits
                     SP Server Bits
SKU:                 sp-starter-pack
Contract:            0
Account:             12331131231
Serial:              7742507014447815093
Pool ID:             8ac6a33e6905043101690505c290048b
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Tuesday 19 February 2019
Ends:                Wednesday 19 February 2020
System Type:         Physical

Subscription Name:   SP Server Standard (U: Development, R: SP Server)
Provides:            SP Server Bits
SKU:                 sp-server-dev
Contract:            1
Account:             12331131231
Serial:              4719931855927765107
Pool ID:             8ac6a33e6905043101690505c361049a
Provides Management: Yes
Active:              True
Quantity Used:       1
Service Level:       Standard
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              Tuesday 19 February 2019
Ends:                Wednesday 19 February 2020
System Type:         Physical


6. Try setting system purpose values to "" , and verify the status 

# syspurpose set-role "" ; syspurpose set-sla ""; syspurpose set-usage "" ; syspurpose show ; subscription-manager  status
role set to 
System purpose successfully sent to subscription management server.
service_level_agreement set to 
System purpose successfully sent to subscription management server.
usage set to 
System purpose successfully sent to subscription management server. 
{}                                                                  ---> Notice that system purpose values are not set 
System purpose successfully sent to subscription management server.
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

SP Starter Pack Bits:
- Not supported by a valid subscription.

SP Server Bits:
- Not supported by a valid subscription.

System Purpose Status: Not Specified  

^^ Status should be 'Not Specified' since there are no system purpose values set on the system -- PASS

The Above test scenario's demonstrates that now the "system purpose status " is displaying only the valid values Matched/Mismatched/Not Specified/Unknown when Registered against Master candlepin branch "2.6.1-1" 

subscription management server: 2.6.1-1
subscription management rules: 5.32
subscription-manager: 1.23.8-26.el8

Note : This bug will be moved to Verified when these same scenarios are working against stage , current stage build "2.3.12-1" don't have this bug fix yet.

Comment 26 Shwetha Kallesh 2019-02-28 11:08:54 UTC
[root@intel-shumway-01 ~]# subscription-manager  version
server type: Red Hat Subscription Management
subscription management server: 2.3.14-1
subscription management rules: 5.33
subscription-manager: 1.23.8-32.el8


On a unregistered system :
[root@intel-shumway-01 ~]# subscription-manager unregister
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
System has been unregistered.

[root@intel-shumway-01 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Unknown

System Purpose Status: Unknown

^^ system purpose status is unknown as expected

On a registered system with no subscriptions:
------------------------------------------------------------------------

[root@intel-shumway-01 ~]# subscription-manager register --username syspurpose_test_account
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: c262a121-5f69-40af-8d49-cc4149240937
The registered system name is: intel-shumway-01.khw1.lab.eng.bos.redhat.com
[root@intel-shumway-01 ~]# syspurpose show
{}
System purpose successfully sent to subscription management server.
[root@intel-shumway-01 ~]# subscription-manager  status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Invalid

Red Hat Enterprise Linux for x86_64:
- Not supported by a valid subscription.

System Purpose Status: Not Specified

^^ system purpose status is not specified as expected


On a register system with subscriptions attached to it but no syspurpose values set:
---------------------------------------------------------------------------------------

[root@intel-shumway-01 ~]# syspurpose show
{}
System purpose successfully sent to subscription management server.

[root@intel-shumway-01 ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status:       Subscribed

[root@intel-shumway-01 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Workstation, Premium
Provides:            Red Hat Beta
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Container Images
                     Red Hat Container Images Beta
                     Oracle Java (for RHEL Client)
                     dotNET on RHEL (for RHEL Workstation)
                     Oracle Java (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
                     Red Hat Ansible Engine
SKU:                 RH0923296
Contract:            11843777
Account:             6189191
Serial:              2993545377947992723
Pool ID:             8a99f9ae6885be760168996fcefb19fd
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              01/29/2019
Ends:                01/28/2020
System Type:         Physical

[root@intel-shumway-01 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

^^ not specified is  the system purpose status  as expected

on a registered system with subscriptions not statisfying system purpose values:
-----------------------------------------------------------------------------------

[root@intel-shumway-01 ~]# syspurpose set-role "Red Hat Enterprise Linux Compute Node"
role set to Red Hat Enterprise Linux Compute Node
Unable to send system purpose to subscription management server
[root@intel-shumway-01 ~]#  syspurpose set-sla Standard
service_level_agreement set to Standard
Unable to send system purpose to subscription management server

[root@intel-shumway-01 ~]# subscription-manager register --serverurl subscription.rhsm.stage.redhat.com
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: syspurpose_test_account
Password: 
The system has been registered with ID: 04fc097b-3cd6-4fe2-9757-d618afa11941
The registered system name is: intel-shumway-01.khw1.lab.eng.bos.redhat.com
[root@intel-shumway-01 ~]# subscription-manager list --consumed
No consumed subscription pools were found.
[root@intel-shumway-01 ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status:       Subscribed

[root@intel-shumway-01 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server for HPC Compute Node, Self-support (Physical or Virtual Node)
Provides:            Red Hat Beta
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux for Scientific Computing
                     Oracle Java (for RHEL Compute Node)
                     dotNET on RHEL (for RHEL Compute Node)
                     dotNET on RHEL Beta (for RHEL Compute Node)
                     Red Hat Enterprise Linux for x86_64
SKU:                 RH00559
Contract:            11843793
Account:             6189191
Serial:              4464717569653743891
Pool ID:             8a99f9ae6885be760168996fad6f19ce
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Self-Support
Service Type:        L1-L3
Status Details:      Subscription is current
Subscription Type:   Instance Based
Starts:              01/29/2019
Ends:                01/28/2020
System Type:         Physical

[root@intel-shumway-01 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Mismatched


On a registered system with subscription statisfying system purpose values:
-------------------------------------------------------------------------------

[root@intel-shumway-01 ~]# syspurpose set-role "Red Hat Enterprise Linux Compute Node"
role set to Red Hat Enterprise Linux Compute Node
System purpose successfully sent to subscription management server.
[root@intel-shumway-01 ~]# syspurpose show
{
  "role": "Red Hat Enterprise Linux Compute Node"
}
System purpose successfully sent to subscription management server.

[root@intel-shumway-01 ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status:       Subscribed

[root@intel-shumway-01 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Matched

Now unset the role value and see system purpose status is changed to not-specified:

[root@intel-shumway-01 ~]# syspurpose set-role ""; syspurpose show ; subscription-manager  status
role set to 
System purpose successfully sent to subscription management server.
{}
System purpose successfully sent to subscription management server.
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified
^^ status is not specified and the bug is verified for all the conditions

Comment 27 Shwetha Kallesh 2019-02-28 17:08:05 UTC
Verification for comment 24

[root@ibm-x3650m4-01-vm-13 ~]# syspurpose set-sla Standard
service_level_agreement set to Standard
System purpose successfully sent to subscription management server.
[root@ibm-x3650m4-01-vm-13 ~]# subscription-manager register --force --auto-attach
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID 6ead46b2-0ecd-4ab3-8c52-a68b47bac7cd has been unregistered
All local data removed
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: bd926000-184c-4b75-a9aa-8397e131dcc1
The registered system name is: ibm-x3650m4-01-vm-13.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Red Hat Satellite
Status:       Subscribed

Product Name: Red Hat Enterprise Linux for x86_64
Status:       Subscribed

[root@ibm-x3650m4-01-vm-13 ~]# subscription-manager list --avail --match-installed
Failed to synchronize cache for repo 'rhel-8-for-x86_64-appstream-rpms', ignoring this repo.
Failed to synchronize cache for repo 'rhel-8-for-x86_64-baseos-rpms', ignoring this repo.
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server (Disaster Recovery), Standard (Physical or Virtual Nodes)
Provides:            dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Server)
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Container Images
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Developer Toolset (for RHEL Server)
                     dotNET on RHEL (for RHEL Server)
SKU:                 RH00014
Contract:            11847790
Pool ID:             8a99f9a96885be600168a3df9a880e54
Provides Management: No
Available:           20
Suggested:           1
Service Level:       Standard
Service Type:        L1-L3
Subscription Type:   Instance Based
Starts:              01/31/2019
Ends:                01/30/2020
System Type:         Physical


Subscription Name:   Red Hat Enterprise Linux Workstation, Standard (Up to 4 Guests)
Provides:            dotNET on RHEL (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Workstation)
                     Red Hat CodeReady Linux Builder for x86_64
                     Oracle Java (for RHEL Client)
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Container Images
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL Beta (for RHEL Workstation)
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
SKU:                 RH0981731
Contract:            11847794
Pool ID:             8a99f9ae68a979f20168ab0e52d20cda
Provides Management: No
Available:           10
Suggested:           1
Service Level:       Standard
Service Type:        L1-L3
Subscription Type:   Standard
Starts:              01/31/2019
Ends:                01/30/2020
System Type:         Physical

Subscription Name:   Red Hat Enterprise Linux Workstation, Premium
Provides:            dotNET on RHEL (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Workstation)
                     Red Hat CodeReady Linux Builder for x86_64
                     Oracle Java (for RHEL Client)
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Container Images
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL Beta (for RHEL Workstation)
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
SKU:                 RH0923296
Contract:            11847793
Pool ID:             8a99f9ae68a979f20168ab0e60170ce4
Provides Management: No
Available:           10
Suggested:           1
Service Level:       Premium
Service Type:        L1-L3
Subscription Type:   Standard
Starts:              01/31/2019
Ends:                01/30/2020
System Type:         Physical

Subscription Name:   Red Hat Enterprise Linux Workstation, Premium
Provides:            dotNET on RHEL (for RHEL Workstation)
                     dotNET on RHEL Beta (for RHEL Server)
                     Oracle Java (for RHEL Workstation)
                     Red Hat CodeReady Linux Builder for x86_64
                     Oracle Java (for RHEL Client)
                     Red Hat Ansible Engine
                     Red Hat Container Images Beta
                     Red Hat Container Images
                     Red Hat Beta
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for x86_64
                     dotNET on RHEL Beta (for RHEL Workstation)
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Workstation
SKU:                 RH0923296
Contract:            11847793
Pool ID:             8a99f9ae68a979f20168ab0e61880ce9
Provides Management: No
Available:           8
Suggested:           1
Service Level:       Premium
Service Type:        L1-L3
Subscription Type:   Standard
Starts:              01/31/2019
Ends:                01/30/2020
System Type:         Virtual

[root@ibm-x3650m4-01-vm-13 ~]# subscription-manager attach --pool 8a99f9ae68a979f20168ab0e52d20cda
Failed to synchronize cache for repo 'rhel-8-for-x86_64-appstream-rpms', ignoring this repo.
Failed to synchronize cache for repo 'rhel-8-for-x86_64-baseos-rpms', ignoring this repo.
Successfully attached a subscription for: Red Hat Enterprise Linux Workstation, Standard (Up to 4 Guests)
[root@ibm-x3650m4-01-vm-13 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Matched

[root@ibm-x3650m4-01-vm-13 ~]#