Bug 1650941 - When setting a systems service-level in the installer to "Self Support" the system cannot be registered
Summary: When setting a systems service-level in the installer to "Self Support" the s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 8.0
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1623566
TreeView+ depends on / blocked
 
Reported: 2018-11-17 20:10 UTC by Kyle Walker
Modified: 2019-08-09 14:40 UTC (History)
10 users (show)

Fixed In Version: subscription-manager-1.23.8-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 01:36:25 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1618398 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 1621783 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 1650974 0 urgent CLOSED System Purpose interferes with registration and attaching entitlements 2021-02-22 00:41:40 UTC

Internal Links: 1618398 1621783 1650974

Comment 2 Kyle Walker 2018-11-19 13:39:58 UTC
Description of problem:
 Due to the python3-syspurpose implementation, the Anaconda installer presents "Self Support" as an option for service-level. This leaves the end system unable to be registered. The correct value is "Self-Support" with a hyphen between.

Version-Release number of selected component (if applicable):
 subscription-manager-1.23.8-1.el8

How reproducible:
 Easily

Steps to Reproduce:
1. Install a system using the graphical installer and select "Self Support" from the applicable spoke.
2. Register the system using subscription-manager
3.

Actual results:
 # subscription-manager register --username <username> --password <password>  --auto-attach
 Registering to: subscription.rhsm.redhat.com:443/subscription
 HTTP error (400 - Bad Request): Service level "Self Support" is not available to units of organization <OrgID>.

Expected results:
 # subscription-manager register --username <username> --password <password>  --auto-attach
 Registering to: subscription.rhsm.redhat.com:443/subscription
 The system has been registered with ID: <val>
 The registered system name is: localhost.localdomain
 Installed Product Current Status:
 Product Name: Red Hat Enterprise Linux for x86_64 Beta


Additional info:
 This is defined in:

/etc/rhsm/syspurpose/valid_fields.json 
{
    "role": [
      "Red Hat Enterprise Linux Server",
      "Red Hat Enterprise Linux Workstation",
      "Red Hat Enterprise Linux Compute Node",
      "Red Hat Enterprise Linux Client/Desktop"
    ],
    "service_level_agreement": [
      "Premium",
      "Standard",
      "Self Support"
    ],
    "usage": [
      "Production",
      "Development/Test",
      "Disaster Recovery"
    ]
}

The correct SLAs:

# subscription-manager service-level --list
+-------------------------------------------+
               Available Service Levels
+-------------------------------------------+
Basic Plus
Dev-Professional
None
Premium
Premium Plus
Self-Support
Standard

Comment 12 Craig Donnelly 2018-12-13 22:15:18 UTC
Verified against stage candlepin (the fact that we can register with the wrong service-level) and verified that the latest version of subscription manager provides the proper value now:

[root@unused ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.3.11-1
subscription management rules: 5.30
subscription-manager: 1.23.8-6.el8

[root@unused ~]# cat /etc/rhsm/syspurpose/valid_fields.json 
{
    "role": [
      "Red Hat Enterprise Linux Server",
      "Red Hat Enterprise Linux Workstation",
      "Red Hat Enterprise Linux Compute Node",
      "Red Hat Enterprise Linux Client/Desktop"
    ],
    "service_level_agreement": [
      "Premium",
      "Standard",
      "Self-Support"   <------------------
    ],
    "usage": [
      "Production",
      "Development/Test",
      "Disaster Recovery"
    ]
}
[root@unused ~]# rpm -qf /etc/rhsm/syspurpose/valid_fields.json
python3-syspurpose-1.23.8-6.el8.x86_64

=====

[root@unused ~]# unreg
This system is currently not registered.
[root@unused ~]# syspurpose set-sla "Self Support"  <-------------------
service_level_agreement set to Self Support
Unable to send system purpose to subscription management server
[root@unused ~]# rreg
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 58e88f9c-ee16-4e2a-8b0e-95fba5cf3c17
The registered system name is: unused
[root@unused ~]# cat /etc/rhsm/syspurpose/syspurpose.json 
{
  "service_level_agreement": "Self Support"
}[root@unused ~]# unreg
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
System has been unregistered.
[root@unused ~]# cat /etc/rhsm/syspurpose/syspurpose.json 
{
  "service_level_agreement": "Self Support"
}[root@unused ~]# reg
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: e5d5ab26-b325-417f-995f-81a4589e3e8d
The registered system name is: unused
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64 High Touch Beta
Status:       Subscribed

[root@unused ~]# 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:            11671927
Account:             6113613
Serial:              1751411597980931604
Pool ID:             8a99f9ac672c4400016750cd47690735
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:              11/26/2018
Ends:                11/25/2019
System Type:         Physical


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