Bug 817848 - SAM does not support the DRY RUN API for subscription manager
Summary: SAM does not support the DRY RUN API for subscription manager
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jordan OMara
QA Contact: SAM QE List
URL:
Whiteboard:
Depends On:
Blocks: sam11-tracker
TreeView+ depends on / blocked
 
Reported: 2012-05-01 14:56 UTC by Bryan Kearney
Modified: 2014-11-09 22:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When registering with RHSM, an error occurs if users do not disable the autosubscribe function. This update allows users to register with RHSM with the autosubscribe function enabled.
Clone Of:
Environment:
Last Closed: 2012-06-20 15:20:27 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1021 0 normal SHIPPED_LIVE Subscription Asset Manager 1.1 bug fix and enhancement update 2012-06-20 15:49:42 UTC

Description Bryan Kearney 2012-05-01 14:56:44 UTC
Using the latest subscription manager from the 0.99.X branch (0.99.15) there is an error when registering without selecting to disable autosubscribe. If you look in the log files you see:

2012-05-01 10:51:32,268 [DEBUG]  @autobind.py:177 - Available service levels: ['SELF-SUPPORT']
2012-05-01 10:51:32,269 [DEBUG]  @connection.py:329 - Making request: GET /sam/api/consumers/605fb31f-129d-4a3b-aa26-b1768a1bcb43/entitlements/dry-run?service_level=SELF-SUPPORT
2012-05-01 10:51:32,329 [DEBUG]  @connection.py:343 - Response status: 404

Comment 1 Jordan OMara 2012-05-08 20:54:37 UTC
Added dry-run to the proxy passthrough
merged in 88c8e6ae4e4e669062c097d1014dd013613dfad1

2012-05-08 16:29:44,919 [DEBUG]  @connection.py:328 - Making request: GET /sam/api/consumers/22385ee8-40c6-4a01-a0d2-4330142bc49c/entitlements/dry-run?service_level=STANDARD
2012-05-08 16:29:45,083 [DEBUG]  @connection.py:342 - Response status: 200

Comment 3 Jordan OMara 2012-05-14 19:15:53 UTC
Verification steps:

Register against > 6.0 candlepin with > 0.99 subscription-manager. 
Watch /var/log/rhsm/rhsm.log and ensure it makes the dry-run request and returns a 200

Comment 5 Tazim Kolhar 2012-05-21 07:22:01 UTC
I have the latest version of katello-headpin-all
[root@dhcp201-159 ~]# rpm -qa | grep katello-headpin
katello-headpin-0.2.9-1.el6_2.noarch
katello-headpin-all-0.2.9-1.el6_2.noarch


however for subscription-manager:
which repo to be used to obtain higher version > 0.99.X ?

[root@hp-dl360g6-01 ~]# rpm -qa | grep subscription-manager
subscription-manager-0.96.17-1.el6.x86_64


Please, provide the link appropriately to verify the bug.

Comment 6 Tom McKay 2012-05-21 12:51:12 UTC
Test this on RHEL 6.3 which has the version of subscription-manager that has the functionality.
Thanks!

Comment 7 Tazim Kolhar 2012-05-22 06:48:11 UTC
VERIFIED with the build :

[root@dhcp201-159 rhsm]# rpm -qa | grep candlepin
katello-glue-candlepin-0.3.1-1.el6_2.noarch
candlepin-0.6.3-1.el6_2.noarch
candlepin-tomcat6-0.6.3-1.el6_2.noarch
candlepin-cert-consumer-dhcp201-159.englab.pnq.redhat.com-1.0-1.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch


[root@dhcp201-209 rhsm]# rpm -qa | grep subscription-managersubscription-manager-0.99.17-1.el6.x86_64


[root@dhcp201-209 rhsm]# subscription-manager register --user admin --password admin --org ACME_Corporation --environment DEV --autosubscribe --servicelevel=SELF-SUPPORT --force 
The system has been registered with id: c2c13eed-6fac-4a5c-9183-9698001824bf 
Service level set to: SELF-SUPPORT
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               


 /var/log/rhsm/rhsm.log file contents :
 
[root@dhcp201-159 rhsm]# tail -20 rhsm.log
2012-05-22 07:57:15,918 [INFO]  @cache.py:154 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2012-05-22 07:57:15,919 [INFO]  @cache.py:169 - No changes.
2012-05-22 07:57:15,963 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-05-22 07:57:15,964 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
2012-05-22 07:57:15,965 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-05-22 07:57:15,966 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-05-22 07:57:15,967 [DEBUG]  @connection.py:209 - Making request: GET /sam/api/consumers/3d6b6e92-30cf-47e7-9617-8c6bb4bfd56c/certificates/serials
2012-05-22 07:57:16,273 [DEBUG]  @connection.py:218 - Response status: 200
2012-05-22 07:57:16,323 [INFO]  @certlib.py:201 - certs updated:
Total updates: 0
Found (local) serial# [6759395246851275683L]
Expected (UEP) serial# [6759395246851275683]
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
Expired (not deleted):
  <NONE>
Expired (deleted):
  <NONE>

Comment 8 sachua 2012-06-14 04:46:32 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When registering with RHSM, an error occurs if users do not disable the autosubscribe function. This update allows users to register with RHSM with the autosubscribe function enabled.

Comment 10 errata-xmlrpc 2012-06-20 15:20:27 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.

http://rhn.redhat.com/errata/RHBA-2012-1021.html


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