The binding code handles the Pulp error format and parses it into an object the client can use. This is great, except when the exception didn't come from Pulp. That should be rare, however it commonly occurs if the server failed to start (which in itself commonly occurs if the user didn't run pulp-manage-db). I kept glossing over this traceback telling people it meant Apache didn't start, but at the end of the day it's pretty ugly that we're not parsing the result. So this bug is to handle situations where the exception didn't come from Pulp. 2012-12-07 10:49:40,249 - ERROR - Client-side exception occurred Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 478, in run exit_code = Cli.run(self, args) File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 921, in run exit_code = command_or_section.execute(self.prompt, remaining_args) File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute return self.method(*arg_list, **clean_kwargs) File "/usr/lib/pulp/admin/extensions/pulp_admin_auth/pulp_cli.py", line 57, in login certificate = self.context.server.actions.login(username, password).response_body File "/usr/lib/python2.7/site-packages/pulp/bindings/actions.py", line 32, in login return self.server.POST(path) File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 90, in POST return self._request('POST', path, body=body, ensure_encoding=ensure_encoding) File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 142, in _request self._handle_exceptions(response_code, response_body) File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 173, in _handle_exceptions raise exceptions.PulpServerException(response_body) File "/usr/lib/python2.7/site-packages/pulp/bindings/exceptions.py", line 28, in __init__ self.href = response_body.pop('_href', None) AttributeError: 'str' object has no attribute 'pop'
Pulp Git Repository: 28e3f29c26c8b885868489832057a49fa6ad25fa To verify, drop your database and restart apache. That should cause it to fail to start and any CLI commands against it will show the new error. Alternatively, move the files in /usr/lib/pulp/plugins/types to /tmp and bounce the server. Again, the server will fail to start because the plugins can't load.
2.0.6-0.13.beta
verified [root@preethi ~]# rpm -q pulp-server pulp-server-2.0.6-0.13.beta.noarch [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# mongo MongoDB shell version: 2.0.2 connecting to: test > use pulp_database switched to db pulp_database > db.dropDatabase() { "dropped" : "pulp_database", "ok" : 1 } > exit bye [root@preethi ~]# service httpd restart Redirecting to /bin/systemctl restart httpd.service [root@preethi ~]# pulp-admin repo list +----------------------------------------------------------------------+ Repositories +----------------------------------------------------------------------+ Authentication Failed The session certificate expired on Dec 7 14:11:59 2012 GMT. Use the login command to begin a new session. [root@preethi ~]# pulp-admin -u admin -p admin repo list +----------------------------------------------------------------------+ Repositories +----------------------------------------------------------------------+ The web server reported an error trying to access the Pulp application. The likely cause is that the pulp-manage-db script has not been run prior to starting the server. More information can be found in Apache's error log file on the server itself. [root@preethi ~]#
*** Bug 882317 has been marked as a duplicate of this bug. ***
Pulp 2.0 released.