Bug 669210 - Need a cleaner error message when failing to add a key-value pair to a consumer
Summary: Need a cleaner error message when failing to add a key-value pair to a consumer
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-01-12 21:31 UTC by Jay Dobies
Modified: 2015-03-23 01:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:11:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2011-01-12 21:31:39 UTC
$ pulp-admin consumer add_keyvalue --id foo --key jdob --value zombie
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/controllers/consumers.py", line 504, in POST
    return action(id)
  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/consumers.py", line 313, in add_key_value_pair
    consumer_api.add_key_value_pair(id, data['key'], data['value'])
  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.py", line 159, in add_key_value_pair
    'from that group and try again.', key, conflicting_group)
PulpException: u'Given key [jdob] has different value for this consumer because of its membership in group [bar]. You can delete consumer from that group and try again.'

Comment 1 Sayli Karmarkar 2011-03-14 22:53:02 UTC
This seems to be fixed because of jconnor and jmatthews's fixes for server side traceback.  

$ sudo pulp-admin consumer add_keyvalue --id=consumer1 --key=key1 --value=foo

error: operation failed: PulpException: u'Given key [key1] has different value for this consumer because of its membership in group [consumergroup1]. You can delete consumer from that group and try again.'

Comment 2 Preethi Thomas 2011-03-28 14:50:31 UTC
verified


[root@preethi ~]# rpm -q pulp
pulp-0.0.157-1.git.1.1ea502c.fc14.noarch
[root@preethi ~]# pulp-admin consumer add_keyvalue  --id preethi.usersys.redhat.com --key preethi --value consumer-value
error: operation failed: PulpException: u'Given key [preethi] has different value for this consumer because of its membership in group [test-group]. You can delete consumer from that group and try again.'

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

pulp-0.0.223-4.

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

pulp-0.0.223-4.


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