Bug 771666 - catch candlepin message - system already subscribed
Summary: catch candlepin message - system already subscribed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-04 14:37 UTC by Garik Khachikyan
Modified: 2019-09-25 21:08 UTC (History)
3 users (show)

Fixed In Version: katello-0.1.231-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:17:11 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 785139 0 low CLOSED [activation_key update] better message on subscription not found 2021-02-22 00:41:40 UTC

Internal Links: 785139

Description Garik Khachikyan 2012-01-04 14:37:01 UTC
Description of problem:
There is recently displaying the whole Candlepin error stack on the `system subscribe --pool` when the system is already subscribed to that pool.

Version-Release number of selected component (if applicable):
katello-cli-0.1.31-1.fc16.noarch

How reproducible:
always

Steps to Reproduce:
1.subscribe a system to Katello through cli
2.try to resubscribe to the same pool
3.
  
Actual results:
RestClient::Forbidden: Candlepin::Consumer: 403 Forbidden {"displayMessage":"This consumer is already subscribed to the product matching pool with id '8aa2a25f34a8110b0134a8629b52001f'."} (POST /candlepin/consumers/07d0be5f-d996-4c41-a6ae-ba3d7943678c/entitlements?pool=8aa2a25f34a8110b0134a8629b52001f&quantity=1)

Expected results:
Better error back like: This consumer is already subscribed to the product matching pool with id '8aa2a25f34a8110b0134a8629b52001f'

Additional info:

Comment 1 Tomas Strachota 2012-02-10 11:41:08 UTC
Fixed in katello-0.1.231-1.
Better formatting of exception messages coming from subsystems added.

Comment 2 Og Maciel 2012-02-13 18:22:53 UTC
Hi Tomas. Is this the expected behavior?

# subscription-manager register --force --username=mbloomberg --password=*****
The system with UUID d01360f2-6a86-4cbd-a36d-6ebe7349f86e has been unregistered
The system has been registered with id: 152e4bbe-02fd-4d69-bfab-927737f96249 
# subscription-manager register --username=mbloomberg --password=*****
This system is already registered. Use --force to override

Comment 3 Tomas Strachota 2012-02-14 08:32:13 UTC
Hi,
this bug was in katello cli. Following commands test the behavior:

# katello system register --name devsys
Successfully registered System [ devsys ]

# katello system subscribe --name devsys --pool POOL_ID
Successfully subscribed System [ devsys ]

# katello system subscribe --name devsys --pool POOL_ID
This consumer is already subscribed to the product matching pool with id 'POOL_ID'.

Command should print only "displayMessage" part of the hash from the bug description.

Comment 4 Garik Khachikyan 2012-02-15 10:28:35 UTC
# VERIFIED

and the scenario on command#3 gets fixed.

I confirm - a message like: "This consumer is already subscribed to the product matching pool with id 'ff808081357edc0e013580891ece0114'." getting displayed now.

checked against:
---

katello-0.1.237-1.git.7.752d8de.el6.noarch
katello-cli-0.1.54-1.git.79.17c365f.el6.noarch
candlepin-0.5.17-1.el6.noarch
pulp-0.0.265-1.el6.noarch


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