Bug 634283 - Traceback when running consumer update when the consumer doesnot exist
Summary: Traceback when running consumer update when the consumer doesnot exist
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-09-15 17:51 UTC by Preethi Thomas
Modified: 2011-08-16 14:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:20:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2010-09-15 17:51:45 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Preethi Thomas 2010-09-15 17:52:07 UTC

[root@nec-em18 ~]#  pulp-client -u admin -p admin consumer update
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py\", line 51, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 340, in POST\n    return action(id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py\", line 106, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 255, in profile\n    consumer_api.profile_update(id, self.params())\n  File \"/usr/lib/python2.6/site-packages/pulp/server/auditing.py\", line 193, in _audit\n    result = method(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/consumer.py\", line 188, in profile_update\n    raise PulpException('Consumer [%s] not found', id)\nPulpException: u'Consumer [nec-em18.rhts.eng.bos.redhat.com] not found'\n"

Comment 2 Pradeep Kilambi 2010-10-27 19:09:45 UTC
commit b48c223ef625a5d4f700d4b6b01beaa41c03a43f
Author: Pradeep Kilambi <pkilambi>
Date:   Wed Oct 27 15:02:20 2010 -0400

    bz:634283 Adding consumer update to pulp-client


$ sudo pulp-admin -u admin -p admin auth login
User credentials successfully stored at [/home/pkilambi/.pulp]

$ sudo pulp-client consumer update
Successfully updated consumer [test-consumer] profile

Comment 3 Jay Dobies 2010-10-29 16:58:32 UTC
Fixed in 0.77.

Comment 4 Jay Dobies 2010-11-03 19:35:34 UTC
Fixed in build 0.78.

Comment 5 Preethi Thomas 2010-11-04 20:32:49 UTC
fails_qa


[root@preethi ~]# pulp-client -u admin -p admin consumer update
error: operation failed: "Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py\", line 53, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 423, in POST\n    return action(id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py\", line 105, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 329, in profile\n    consumer_api.profile_update(id, self.params())\n  File \"/usr/lib/python2.6/site-packages/pulp/server/auditing.py\", line 195, in _audit\n    result = method(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/consumer.py\", line 357, in profile_update\n    raise PulpException('Consumer [%s] not found', id)\nPulpException: u'Consumer [preethi.usersys.redhat.com] not found'\n"

Comment 6 Pradeep Kilambi 2010-12-22 19:26:53 UTC
commit 6239c681ca04a1ee4c62a2ce41b8c75a03a26fd0
Author: Pradeep Kilambi <pkilambi>
Date:   Wed Dec 22 14:26:48 2010 -0500

    634283 - This commit includes,
    * fix to clean up consumer certificate upon consumer delete
    * raise a message if consumer doesnt exist on consumer update


The issue lies with consumer delete. When consumer was deleted, we were not cleaning up the certificates on the client causing a lookup of non existing consumer for update.

$ sudo pulp-client -u admin -p admin consumer create --id=foo
Successfully created consumer [ foo ]

[pkilambi@localhost pulp]$ sudo pulp-client consumer delete
Successfully deleted consumer [foo]

[pkilambi@localhost pulp]$ sudo ls -l /etc/pki/consumer/
total 0
[pkilambi@localhost pulp]$ sudo pulp-client -u admin -p admin consumer update
warning: this client is not registered; please register to continue
This client is not registered; cannot perform an update

Comment 7 Jay Dobies 2010-12-22 20:56:32 UTC
Fixed in 0.119.

Comment 8 Preethi Thomas 2011-01-04 18:40:04 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.119-1.fc14.noarch


[root@preethi ~]# pulp-admin  consumer list
+------------------------------------------+
            Consumer Information
+------------------------------------------+

Id                      preethi.usersys.redhat.com
Description             None                     
Subscribed Repos        /pulp/api/consumers/preethi.usersys.redhat.com/repoids/
Additional info         {}                       

[root@preethi ~]# pulp-client  consumer delete
Successfully deleted consumer [preethi.usersys.redhat.com]

[root@preethi ~]# pulp-client  consumer update
warning: this client is not registered; please register to continue
This client is not registered; cannot perform an update

Comment 9 Preethi Thomas 2011-08-16 14:20:37 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.