Bug 1775361 - system purpose attributes are not set on the system when you register the system with an activation key with auto-attach=true and has all the system purpose attributes set on the key
Summary: system purpose attributes are not set on the system when you register the sys...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 2.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: ojanus
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1784127
TreeView+ depends on / blocked
 
Reported: 2019-11-21 19:26 UTC by Shwetha Kallesh
Modified: 2019-12-17 15:11 UTC (History)
6 users (show)

Fixed In Version: candlepin-2.12.0-1
Clone Of:
: 1784127 (view as bug list)
Environment:
Last Closed: 2019-12-17 15:11:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin candlepin pull 2528 0 None closed 1775361: Syspurpose attributes from AK should have priority over client attributes 2020-09-22 20:56:10 UTC

Internal Links: 1698158

Description Shwetha Kallesh 2019-11-21 19:26:29 UTC
Description of problem:
system purpose attributes are not setl on the system when you register the system with an activation key with auto-attach=true and has all the system purpose attributes set on the key

Version-Release number of selected component (if applicable):
[root@kvm-07-guest09 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.9.18-1
subscription management rules: 5.37
subscription-manager: 1.24.23-1.el7


How reproducible:


Steps to Reproduce:
[root@kvm-07-guest09 ~]# curl --stderr /dev/null --insecure --user stage_auto_syspurpose002:redhat --request POST --data '{"role":"Red Hat Enterprise Linux Server","usage":"Production","name":"Syspurpose_keytest","serviceLevel":"Premium","autoAttach":"true"}' --header 'accept: application/json' --header 'content-type: application/json' http://candlepin.dist.stage.ext.phx2.redhat.com/candlepin/owners/12799378/activation_keys
{"created":"2019-11-21T18:49:58+0000","updated":"2019-11-21T18:49:58+0000","id":"8a99f9a86e8ab468016e8f4cb22d28a2","name":"Syspurpose_keytest","description":null,"owner":{"id":"8a99f9af6dfd1236016dfd1490430000","key":"12799378","displayName":"12799378","href":"/owners/12799378"},"serviceLevel":"Premium","usage":"Production","role":"Red Hat Enterprise Linux Server","addOns":[],"autoAttach":true,"pools":[],"contentOverrides":[],"products":[],"releaseVer":{"releaseVer":null}}[root@kvm-07-guest09 ~]# syspurpose show
{}
[root@kvm-07-guest09 ~]# subscription-manager register --org=12799378 --activationkey=Syspurpose_keytest --force
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID f24e8937-0e30-41b9-8f14-32db61f99f96 has been unregistered
All local data removed
The system has been registered with ID: dfa121a0-5a36-4b91-a95a-1d96ff14a9f9
The registered system name is: kvm-07-guest09.hv2.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64 High Touch Beta
Status:       Subscribed

[root@kvm-07-guest09 ~]# syspurpose show
{}
[root@kvm-07-guest09 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

Actual results:
system purpose attributes are not set on the system which is affecting the system purpose status

Expected results:
system purpose attributes should be set on the system

Additional info:

Comment 1 John Sefler 2019-11-21 20:44:43 UTC
Expected the "serviceLevel":"Premium","usage":"Production","role":"Red Hat Enterprise Linux Server" properties in the activation key to propagate to the system that was registered.


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