Bug 2019746
| Summary: | Fail to get "service_level_agreement" from /etc/rhsm/syspurpose/syspurpose.json after set service-level from satellite | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Pino Toscano <ptoscano> |
| Component: | subscription-manager | Assignee: | candlepin-bugs |
| Status: | CLOSED NOTABUG | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | --- | CC: | jhnidek, jsefler, ptoscano, qianzhan, redakkan, rhsm-qe, yanpliu |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1985845 | Environment: | |
| Last Closed: | 2021-11-15 12:44:49 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: | 1985845 | ||
| Bug Blocks: | |||
|
Description
Pino Toscano
2021-11-03 09:57:45 UTC
Hi Pino,
I can not reproduce this bug on RHEL-8.6.0-20211102.d.3 against Satellite6.10:
[root@dell-r430-26 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.0.9-1
subscription management rules: 5.41
subscription-manager: 1.28.21-3.el8
[root@dell-r430-26 ~]#
1. Register RHEL-8.6.0-20211102.d.3 against Satellite6.10:
[root@dell-r430-26 ~]# subscription-manager register --username=admin --password=admin --org=Default_Organization --environment=Library
Registering to: ent-01-vm-03.lab.eng.nay.redhat.com:443/rhsm
The system has been registered with ID: 6d7aab4f-ce72-49e7-9798-8820ba2e639c
The registered system name is: dell-r430-26.gsslab.rdu2.redhat.com
2. Check the system purpose settings of RHEL-8.6.0-20211102.d.3 system:
[root@ent-01-vm-03 ~]# hammer host list
--|-----------------------------------------|----------------|----------|-------------|-----------------|-------------|-------------------------|---------------------
ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT
--|-----------------------------------------|----------------|----------|-------------|-----------------|-------------|-------------------------|---------------------
3 | dell-r430-26.gsslab.rdu2.redhat.com | RedHat 8.6 | | 10.10.179.195 | 14:18:77:43:21:e0 | Error | Default Organization View | Library
1 | ent-01-vm-03.lab.eng.nay.redhat.com | RedHat 7.9 | | 10.66.147.50 | 52:54:00:70:de:1f | Warning | |
2 | kvm-07-guest09.hv2.lab.eng.bos.redhat.com | RedHat 8.6 | | 10.16.56.140 | 52:54:00:62:30:da | Error | Default Organization View | Library
--|-----------------------------------------|----------------|----------|-------------|-----------------|-------------|-------------------------|---------------------
[root@ent-01-vm-03 ~]# hammer host info --id=3 | grep 'Subscription Information:' -A30
Subscription Information:
Uuid: 6d7aab4f-ce72-49e7-9798-8820ba2e639c
Last Checkin: 2021-11-04 08:18:06 UTC
Release Version:
Autoheal: true
Registered To: ent-01-vm-03.lab.eng.nay.redhat.com
Registered At: 2021-11-04 08:15:26 UTC
System Purpose:
Service Level:
^^^^^^^^^^^^^^^ SLA is not set yet ^^^^^^^
Purpose Usage:
Purpose Role:
Purpose Addons:
Host Collections:
3. Set SLA for the system on Satellite by hammer command:
[root@ent-01-vm-03 ~]# hammer host update --id=3 --service-level=Self-Support
Host updated.
[root@ent-01-vm-03 ~]# hammer host info --id=3 | grep 'Subscription Information:' -A30
Subscription Information:
Uuid: 6d7aab4f-ce72-49e7-9798-8820ba2e639c
Last Checkin: 2021-11-04 08:18:06 UTC
Release Version:
Autoheal: true
Registered To: ent-01-vm-03.lab.eng.nay.redhat.com
Registered At: 2021-11-04 08:15:26 UTC
System Purpose:
Service Level: Self-Support
^^^^^^^^^^^^^^^ correct SLA is shown for the system ^^^^^^^
Purpose Usage:
Purpose Role:
Purpose Addons:
Host Collections:
4. Check the SLA on system itself:
[root@dell-r430-26 ~]# subscription-manager syspurpose service-level --show
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]
Primary Modules:
attach Attach a specified subscription to the registered system
list List subscription and product information for this system
refresh Pull the latest subscription data from the server
register Register this system to the Customer Portal or another subscription management service
release Configure which operating system release to use
remove Remove all or specific subscriptions from this system
status Show status information for this system's subscriptions and products
unregister Unregister this system from the Customer Portal or another subscription management service
Other Modules:
addons Modify or view the addons attribute of the system purpose
auto-attach Set if subscriptions are attached on a schedule (default of daily)
clean Remove all local system and subscription data without affecting the server
config List, set, or remove the configuration parameters in use by this system
environments Display the environments available for a user
facts View or update the detected system information
identity Display the identity certificate for this system or request a new one
import Import certificates which were provided outside of the tool
orgs Display the organizations against which a user can register a system
plugins View and configure with 'subscription-manager plugins'
redeem Attempt to redeem a subscription for a preconfigured system
repo-override Manage custom content repository settings
repos List the repositories which this system is entitled to use
role Modify system purpose role
service-level Manage service levels for this system
subscribe Deprecated, see attach
unsubscribe Deprecated, see remove
usage Manage usage setting for this system
version Print version information
[root@dell-r430-26 ~]# syspurpose show
{ "service_level_agreement": "Self-Support" }
[root@dell-r430-26 ~]# cat /etc/rhsm/syspurpose/syspurpose.json
{ "service_level_agreement": "Self-Support" }
[root@dell-r430-26 ~]#
(In reply to Pino Toscano from comment #0) > Cloning to RHEL 8, as the issue affects RHEL 8 too. > > +++ This bug was initially created as a clone of Bug #1985845 +++ > > > > 2. Set service-level on satellite by hammer > # hammer -u admin -p admin host update --id=64 --purpose-addons="High > Availability" > Host updated. > > > 3.Check service-level on satellite > json.tool > [root@dell-per430-03 ~]# curl -k -u admin:admin > https://intel-waimeabay-hedt-01.ml3.eng.bos.redhat.com:443/rhsm/consumers/ > ec3ca146-17c1-41b2-bf9a-f7a894ca930d | python3 -mjson.tool > % Total % Received % Xferd Average Speed Time Time Time > Current > Dload Upload Total Spent Left Speed > 100 16755 0 16755 0 0 8649 0 --:--:-- 0:00:01 --:--:-- > 8645 > { > "created": "2021-07-26T03:46:56+0000", > "updated": "2021-07-26T03:47:53+0000", > "id": "8a9330a67ab02da9017ae0ec3d3f38cf", > "uuid": "ec3ca146-17c1-41b2-bf9a-f7a894ca930d", > "name": "dell-per430-03.gsslab.pek2.redhat.com", > "username": "foreman_admin", > "entitlementStatus": "invalid", > "serviceLevel": "Self-Support", > "role": "", > "usage": "", > "addOns": [], > In comment 0, set addons by hammer and then check service-level. It seems a mistake. (In reply to qianzhan from comment #1) > Hi Pino, > > I can not reproduce this bug on RHEL-8.6.0-20211102.d.3 against > Satellite6.10: > > [root@dell-r430-26 ~]# subscription-manager version > server type: Red Hat Subscription Management > subscription management server: 4.0.9-1 > subscription management rules: 5.41 > subscription-manager: 1.28.21-3.el8 > [root@dell-r430-26 ~]# > > > 1. Register RHEL-8.6.0-20211102.d.3 against Satellite6.10: > > [root@dell-r430-26 ~]# subscription-manager register --username=admin > --password=admin --org=Default_Organization --environment=Library > Registering to: ent-01-vm-03.lab.eng.nay.redhat.com:443/rhsm > The system has been registered with ID: 6d7aab4f-ce72-49e7-9798-8820ba2e639c > The registered system name is: dell-r430-26.gsslab.rdu2.redhat.com > > 2. Check the system purpose settings of RHEL-8.6.0-20211102.d.3 system: > > [root@ent-01-vm-03 ~]# hammer host list > --|-----------------------------------------|----------------|----------|---- > ---------|-----------------|-------------|-------------------------|--------- > ------------ > ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | GLOBAL STATUS | > CONTENT VIEW | LIFECYCLE ENVIRONMENT > --|-----------------------------------------|----------------|----------|---- > ---------|-----------------|-------------|-------------------------|--------- > ------------ > 3 | dell-r430-26.gsslab.rdu2.redhat.com | RedHat 8.6 | | 10.10.179.195 | > 14:18:77:43:21:e0 | Error | Default Organization View | Library > 1 | ent-01-vm-03.lab.eng.nay.redhat.com | RedHat 7.9 | | 10.66.147.50 | > 52:54:00:70:de:1f | Warning | | > 2 | kvm-07-guest09.hv2.lab.eng.bos.redhat.com | RedHat 8.6 | | 10.16.56.140 > | 52:54:00:62:30:da | Error | Default Organization View | Library > --|-----------------------------------------|----------------|----------|---- > ---------|-----------------|-------------|-------------------------|--------- > ------------ > > > [root@ent-01-vm-03 ~]# hammer host info --id=3 | grep 'Subscription > Information:' -A30 > Subscription Information: > Uuid: 6d7aab4f-ce72-49e7-9798-8820ba2e639c > Last Checkin: 2021-11-04 08:18:06 UTC > Release Version: > Autoheal: true > Registered To: ent-01-vm-03.lab.eng.nay.redhat.com > Registered At: 2021-11-04 08:15:26 UTC > System Purpose: > Service Level: > ^^^^^^^^^^^^^^^ SLA is not set yet ^^^^^^^ > Purpose Usage: > Purpose Role: > Purpose Addons: > Host Collections: > > > 3. Set SLA for the system on Satellite by hammer command: > [root@ent-01-vm-03 ~]# hammer host update --id=3 --service-level=Self-Support > Host updated. > > [root@ent-01-vm-03 ~]# hammer host info --id=3 | grep 'Subscription > Information:' -A30 > Subscription Information: > Uuid: 6d7aab4f-ce72-49e7-9798-8820ba2e639c > Last Checkin: 2021-11-04 08:18:06 UTC > Release Version: > Autoheal: true > Registered To: ent-01-vm-03.lab.eng.nay.redhat.com > Registered At: 2021-11-04 08:15:26 UTC > System Purpose: > Service Level: Self-Support > ^^^^^^^^^^^^^^^ correct SLA is shown for the system ^^^^^^^ > Purpose Usage: > Purpose Role: > Purpose Addons: > Host Collections: > > > 4. Check the SLA on system itself: > [root@dell-r430-26 ~]# subscription-manager syspurpose service-level --show > Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help] > > Primary Modules: > > attach Attach a specified subscription to the registered system > list List subscription and product information for this system > refresh Pull the latest subscription data from the server > register Register this system to the Customer Portal or another subscription > management service > release Configure which operating system release to use > remove Remove all or specific subscriptions from this system > status Show status information for this system's subscriptions and products > unregister Unregister this system from the Customer Portal or another > subscription management service > > Other Modules: > > addons Modify or view the addons attribute of the system purpose > auto-attach Set if subscriptions are attached on a schedule (default of > daily) > clean Remove all local system and subscription data without affecting the > server > config List, set, or remove the configuration parameters in use by this > system > environments Display the environments available for a user > facts View or update the detected system information > identity Display the identity certificate for this system or request a new > one > import Import certificates which were provided outside of the tool > orgs Display the organizations against which a user can register a system > plugins View and configure with 'subscription-manager plugins' > redeem Attempt to redeem a subscription for a preconfigured system > repo-override Manage custom content repository settings > repos List the repositories which this system is entitled to use > role Modify system purpose role > service-level Manage service levels for this system > subscribe Deprecated, see attach > unsubscribe Deprecated, see remove > usage Manage usage setting for this system > version Print version information > > [root@dell-r430-26 ~]# syspurpose show > { "service_level_agreement": "Self-Support" } > > [root@dell-r430-26 ~]# cat /etc/rhsm/syspurpose/syspurpose.json > { "service_level_agreement": "Self-Support" } > > [root@dell-r430-26 ~]# I prefer to move this bug to NOTABUG. Closing as not a bug as this functionality is working fine . |