Bug 669197
| Summary: | Need a cleaner error message when adding an invalid consumer to a group | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Jay Dobies <jason.dobies> |
| Component: | z_other | Assignee: | Sayli Karmarkar <skarmark> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | cperry, jconnor, skarmark |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | Sprint 20 | ||
| 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:11:17 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 | ||
Fixed. $ sudo pulp-admin consumergroup add_consumer --id=foobar --consumerid=consumer1 error: operation failed: Consumer group with id: foobar, does not exist $ sudo pulp-admin consumergroup add_consumer --id=foobar --consumerid=foobar error: operation failed: Consumer with id: foobar, does not exist Fixed in 0.132. fails_qa
Looks like its a fail. See below.
I have consumergroup as my group, but no consumer as test
but the failure message says
error: operation failed: Consumer with id: mygroup, does not exist
instead what it should say is
error: operation failed: Consumer with id: test, does not exist
[root@preethi ~]# pulp-admin consumergroup list
+------------------------------------------+
List of Available Consumer Groups
+------------------------------------------+
Id mygroup
Description None
Consumer ids []
Additional info {}
[root@preethi ~]# pulp-admin consumergroup add_consumer --id=mygroup --consumerid=preethi
Successfully added consumer [preethi] to group [mygroup]
[root@preethi ~]# pulp-admin consumergroup add_consumer --id=mygroup --consumerid=test
error: operation failed: Consumer with id: mygroup, does not exist
Fixed and also changed error message to make it similar to one for non-existing consumer group id. $ sudo pulp-admin consumergroup add_consumer --id=mygroup --consumerid=test error: operation failed: Consumer [test] does not exist Fixed in 0.135. verified [root@preethi ~]# rpm -q pulp pulp-0.0.135-1.fc14.noarch [root@preethi ~]# pulp-admin consumergroup add_consumer --consumerid foobar --id mygroup error: operation failed: Consumer [foobar] does not exist [root@preethi ~]# pulp-admin consumergroup add_consumer --consumerid foobar --id mygroup1 error: operation failed: Consumer Group [mygroup1] does not exist Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |
In the following example, test-group is a valid consumer group but foobar is not a valid consumer. -> pulp-admin consumergroup add_consumer --consumerid foobar --id test-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 103, in add_consumer raise PulpException("No Consumer with id: %s found" % consumerid) PulpException: 'No Consumer with id: foobar found'