Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1066593 - rhsm-debug system hits a 500 error getting the subscriptions.json against stage candlepin
Summary: rhsm-debug system hits a 500 error getting the subscriptions.json against sta...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.1
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel71
TreeView+ depends on / blocked
 
Reported: 2014-02-18 16:55 UTC by John Sefler
Modified: 2014-05-01 19:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-01 19:36:28 UTC


Attachments (Terms of Use)

Description John Sefler 2014-02-18 16:55:47 UTC
Description of problem:
When running the rhsm-debug system tool, one of the debugging files collected is subscriptions.json which is retrieved from a candlepin API call to /subscription/owners/{owner}/subscriptions

When run against stage (and probably production), rhsm.log reports a 500 error followed by a WARNING that Server does not allow retrieval of subscriptions by owner.

Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.14-1.git.5.aba8a66.el7
python-rhsm: 1.10.12-1.git.1.c60e119.el7


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager register --serverurl=subscription.rhn.stage.redhat.com:443/subscriptionUsername: rhel7beta
Password: 
The system has been registered with ID: 1f747171-c029-4d71-a378-8900bd1e95e6 
[root@jsefler-7 ~]# rhsm-debug system --no-archive --sos 
Wrote: /tmp/rhsm-debug-system-20140218-884751
[root@jsefler-7 ~]# ls -l /tmp/rhsm-debug-system-20140218-884751/
total 112
-rw-r--r--. 1 root root 10040 Feb 18 11:49 compliance.json
-rw-r--r--. 1 root root 25019 Feb 18 11:49 consumer.json
-rw-r--r--. 1 root root     2 Feb 18 11:49 entitlements.json
-rw-r--r--. 1 root root 62758 Feb 18 11:49 pools.json
-rw-r--r--. 1 root root   214 Feb 18 11:49 version.json
[root@jsefler-7 ~]# 

^^^
EXPECTED: the list of rhsm-debug json files should include subscriptions.json



[root@jsefler-7 ~]# tail -f /var/log/rhsm/rhsm.log
2014-02-18 11:49:53,501 [DEBUG] rhsm-debug @connection.py:450 - Making request: GET /subscription/owners/7074055/subscriptions
2014-02-18 11:49:54,018 [DEBUG] rhsm-debug @connection.py:473 - Response: status=500
2014-02-18 11:49:54,020 [ERROR] rhsm-debug @connection.py:502 - Response: 500
2014-02-18 11:49:54,021 [ERROR] rhsm-debug @connection.py:503 - JSON parsing error: Expecting value: line 1 column 1 (char 0)
2014-02-18 11:49:54,021 [WARNING] rhsm-debug @debug_commands.py:97 - Server does not allow retrieval of subscriptions by owner.

Comment 1 John Sefler 2014-02-18 16:59:56 UTC
This scenario is actually handled gracefully and is probably working as designed. Seeking confirmation from the dev team.  If true, move bug to CLOSED NOTABUG

Comment 2 Bryan Kearney 2014-03-19 20:52:59 UTC
Moving bugs from 7.0 to 7.1

Comment 4 William Poteat 2014-05-01 19:36:28 UTC
Whitelist added for stage.

Proper handling of system that blocks subscription query access.


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