Bug 817848 - SAM does not support the DRY RUN API for subscription manager
SAM does not support the DRY RUN API for subscription manager
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.0.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jordan OMara
SAM QE List
:
Depends On:
Blocks: sam11-tracker
  Show dependency treegraph
 
Reported: 2012-05-01 10:56 EDT by Bryan Kearney
Modified: 2014-11-09 17:55 EST (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 11:20:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryan Kearney 2012-05-01 10:56:44 EDT
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 16:54:37 EDT
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 15:15:53 EDT
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 03:22:01 EDT
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 08:51:12 EDT
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 02:48:11 EDT
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 00:46:32 EDT
    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 11:20:27 EDT
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.