Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1738764

Summary: Message "Due to a conflicting change made at the server the role has not been set." appear everytime you unset and set value for role/usage/
Product: Red Hat Enterprise Linux 8 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 8.1CC: cdonnell, csnyder, jhnidek
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.26.5-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:54: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:

Description Rehana 2019-08-08 06:07:51 UTC
Description of problem:


Version-Release number of selected component (if applicable):
always

How reproducible:
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.7.3-1
subscription management rules: 5.37
subscription-manager: 1.25.13-1.el8


Steps to Reproduce:
1.On a registered system 
2.[root@hpe-moonshot-02-c22 ~]# syspurpose show
{}
[root@hpe-moonshot-02-c22 ~]# subscription-manager role --set="RHEL Server"
role set to "RHEL Server".
[root@hpe-moonshot-02-c22 ~]# syspurpose show

{
  "role": "RHEL Server"
}
[root@hpe-moonshot-02-c22 ~]# 
[root@hpe-moonshot-02-c22 ~]# subscription-manager role --unset
role unset.
[root@hpe-moonshot-02-c22 ~]# cat /var/lib/rhsm/cache/syspurpose.json 
{
  "addons": [],
  "service_level_agreement": "",
  "usage": ""
[root@hpe-moonshot-02-c22 ~]# cat /etc/rhsm/syspurpose/syspurpose.json 
{}
[root@hpe-moonshot-02-c22 ~]subscription-manager role --set="RHEL Server"
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 RHEL Server
[root@hpe-moonshot-02-c22 ~]# 



3.the same is observed on usage attribute as well

Actual results:
conflicting message 

Expected results:
No conflicting message 


Additional info:
log
===

2019-08-08 02:05:33,544 [DEBUG] subscription-manager:20188:MainThread @files.py:347 - Successfully read remote syspurpose from server.
2019-08-08 02:05:33,544 [DEBUG] subscription-manager:20188:MainThread @files.py:551 - Attempting a three-way merge...
2019-08-08 02:05:33,544 [DEBUG] subscription-manager:20188:MainThread @files.py:589 - Three way merge: local value was changed for key 'role'.
2019-08-08 02:05:33,546 [DEBUG] subscription-manager:20188:MainThread @connection.py:523 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem
2019-08-08 02:05:33,546 [DEBUG] subscription-manager:20188:MainThread @connection.py:571 - Making request: PUT /subscription/consumers/cd2f0bc5-1950-4d62-9d01-10ac44a7acbe
2019-08-08 02:05:33,981 [DEBUG] subscription-manager:20188:MainThread @connection.py:618 - Response: status=204, requestUuid=3d6af3f6-a262-4ebb-88fe-c3aba7354939, request="PUT /subscription/consumers/cd2f0bc5-1950-4d62-9d01-10ac44a7acbe"
2019-08-08 02:05:33,982 [DEBUG] subscription-manager:20188:MainThread @files.py:384 - Successfully updated remote syspurpose on the server.
2019-08-08 02:05:33,983 [DEBUG] subscription-manager:20188:MainThread @files.py:505 - Successfully updated syspurpose values at '/etc/rhsm/syspurpose/syspurpose.json'.
2019-08-08 02:05:33,984 [DEBUG] subscription-manager:20188:MainThread @files.py:505 - Successfully updated syspurpose values at '/var/lib/rhsm/cache/syspurpose.json'.
2019-08-08 02:05:33,984 [DEBUG] subscription-manager:20188:MainThread @files.py:295 - Successfully synced system purpose.
2019-08-08 02:05:33,984 [DEBUG] subscription-manager:20188:MainThread @repolib.py:174 - The rhsm.auto_enable_yum_plugins is enabled
2019-08-08 02:05:33,986 [DEBUG] subscription-manager:20188:MainThread @repolib.py:150 - dnf plugin: "/etc/dnf/plugins/subscription-manager.conf" already enabled. Nothing to do.
2019-08-08 02:05:33,986 [DEBUG] subscription-manager:20188:MainThread @repolib.py:150 - dnf plugin: "/etc/dnf/plugins/product-id.conf" already enabled. Nothing to do.
2019-08-08 02:05:33,987 [DEBUG] subscription-manager:20188:MainThread @repolib.py:150 - yum plugin: "/etc/yum/pluginconf.d/subscription-manager.conf" already enabled. Nothing to do.
2019-08-08 02:05:33,988 [DEBUG] subscription-manager:20188:MainThread @repolib.py:150 - yum plugin: "/etc/yum/pluginconf.d/product-id.conf" already enabled. Nothing to do.
2019-08-08 02:05:46,344 [DEBUG] subscription-manager:20198:MainThread @https.py:56 - Using standard libs to provide httplib and ssl
2019-08-08 02:05:46,699 [DEBUG] subscription-manager:20198:MainThread @dbus_interface.py:39 - self.has_main_loop=False
2019-08-08 02:05:46,750 [DEBUG] subscription-manager:20198:MainThread @ga_loader.py:91 - ga_loader GaImporterGtk3
2019-08-08 02:05:46,755 [DEBUG] subscription-manager:20198:MainThread @plugins.py:571 - loaded plugin modules: []
2019-08-08 02:05:46,755 [DEBUG] subscription-manager:20198:MainThread @plugins.py:572 - loaded plugins: {}
2019-08-08 02:05:46,756 [DEBUG] subscription-manager:20198:MainThread @identity.py:139 - Loading consumer info from identity certificates.
2019-08-08 02:05:46,761 [DEBUG] subscription-manager:20198:MainThread @connection.py:808 - Environment variable NO_PROXY= will be used
2019-08-08 02:05:46,763 [DEBUG] subscription-manager:20198:MainThread @connection.py:905 - Connection built: host=subscription.rhsm.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2019-08-08 02:05:46,764 [DEBUG] subscription-manager:20198:MainThread @files.py:318 - Successfully read local syspurpose contents.
2019-08-08 02:05:46,764 [DEBUG] subscription-manager:20198:MainThread @files.py:355 - Successfully read cached syspurpose contents.
2019-08-08 02:05:46,784 [DEBUG] subscription-manager:20198:MainThread @files.py:318 - Successfully read local syspurpose contents.
2019-08-08 02:05:46,785 [DEBUG] subscription-manager:20198:MainThread @files.py:355 - Successfully read cached syspurpose contents.
2019-08-08 02:05:46,790 [DEBUG] subscription-manager:20198:MainThread @files.py:318 - Successfully read local syspurpose contents.
2019-08-08 02:05:46,790 [DEBUG] subscription-manager:20198:MainThread @files.py:355 - Successfully read cached syspurpose contents.
2019-08-08 02:05:46,792 [DEBUG] subscription-manager:20198:MainThread @files.py:318 - Successfully read local syspurpose contents.
2019-08-08 02:05:46,792 [DEBUG] subscription-manager:20198:MainThread @files.py:355 - Successfully read cached syspurpose contents.
2019-08-08 02:05:46,793 [DEBUG] subscription-manager:20198:MainThread @managercli.py:492 - X-Correlation-ID: 8e44a392cba24653be824079c35923b2
2019-08-08 02:05:46,793 [DEBUG] subscription-manager:20198:MainThread @managercli.py:381 - Client Versions: {'subscription-manager': '1.25.13-1.el8'}
2019-08-08 02:05:46,794 [DEBUG] subscription-manager:20198:MainThread @connection.py:808 - Environment variable NO_PROXY= will be used
2019-08-08 02:05:46,796 [DEBUG] subscription-manager:20198:MainThread @connection.py:905 - Connection built: host=subscription.rhsm.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2019-08-08 02:05:46,796 [DEBUG] subscription-manager:20198:MainThread @connection.py:808 - Environment variable NO_PROXY= will be used
2019-08-08 02:05:46,798 [DEBUG] subscription-manager:20198:MainThread @connection.py:905 - Connection built: host=subscription.rhsm.stage.redhat.com port=443 handler=/subscription auth=none
2019-08-08 02:05:46,798 [DEBUG] subscription-manager:20198:MainThread @managercli.py:357 - Consumer Identity name=hpe-moonshot-02-c22.hpe1.lab.eng.bos.redhat.com uuid=cd2f0bc5-1950-4d62-9d01-10ac44a7acbe
2019-08-08 02:05:46,801 [DEBUG] subscription-manager:20198:MainThread @connection.py:523 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem
2019-08-08 02:05:46,802 [DEBUG] subscription-manager:20198:MainThread @connection.py:571 - Making request: GET /subscription/status
2019-08-08 02:05:47,167 [DEBUG] subscription-manager:20198:MainThread @connection.py:618 - Response: status=200, request="GET /subscription/status"
2019-08-08 02:05:47,168 [DEBUG] subscription-manager:20198:MainThread @connection.py:950 - Server has the following capabilities: ['instance_multiplier', 'derived_product', 'vcpu', 'cert_v3', 'hypervisors_heartbeat', 'remove_by_pool_id', 'syspurpose', 'storage_band', 'cores', 'hypervisors_async', 'org_level_content_access', 'guest_limit', 'ram', 'batch_bind', 'combined_reporting']
2019-08-08 02:05:47,169 [DEBUG] subscription-manager:20198:MainThread @files.py:481 - Setting value 'RHEL Server' to key 'role'.
2019-08-08 02:05:47,169 [DEBUG] subscription-manager:20198:MainThread @files.py:272 - Attempting to sync syspurpose content...
2019-08-08 02:05:47,170 [DEBUG] subscription-manager:20198:MainThread @connection.py:523 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem
2019-08-08 02:05:47,171 [DEBUG] subscription-manager:20198:MainThread @connection.py:571 - Making request: GET /subscription/status
2019-08-08 02:05:47,531 [DEBUG] subscription-manager:20198:MainThread @connection.py:618 - Response: status=200, request="GET /subscription/status"
2019-08-08 02:05:47,532 [DEBUG] subscription-manager:20198:MainThread @connection.py:950 - Server has the following capabilities: ['instance_multiplier', 'derived_product', 'vcpu', 'cert_v3', 'hypervisors_heartbeat', 'remove_by_pool_id', 'syspurpose', 'storage_band', 'cores', 'hypervisors_async', 'org_level_content_access', 'guest_limit', 'ram', 'batch_bind', 'combined_reporting']
2019-08-08 02:05:47,533 [DEBUG] subscription-manager:20198:MainThread @connection.py:523 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem
2019-08-08 02:05:47,534 [DEBUG] subscription-manager:20198:MainThread @connection.py:571 - Making request: GET /subscription/consumers/cd2f0bc5-1950-4d62-9d01-10ac44a7acbe
2019-08-08 02:05:48,182 [DEBUG] subscription-manager:20198:MainThread @connection.py:618 - Response: status=200, requestUuid=2ecf9f29-0a65-482a-9203-5673b70e6c4e, request="GET /subscription/consumers/cd2f0bc5-1950-4d62-9d01-10ac44a7acbe"
2019-08-08 02:05:48,184 [DEBUG] subscription-manager:20198:MainThread @files.py:347 - Successfully read remote syspurpose from server.
2019-08-08 02:05:48,184 [DEBUG] subscription-manager:20198:MainThread @files.py:551 - Attempting a three-way merge...
2019-08-08 02:05:48,184 [DEBUG] subscription-manager:20198:MainThread @files.py:578 - Three way merge conflict: both local and remote values changed for key 'role'.
2019-08-08 02:05:48,186 [DEBUG] subscription-manager:20198:MainThread @connection.py:523 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem
2019-08-08 02:05:48,186 [DEBUG] subscription-manager:20198:MainThread @connection.py:571 - Making request: PUT /subscription/consumers/cd2f0bc5-1950-4d62-9d01-10ac44a7acbe
2019-08-08 02:05:48,590 [DEBUG] subscription-manager:20198:MainThread @connection.py:618 - Response: status=204, requestUuid=fd60229a-bb28-4df2-b7fe-cf5b89497db8, request="PUT /subscription/consumers/cd2f0bc5-1950-4d62-9d01-10ac44a7acbe"
2019-08-08 02:05:48,591 [DEBUG] subscription-manager:20198:MainThread @files.py:384 - Successfully updated remote syspurpose on the server.
2019-08-08 02:05:48,592 [DEBUG] subscription-manager:20198:MainThread @files.py:505 - Successfully updated syspurpose values at '/etc/rhsm/syspurpose/syspurpose.json'.
2019-08-08 02:05:48,593 [DEBUG] subscription-manager:20198:MainThread @files.py:505 - Successfully updated syspurpose values at '/var/lib/rhsm/cache/syspurpose.json'.
2019-08-08 02:05:48,593 [DEBUG] subscription-manager:20198:MainThread @files.py:295 - Successfully synced system purpose.
^C

Comment 1 Rehana 2019-08-08 07:29:17 UTC
another scenario

[root@hpe-moonshot-02-c22 ~]# subscription-manager unregister
This system is currently not registered.

[root@hpe-moonshot-02-c22 ~]# syspurpose add addons "Resilient storage" 
Added Resilient storage to addons.
addons updated.

[root@hpe-moonshot-02-c22 ~]# syspurpose show
{
  "addons": [
    "Resilient storage"
  ],
  "service_level_agreement": "foo",
  "usage": "Production"
}

[root@hpe-moonshot-02-c22 ~]#  syspurpose add NewList "ListItem"
Added ListItem to NewList.
Due to a conflicting change made at the server the NewList has not been set.
If you'd like to overwrite the server side change please run: syspurpose add-NewList ListItem

[root@hpe-moonshot-02-c22 ~]# syspurpose add NewList "ListItem"
Not adding value ListItem to NewList; it already exists.

[root@hpe-moonshot-02-c22 ~]# syspurpose show
{
  "NewList": [
    "ListItem"
  ],
  "addons": [
    "Resilient storage"
  ],
  "service_level_agreement": "foo",
  "usage": "Production"
}

Comment 3 Jiri Hnidek 2019-10-23 11:01:28 UTC
*** Bug 1740314 has been marked as a duplicate of this bug. ***

Comment 5 Rehana 2020-01-02 13:49:39 UTC
Reproducing the failure on RHEL8.1
===================================

subscription management server: 2.9.18-1
subscription management rules: 5.37
subscription-manager: 1.25.17-1.el8

Scenario 1 from bug description : 

[root@kvm-02-guest08 ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: rhel8_rhsm_testing_1
Password: 
The system has been registered with ID: ac0b3359-edd1-4fa8-bc8c-824adca2cfc8
The registered system name is: kvm-02-guest08.rhts.eng.brq.redhat.com
[root@kvm-02-guest08 ~]# syspurpose unset addons ; syspurpose unset NewList; syspurpose show
addons unset.
NewList unset.
{}
[root@kvm-02-guest08 ~]# subscription-manager role --set="RHEL Server"
role set to "RHEL Server".
[root@kvm-02-guest08 ~]# syspurpose show
{
  "role": "RHEL Server"
}
[root@kvm-02-guest08 ~]# subscription-manager role --unset
role unset.
[root@kvm-02-guest08 ~]# cat /var/lib/rhsm/cache/syspurpose.json 
{
  "addons": [],
  "service_level_agreement": "",
  "usage": ""
}[root@kvm-02-guest08 ~]# cat /etc/rhsm/syspurpose/syspurpose.json
{}[root@kvm-02-guest08 ~]# subscription-manager role --set="RHEL Server"
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 RHEL Server
[root@kvm-02-guest08 ~]# 


Scenario 2 from comment 1

[root@kvm-02-guest08 ~]# syspurpose add addons "Resilient storage" 
Added Resilient storage to addons.
addons updated.
[root@kvm-02-guest08 ~]# syspurpose show
{
  "addons": [
    "Resilient storage"
  ]
}
[root@kvm-02-guest08 ~]# syspurpose add NewList "ListItem"
Added ListItem to NewList.
Due to a conflicting change made at the server the NewList has not been set.
If you'd like to overwrite the server side change please run: syspurpose add-NewList ListItem
[root@kvm-02-guest08 ~]# syspurpose add NewList "ListItem"
Not adding value ListItem to NewList; it already exists.
[root@kvm-02-guest08 ~]# syspurpose show
{
  "NewList": [
    "ListItem"
  ],
  "addons": [
    "Resilient storage"
  ]
}

Comment 6 Rehana 2020-01-02 14:02:44 UTC
Verifying on RHEL82 Beta compose 
===============================
[root@kvm-04-guest20 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.9.19-1
subscription management rules: 5.37
subscription-manager: 1.26.9-1.el8

[root@kvm-04-guest20 ~]# rpm -q subscription-manager --changelog | grep 1738764
- 1738764: Fix issue with syspurpose three-way merge; ENT-1564
[root@kvm-04-guest20 ~]# 

Scenario 1 Verification :
========================

[root@kvm-04-guest20 ~]# subscription-manager register 
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: rhel8_rhsm_testing_1
Password: 
The system has been registered with ID: ac5d3be8-f310-4ecb-9744-2d4ecff2d338
The registered system name is: kvm-04-guest20.hv2.lab.eng.bos.redhat.com
[root@kvm-04-guest20 ~]# syspurpose show
{}
[root@kvm-04-guest20 ~]# subscription-manager role --set="RHEL Server"
role set to "RHEL Server".
[root@kvm-04-guest20 ~]# syspurpose show
{
  "role": "RHEL Server"
}
[root@kvm-04-guest20 ~]# subscription-manager role --unset
role unset.
[root@kvm-04-guest20 ~]# cat /var/lib/rhsm/cache/syspurpose.json 
{
  "addons": [],
  "service_level_agreement": "",
  "usage": ""
}[root@kvm-04-guest20 ~]# cat /etc/rhsm/syspurpose/syspurpose.json
{}[root@kvm-04-guest20 ~]# subscription-manager role --set="RHEL Server"
role set to "RHEL Server".
[root@kvm-04-guest20 ~]# syspurpose show
{
  "role": "RHEL Server"
}
No conflicting message appeared --> Passed 

Scenario 2 Verification :
=======================
[root@kvm-04-guest20 ~]# syspurpose add addons "Resilient storage"
Added Resilient storage to addons.
addons updated.

[root@kvm-04-guest20 ~]# syspurpose show
{
  "addons": [
    "Resilient storage"
  ]
}
[root@kvm-04-guest20 ~]# syspurpose add NewList "ListItem"
Added ListItem to NewList.
NewList updated.

[root@kvm-04-guest20 ~]# syspurpose show
{
  "NewList": [
    "ListItem"
  ],
  "addons": [
    "Resilient storage"
  ]
}

No conflicting message appeared --> Passed. 

Based on the above observations moving the bug to verified.

Comment 8 errata-xmlrpc 2020-04-28 16:54:49 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:1849