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 1739697 - Syspurpose commands should display the same message as subscription-manager when there is conflict in system purpose values between server and client
Summary: Syspurpose commands should display the same message as subscription-manager w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.8
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On: 1665022
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-09 19:16 UTC by Chris Snyder
Modified: 2020-03-31 19:41 UTC (History)
7 users (show)

Fixed In Version: subscription-manager-1.24.14-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1665022
Environment:
Last Closed: 2020-03-31 19:40:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1028 0 None None None 2020-03-31 19:41:37 UTC

Comment 3 Shwetha Kallesh 2019-09-11 07:38:36 UTC
[root@hpe-dl360gen8-01 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.7.5-1
subscription management rules: 5.37
subscription-manager: 1.24.17-1.el7


Verification using syspurpose usage command:

[root@hpe-dl360gen8-01 ~]# syspurpose set-role "RHEL Server"; syspurpose set-sla "Premium"; syspurpose set-usage "Production"; syspurpose show
role set to "RHEL Server".
service_level_agreement set to "Premium".
usage set to "Production".
{
  "role": "RHEL Server", 
  "service_level_agreement": "Premium", 
  "usage": "Production"
}

[root@hpe-dl360gen8-01 ~]# cat new_syspurpose 
{
"usage" : "Development"
}

[root@hpe-dl360gen8-01 ~]#  curl -ik -u username:password --request PUT "https://subscription.rhsm.stage.redhat.com:443/subscription/consumers/6ba35d3b-4c3e-4a46-9c0d-5e56a29baa3c" -d @./new_syspurpose --header "Content-Type: application/json"



[root@hpe-dl360gen8-01 ~]# syspurpose set-usage "foo"
Due to a conflicting change made at the server the usage has not been set.
If you'd like to overwrite the server side change please run: syspurpose set usage foo

Verification using subscription-manager usage :

[root@hpe-dl360gen8-01 ~]# syspurpose set-role "RHEL Server"; syspurpose set-sla "Premium"; syspurpose set-usage "Production"; syspurpose show
role set to "RHEL Server".
service_level_agreement set to "Premium".
usage set to "Production".
{
  "role": "RHEL Server", 
  "service_level_agreement": "Premium", 
  "usage": "Production"
}

[root@hpe-dl360gen8-01 ~]#  curl -ik -u username:password --request PUT "https://subscription.rhsm.stage.redhat.com:443/subscription/consumers/6ba35d3b-4c3e-4a46-9c0d-5e56a29baa3c" -d @./new_syspurpose --header "Content-Type: application/json"


[root@hpe-dl360gen8-01 ~]# subscription-manager usage --set "foo Recovery"
Due to a conflicting change made at the server the usage has not been set.
If you'd like to overwrite the server side change please run: subscription-manager usage --set Disaster Recovery

Comment 4 Shwetha Kallesh 2019-09-11 07:50:28 UTC
Adding verification steps for role and service-level too:

[root@hpe-dl360gen8-01 ~]# cat new_syspurpose 
{
"role" : "Development"
}

[root@hpe-dl360gen8-01 ~]#  curl -ik -u username:password --request PUT "https://subscription.rhsm.stage.redhat.com:443/subscription/consumers/6ba35d3b-4c3e-4a46-9c0d-5e56a29baa3c" -d @./new_syspurpose --header "Content-Type: application/json"

[root@hpe-dl360gen8-01 ~]# syspurpose set-role testrole
Due to a conflicting change made at the server the role has not been set.
If you'd like to overwrite the server side change please run: syspurpose set role testrole

[root@hpe-dl360gen8-01 ~]# syspurpose set-role "RHEL Server"; syspurpose set-sla "Premium"; syspurpose set-usage "Production"; syspurpose show
role set to "RHEL Server".
service_level_agreement set to "Premium".
usage set to "Production".
{
  "role": "RHEL Server", 
  "service_level_agreement": "Premium", 
  "usage": "Production"
}
[root@hpe-dl360gen8-01 ~]#  curl -ik -u username:password --request PUT "https://subscription.rhsm.stage.redhat.com:443/subscription/consumers/6ba35d3b-4c3e-4a46-9c0d-5e56a29baa3c" -d @./new_syspurpose --header "Content-Type: application/json"


[root@hpe-dl360gen8-01 ~]# subscription-manager role --set testrole
Due to a conflicting change made at the server the role has not been set.
If you'd like to overwrite the server side change please run: subscription-manager role --set testrole



[root@hpe-dl360gen8-01 ~]# syspurpose set-role "RHEL Server"; syspurpose set-sla "Premium"; syspurpose set-usage "Production"; syspurpose show
role set to "RHEL Server".
service_level_agreement set to "Premium".
usage set to "Production".
{
  "role": "RHEL Server", 
  "service_level_agreement": "Premium", 
  "usage": "Production"
}
[root@hpe-dl360gen8-01 ~]# vi new_syspurpose
[root@hpe-dl360gen8-01 ~]# cat new_syspurpose 
{
"serviceLevel" : "Development"
}
[root@hpe-dl360gen8-01 ~]#  curl -ik -u username:password --request PUT "https://subscription.rhsm.stage.redhat.com:443/subscription/consumers/6ba35d3b-4c3e-4a46-9c0d-5e56a29baa3c" -d @./new_syspurpose --header "Content-Type: application/json"

[root@hpe-dl360gen8-01 ~]# syspurpose set-sla foo
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: syspurpose set service_level_agreement foo


[root@hpe-dl360gen8-01 ~]# syspurpose set-role "RHEL Server"; syspurpose set-sla "Premium"; syspurpose set-usage "Production"; syspurpose show
role set to "RHEL Server".
service_level_agreement set to "Premium".
usage set to "Production".
{
  "role": "RHEL Server", 
  "service_level_agreement": "Premium", 
  "usage": "Production"
}
[root@hpe-dl360gen8-01 ~]#  curl -ik -u username:password --request PUT "https://subscription.rhsm.stage.redhat.com:443/subscription/consumers/6ba35d3b-4c3e-4a46-9c0d-5e56a29baa3c" -d @./new_syspurpose --header "Content-Type: application/json"
HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
x-candlepin-request-uuid: c0a10059-35d7-45ad-a241-0d4f8a41754a
X-Version: 2.7.5-1
Date: Wed, 11 Sep 2019 07:49:34 GMT

[root@hpe-dl360gen8-01 ~]# subscription-manager service-level --set fpp
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 fpp

Comment 6 errata-xmlrpc 2020-03-31 19:40:52 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, 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-2020:1028


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