Bug 578146 - Traceback error while subscribe for invalid poolid and product
Summary: Traceback error while subscribe for invalid poolid and product
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Jesus M. Rodriguez
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: ent2
TreeView+ depends on / blocked
 
Reported: 2010-03-30 12:09 UTC by spandey
Modified: 2017-11-06 16:01 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-11-06 16:01:37 UTC
Embargoed:


Attachments (Terms of Use)

Description spandey 2010-03-30 12:09:25 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
100%

Prerequisites 
Properly configured candlepin Host
subscription manager rpm version 26

Steps to Repro :

Login to Rhel6 client with valid credentials.
Installed subscription manager RPM and edited rhsm.conf for candlepin Host
Register host to candlepin server
Subscribe for product using poolid using following command 

subscription-manager-cli subscribe –pool=100

Expected Result : 
Message should display for invalid Pool id or invalid product 

Actual Result : 
root@sachrhel6 product]# subscription-manager-cli subscribe --pool=100

Traceback (most recent call last):

  File "/usr/sbin/subscription-manager-cli", line 69, in <module>

    sys.exit(abs(main() or 0))

  File "/usr/sbin/subscription-manager-cli", line 60, in main

    return managercli.CLI().main()

  File "/usr/share/rhsm/managercli.py", line 357, in main

    cmd.main()

  File "/usr/share/rhsm/managercli.py", line 76, in main

    self._do_command()

  File "/usr/share/rhsm/managercli.py", line 183, in _do_command

    bundles = self.cp.bindByEntitlementPool(consumer, self.options.pool)

  File "/usr/share/rhsm/connection.py", line 164, in bindByEntitlementPool

    return self.conn.request_post(method)

  File "/usr/share/rhsm/connection.py", line 70, in request_post

    return self._request("POST", method, params)

  File "/usr/share/rhsm/connection.py", line 56, in _request

    self.validateResponse(response)

  File "/usr/share/rhsm/connection.py", line 64, in validateResponse

    raise RestlibException(response.reason)

rhsm.connection.RestlibException: Bad Request

Comment 2 RHEL Program Management 2010-03-30 13:22:16 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 spandey 2010-04-05 06:00:57 UTC
pool id 100 is invalid poolid 

what i think it should display proper error message 

Like invalid pool id 

it displays BAD request with trace back error which should not display .

i mean to say trace back should not display 

please let me know if i am wrong

Comment 6 spandey 2010-04-06 11:37:27 UTC
As per above Pradeep Kilambi comment i am reopening this defect for candlepin server side

Comment 8 James Bowes 2010-05-12 14:14:57 UTC
This is fixed.

Comment 9 spandey 2010-05-20 08:40:12 UTC
Verified with following setup

server : statler.usersys.redhat.com,cert-fte-candelpin.devlab.redhat.com
client : Rhel6
SM version : 60 

Working fine
No trace back has been recorded on console or rhsm.log using repro steps 

Moving defect status from MODIFIED to VERIFIED

Comment 10 John Sefler 2011-05-04 14:41:00 UTC
Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING


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