| Summary: | subscription-manager cli is no longer autosubscribing the old way (without a service-level set) | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | Devan Goodwin <dgoodwin> |
| Status: | CLOSED WORKSFORME | QA Contact: | IDM QE LIST <seceng-idm-qe-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.3 | CC: | dgoodwin |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-04-17 15:27:29 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: | |
| Bug Depends On: | |||
| Bug Blocks: | 738066 | ||
"" is the correct value for "no service level", it is handled in the rules and when seen, we skip all SLA filtering. This use case is working fine here with the same test data: root@redhat ~) $ subscription-manager register --username=testuser1 --password=password --force --autosubscribe --org=admin The system has been registered with id: 4102abf4-87f1-4139-95c1-1003958d9a5d Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed Working with John to see if we can figure out why it was not working in his case. Re-testing with versions.... [root@jsefler-f14-candlepin candlepin]# git show-ref | grep master 82216d9e5e38fe3d2d62d7d9860cc3d346832919 refs/heads/master 82216d9e5e38fe3d2d62d7d9860cc3d346832919 refs/remotes/origin/master [root@jsefler-r63-server tmp]# rpm -q subscription-manager subscription-manager-0.99.14-1.el6.x86_64 [root@jsefler-r63-server tmp]# subscription-manager register --username testuser1 --password password --org admin --autosubscribe --force --servicelevel Premium The system with UUID 31237897-fde8-4a15-82a1-7f489e6e1256 has been unregistered The system has been registered with id: 70ad6692-3ca5-477c-b51c-35295b05ae4e Service level set to: Premium Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed [root@jsefler-r63-server tmp]# subscription-manager list --consumed | grep "Service Level" Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium [root@jsefler-r63-server tmp]# subscription-manager register --username testuser1 --password password --org admin --autosubscribe --force --servicelevel Standard The system with UUID 70ad6692-3ca5-477c-b51c-35295b05ae4e has been unregistered The system has been registered with id: 4745e3b0-5cbf-46ae-9a1f-eca534c6be94 Service level set to: Standard Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed [root@jsefler-r63-server tmp]# subscription-manager list --consumed | grep "Service Level" Service Level: Standard Service Level: Standard Service Level: Standard Service Level: Standard Service Level: Standard Service Level: Standard [root@jsefler-r63-server tmp]# subscription-manager register --username testuser1 --password password --org admin --autosubscribe --force --servicelevel None The system with UUID 4745e3b0-5cbf-46ae-9a1f-eca534c6be94 has been unregistered The system has been registered with id: 873f892a-2c69-4cf8-89cd-8cbfb6e7e002 Service level set to: None Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed [root@jsefler-r63-server tmp]# subscription-manager list --consumed | grep "Service Level" Service Level: None [root@jsefler-r63-server tmp]# subscription-manager register --username testuser1 --password password --org admin --autosubscribe --force The system with UUID 873f892a-2c69-4cf8-89cd-8cbfb6e7e002 has been unregistered The system has been registered with id: c92af7bd-5696-419b-ad67-408bb0914f8f Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed [root@jsefler-r63-server tmp]# subscription-manager service-level Current service level: [root@jsefler-r63-server tmp]# subscription-manager list --consumed | grep "Service Level" Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium [root@jsefler-r63-server tmp]# subscription-manager register --username testuser1 --password password --org admin --force --autosubscribe The system with UUID c92af7bd-5696-419b-ad67-408bb0914f8f has been unregistered The system has been registered with id: e3db9341-194f-46d3-8630-26288c1c9ece Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed [root@jsefler-r63-server tmp]# subscription-manager service-level Current service level: [root@jsefler-r63-server tmp]# subscription-manager list --consumed | grep "Service Level" Service Level: None [root@jsefler-r63-server tmp]# subscription-manager register --username testuser1 --password password --org admin --autosubscribe --force The system with UUID e3db9341-194f-46d3-8630-26288c1c9ece has been unregistered The system has been registered with id: 76db1e84-5fe9-4c1e-8e10-c2446a0800a2 Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed [root@jsefler-r63-server tmp]# subscription-manager service-level Current service level: [root@jsefler-r63-server tmp]# subscription-manager list --consumed | grep "Service Level" Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium Service Level: Premium ^^^ VERIFIED: The last three cases above all exercised autosubscribe without specifying a service level and the all successfully consumed an entitlement that provided for the installed product. (interestingly the service level chosen was not always repeated, but that's okay since we did not specify the service level). Moving to CLOSED WORKSFORME - not sure why the comment 0 failure occurred. The subscription-manager version is identical, but I did redeploy the candlepin server. |
Description of problem: Using the cli only, the original autosubscribe behavior (that does not account for service-levels) is no longer working. Version-Release number of selected component (if applicable): [root@jsefler-r63-server ~]# rpm -q subscription-manager subscription-manager-0.99.14-1.el6.x86_64 How reproducible: Steps to Reproduce: [root@jsefler-r63-server ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Not Subscribed Starts: Expires: [root@jsefler-r63-server ~]# subscription-manager register --username testuser1 --password password --org admin --autosubscribe The system has been registered with id: 7553f4dc-55ff-4a47-8c7b-27a71f94ce62 Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Not Subscribed ^^^^ EXPECTED "Subscribed" REGARDLESS OF SERVICE LEVEL. SINCE ONE WAS NOT SET GIVE ME ANY SERVICE LEVEL AS WAS DONE THE OLD WAY. [root@jsefler-r63-server ~]# subscription-manager service-level Current service level: [root@jsefler-r63-server ~]# [root@jsefler-r63-server ~]# curl -k -u testuser1:password --stderr /dev/null https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/7553f4dc-55ff-4a47-8c7b-27a71f94ce62 | python -m simplejson/tool | grep serviceLevel "serviceLevel": "", [root@jsefler-r63-server ~]# ^^^ IT APPEARS THAT serviceLevel IS SET TO "" BY DEFAULT AND THEREFORE DOES NOT MATCH ANY SUBSCRIPTION. THIS IS WHY THE AUTOSUBSCRIBE IS NOT SUCCEEDING. THIS WAS NOT THE CASE A FEW BUILDS AGO WHERE serviceLevel WAS null AND AUTOSUBSCRIBE WORKED THE OLD WAY. [root@jsefler-r63-server ~]# subscription-manager register --username testuser1 --password password --org admin --autosubscribe --servicelevel=Standard --force The system with UUID 7553f4dc-55ff-4a47-8c7b-27a71f94ce62 has been unregistered The system has been registered with id: a8469342-49c6-43bf-96d5-f09f258be198 Service level set to: Standard Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed ^^^ NOTICE THAT AUTO-SUBSCRIBE WORKS, BUT FIRST THE SERVICE LEVEL NEEDS TO BE SET. IS THIS WHAT WE WANT? WHAT IF THERE WAS NO SERVICE LEVEL SET ON THE AVAILABLE SUBSCRIPTIONS, THEN AUTOSUBSCRIBE MAY NOT WORK AT ALL SINCE THE CONSUMER'S DEFAULT SERVICE LEVEL OF "" WOULD NOT MATCH null. What do you think? Should the default serviceLevel attribute on the consumer be null or ""? I think "" better mimics the new GUI behavior while null gives the CLI user the best of the old and new.