Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 669198

Summary: Need a cleaner error message when adding a consumer to an invalid group
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: cperry, jconnor, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:09:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    

Description Jay Dobies 2011-01-12 21:01:59 UTC
In the following scenario, foo is a valid consumer but fake-group is not a valid group:

 -> pulp-admin consumergroup add_consumer --consumerid foo --id fake-group
error: operation failed: Traceback (most recent call last):
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/base.py", line 57, in report_error
    return method(self, *args, **kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/webservices/role_check.py", line 131, in check_roles
    result = f(instance, *fargs, **kw)
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/consumergroups.py", line 227, in POST
    return action(id)
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/consumergroups.py", line 169, in add_consumer
    api.add_consumer(id, data)
  File "/home/jdob/code/pulp/src/pulp/server/compat.py", line 38, in _decorator
    return decorator(*args,**kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/auditing.py", line 204, in _audit
    result = method(*args, **kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/api/consumer_group.py", line 100, in add_consumer
    raise PulpException("No Consumer Group with id: %s found" % groupid)
PulpException: u'No Consumer Group with id: fake-group found'

Comment 1 Sayli Karmarkar 2011-01-26 02:11:32 UTC
$ sudo pulp-admin consumergroup add_consumer --id=foobar --consumerid=consumer1
error: operation failed: Consumer group with id: foobar, does not exist

Comment 2 Jay Dobies 2011-01-26 21:27:21 UTC
Fixed in 0.132.

Comment 3 Preethi Thomas 2011-01-31 15:27:41 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.132-1.fc14.noarch
[root@preethi ~]# pulp-admin consumergroup add_consumer --id=foobar --consumerid=consumer1
error: operation failed: Consumer group with id: foobar, does not exist
[root@preethi ~]# pulp-admin consumergroup add_consumer --id=test --consumerid=preethi
error: operation failed: Consumer group with id: test, does not exist

Comment 4 Preethi Thomas 2011-08-16 12:09:21 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:21:55 UTC
Closing with Community Release 15

pulp-0.0.223-4.