Bug 618736
Summary: | pulp consumer delete does not have any error check for consumer ids | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
Component: | z_other | Assignee: | Sayli Karmarkar <skarmark> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | cperry, pkilambi, skarmark, whayutin |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-16 14:02:56 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: | 641987 |
Description
Preethi Thomas
2010-07-27 15:47:57 UTC
$ sudo pulp -u admin -p admin consumer delete --id=foo Deleted operation failed on Consumer [ foo ] $ tail -f /var/log/pulp/pulptools.log 2010-08-12 09:31:07,668 [ERROR][MainThread] _delete() @ core_consumer.py:244 - Error: 500: "Traceback (most recent call last):\n File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n return method(self, *args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n ret=f(instance, *fargs, **kw)\n File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/consumers.py\", line 144, in DELETE\n api.delete(id=id)\n File \"/usr/lib/python2.6/site-packages/pulp/auditing.py\", line 186, in _audit\n result = method(*args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 74, in delete\n raise PulpException('Consumer \"%s\" does not exist', id)\nPulpException: u'Consumer \"foo\" does not exist'\n" Fails_qa [root@preethi ~]# pulp-admin -u admin -p admin consumer list +-------------------------------------------+ Consumer Information +-------------------------------------------+ Id preethi Description test Subscribed Repos /consumers/preethi/repoids/ Profile http://localhost:8811/consumers/preethi/package_profile/ [root@preethi ~]# pulp-admin -u admin -p admin consumer delete consumer id required. Try --help [root@preethi ~]# pulp-admin -u admin -p admin consumer delete --id=test Deleted operation failed on Consumer [ test ] [root@preethi ~]# pulp-admin -u admin -p admin consumer delete --id=preethi Successfully deleted consumer [preethi] [root@preethi ~]# pulp-admin -u admin -p admin consumer delete --id=preethi Successfully deleted consumer [preethi] [root@preethi ~]# pulp-admin -u admin -p admin consumer delete --id=preethi Successfully deleted consumer [preethi] [root@preethi ~]# pulp-admin -u admin -p admin consumer list +-------------------------------------------+ Consumer Information +-------------------------------------------+ Id preethi Description test Subscribed Repos /consumers/preethi/repoids/ Profile http://localhost:8811/consumers/preethi/package_profile/ Preethi, As you can see, it was because of the bug where consumer delete operation was not deleting consumers from db, which is fixed now. Just now I tried it on my dev box and it works correctly. Moving to QA. verified [root@preethi ~]# pulp-admin -u admin -p admin consumer list +------------------------------------------+ Consumer Information +------------------------------------------+ Id preethi.usersys.redhat.com Description preethi.usersys.redhat.com Subscribed Repos /pulp/api/consumers/preethi.usersys.redhat.com/repoids/ Profile https://preethi:443/pulp/api/consumers/preethi.usersys.redhat.com/package_profile/ Additional info {} Id 10.16.120.215 Description 10.16.120.215 Subscribed Repos /pulp/api/consumers/10.16.120.215/repoids/ Profile https://preethi:443/pulp/api/consumers/10.16.120.215/package_profile/ Additional info {} [root@preethi ~]# pulp-admin -u admin -p admin consumer delete --id=10.16.120.215 Successfully deleted consumer [10.16.120.215] [root@preethi ~]# pulp-admin -u admin -p admin consumer delete --id=10.16.120.215 Deleted operation failed on consumer [ 10.16.120.215 ] [root@preethi ~]# pulp-admin -u admin -p admin consumer list +------------------------------------------+ Consumer Information +------------------------------------------+ Id preethi.usersys.redhat.com Description preethi.usersys.redhat.com Subscribed Repos /pulp/api/consumers/preethi.usersys.redhat.com/repoids/ Profile https://preethi:443/pulp/api/consumers/preethi.usersys.redhat.com/package_profile/ Additional info {} Closing with Community Release 15 pulp-0.0.223-4. |