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 1661107 - syspurpose can not set service level
Summary: syspurpose can not set service level
Keywords:
Status: CLOSED DUPLICATE of bug 1660224
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-20 06:51 UTC by qianzhan
Modified: 2019-01-14 15:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-14 15:27:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description qianzhan 2018-12-20 06:51:18 UTC
Description of problem:
syspurpose can not set service level

Version-Release number of selected component (if applicable):
python3-subscription-manager-rhsm-1.23.8-11.el8.x86_64
subscription-manager-rhsm-certificates-1.23.8-11.el8.x86_64
dnf-plugin-subscription-manager-1.23.8-11.el8.x86_64
subscription-manager-1.23.8-11.el8.x86_64
katello-3.10.0-0.6.rc1.el7sat.noarch
tfm-rubygem-katello-3.10.0-0.3.rc1.1.el7sat.noarch
candlepin-2.5.8-1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Register RHEL-8.0-20181218.0 against Satellite6.5-snapshot8.0:

[root@dell-r730-001-guest22 ~]# subscription-manager  register
Registering to: ibm-hs22-04.rhts.eng.brq.redhat.com:443/rhsm
Username: admin
Password: 
The system has been registered with ID: ae4dba3f-e1e8-47cb-9896-68a8352a973f
The registered system name is: dell-r730-001-guest22.dsal.lab.eng.rdu2.redhat.com

2. Set SLA by syspurpose command:
1)
[root@dell-r730-001-guest22 ~]# rm -f /etc/rhsm/syspurpose/syspurpose.json

[root@dell-r730-001-guest22 ~]# syspurpose set-sla Premium
service_level_agreement set to Premium
System purpose successfully sent to subscription management server.

[root@dell-r730-001-guest22 ~]# syspurpose show
{}
System purpose successfully sent to subscription management server.

[root@dell-r730-001-guest22 ~]# cat /etc/rhsm/syspurpose/syspurpose.json 
{}

2)
[root@dell-r730-001-guest22 ~]# syspurpose set-role Workstation; syspurpose set-sla Premium; syspurpose set-usage QA
role set to Workstation
System purpose successfully sent to subscription management server.
service_level_agreement set to Premium
System purpose successfully sent to subscription management server.
usage set to QA
System purpose successfully sent to subscription management server.
 
[root@dell-r730-001-guest22 ~]# syspurpose show
{
  "usage": "QA",
  "role": "Workstation"
}
System purpose successfully sent to subscription management server.

[root@dell-r730-001-guest22 ~]# cat /etc/rhsm/syspurpose/syspurpose.json 
{
  "usage": "QA",
  "role": "Workstation"
}
[root@dell-r730-001-guest22 ~]# 


Actual results:
As step 2, after setting SLA by syspurpose, SLA is not stored in syspurpose.json, so 'syspurpose show' can not display SLA.

Expected results:
SLA should be shown by 'syspurpose show' after setting SLA by syspurpose

Additional info:

Comment 1 qianzhan 2018-12-20 07:43:31 UTC
subscription-manager command can not set SLA eigher:

1. Register RHEL-8.0-20181218.0 against Satellite6.5-snapshot8.0:
[root@dell-r730-001-guest22 ~]# subscription-manager  register
Registering to: ibm-hs22-04.rhts.eng.brq.redhat.com:443/rhsm
Username: admin                                                                           
Password: 
The system has been registered with ID: baae20ba-4a14-4713-a0ba-0796803f1750
The registered system name is: dell-r730-001-guest22.dsal.lab.eng.rdu2.redhat.com

2. Set SLA by subscription-manager:
[root@dell-r730-001-guest22 ~]# syspurpose show
{}
System purpose successfully sent to subscription management server.
[root@dell-r730-001-guest22 ~]# subscription-manager service-level --set Self-Support
service_level_agreement set to "Self-Support".
[root@dell-r730-001-guest22 ~]# syspurpose show
{}
System purpose successfully sent to subscription management server.
[root@dell-r730-001-guest22 ~]# subscription-manager service-level --show
Service level preference not set

3. Set SLA by subscription-manager when other system purpose attributes are not empty:
1) Set multiple system purpose attributes:

[root@dell-r730-001-guest22 ~]# syspurpose set-role Workstation; syspurpose set-usage QA
role set to Workstation
System purpose successfully sent to subscription management server.
usage set to QA
System purpose successfully sent to subscription management server.

[root@dell-r730-001-guest22 ~]# syspurpose show
{
  "role": "Workstation",
  "usage": "QA"
}
System purpose successfully sent to subscription management server.

2) Set SLA by subscription-manager:

[root@dell-r730-001-guest22 ~]# subscription-manager service-level --set Self-Support
Due to a conflicting change made at the server the service_level_agreement has not been set.
If you'd like to overwrite the server side change please run: subscription-manager service-level --set Self-Support

[root@dell-r730-001-guest22 ~]# subscription-manager service-level --set Self-Support
Due to a conflicting change made at the server the service_level_agreement has not been set.
If you'd like to overwrite the server side change please run: subscription-manager service-level --set Self-Support

[root@dell-r730-001-guest22 ~]# syspurpose show
{
  "role": "Workstation",
  "usage": "QA"
}
System purpose successfully sent to subscription management server.
[root@dell-r730-001-guest22 ~]# cat /etc/rhsm/syspurpose/syspurpose.json 
{
  "role": "Workstation",
  "usage": "QA"
}


As step 2 and step 3, subscription-manager command can not set SLA.

Comment 2 Craig Donnelly 2018-12-20 20:53:46 UTC
This is actually a dupe of BZ 1660224 -> It is unable to set any attribute that does not already exist inside the cache of syspurpose.
If the attribute is already inside the json file, then it can /update/ the contents of that attrbute, but if the attribute it not present, or unset - you will be unable to continue.

Comment 3 Kevin Howell 2019-01-14 15:27:16 UTC

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


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