Description of problem: Create a consumer request a package profile (GET /pulp/api/v2/consumers/ID/profiles/rpm/) Gets an ISE (Exception below) Version-Release number of selected component (if applicable): pulp-server-0.0.335-1.fc16.noarch How reproducible: always 2012-11-02 16:07:09,034 2607:140552821511936: pulp.server.webservices.middleware.exception:ERROR: exception:63 Unhandled Exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/webservices/middleware/exception.py", line 44, in __call__ return self.app(environ, start_response) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/middleware/postponed.py", line 39, in __call__ return self.app(environ, start_response) File "/usr/lib/python2.7/site-packages/web/application.py", line 278, in wsgi result = self.handle_with_processors() File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 26, in _handle_with_processors return process(self.processors) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in process return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/web/application.py", line 557, in processor return handler() File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in <lambda> return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in process return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/web/application.py", line 572, in processor result = handler() File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in <lambda> return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 25, in process return self.handle() File "/usr/lib/python2.7/site-packages/web/application.py", line 232, in handle return self._delegate(fn, self.fvars, args) File "/usr/lib/python2.7/site-packages/web/application.py", line 413, in _delegate return f() File "/usr/lib/python2.7/site-packages/web/application.py", line 421, in <lambda> f = lambda: self._delegate_sub_application(pat, what) File "/usr/lib/python2.7/site-packages/web/application.py", line 446, in _delegate_sub_application return app.handle_with_processors() File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 26, in _handle_with_processors return process(self.processors) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in process return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/web/application.py", line 557, in processor return handler() File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in <lambda> return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in process return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/web/application.py", line 572, in processor result = handler() File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 23, in <lambda> return p(lambda : process(processors)) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 25, in process return self.handle() File "/usr/lib/python2.7/site-packages/web/application.py", line 232, in handle return self._delegate(fn, self.fvars, args) File "/usr/lib/python2.7/site-packages/web/application.py", line 395, in _delegate return handle_class(f) File "/usr/lib/python2.7/site-packages/web/application.py", line 386, in handle_class return tocall(*args) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 231, in _auth_decorator value = method(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py", line 566, in GET serialized = serialization.consumer.profile(profile) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/serialization/consumer.py", line 27, in profile serialized = dict(profile) TypeError: 'NoneType' object is not iterable
I think it would make sense to return an empty array or a 404 (if it was not created). A 500 doesn't seem correct though.
This is already fixed in the current build. Moving to on_qa. $ curl -u admin:admin -k https://localhost/pulp/api/v2/consumers/consumer2/profiles/rpm/ {"http_request_method": "GET", "exception": null, "error_message": "Missing resource(s): profile_id={'content_type': u'rpm', 'consumer_id': u'consumer2'}", "_href": "/pulp/api/v2/consumers/consumer2/profiles/rpm/", "http_status": 404, "traceback": null, "resources": {"profile_id": {"content_type": "rpm", "consumer_id": "consumer2"}}}
There is no current build for 2.1.0 (i.e. a QE testing build). The build today was for the 2.0.7 release, which this isn't aligned to. I don't remember seeing a commit for this in the pulp-2.0 branch, nor should it be there. Are you sure this is ON_QA?
FYI i just tested this on pulp-server-2.0.6-1.noarch and it seems to return a 404 and not a 500. So i would consider this ON_QA.
(In reply to comment #3) > There is no current build for 2.1.0 (i.e. a QE testing build). The build > today was for the 2.0.7 release, which this isn't aligned to. I don't > remember seeing a commit for this in the pulp-2.0 branch, nor should it be > there. Are you sure this is ON_QA? Ya, it was fixed quite a few days back as a part of other bugfix. I had forgotten to move it to modified at that time. I verified it yesterday with the latest build and moved it to on_qa.
verified [root@pulp-v2-testing ~]# rpm -q pulp-server pulp-server-2.0.7-0.4.beta.noarch [root@pulp-v2-testing ~]# [root@pulp-v2-testing ~]# curl -u admin:admin -k https://localhost/pulp/api/v2/consumers/consumer2/profiles/rpm/ {"http_request_method": "GET", "exception": null, "error_message": "Missing resource(s): profile_id={'content_type': u'rpm', 'consumer_id': u'consumer2'}", "_href": "/pulp/api/v2/consumers/consumer2/profiles/rpm/", "http_status": 404, "traceback": null, "resources": {"profile_id": {"content_type": "rpm", "consumer_id": "consumer2"}}}[root@pulp-v2-testing ~]#
Pulp 2.1 released http://www.pulpproject.org/2013/04/05/pulp-2-1-0-released/