Bug 1188407

Summary: pulp-consumer history --event-type unit_profile_changed causes traceback
Product: [Retired] Pulp Reporter: Brian Bouterse <bmbouter>
Component: consumersAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: pulp-qe-list
Severity: high Docs Contact:
Priority: medium    
Version: 2.6 BetaCC: mhrivnak
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 23:22:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian Bouterse 2015-02-02 19:05:41 UTC
1. Register a consumer
2. Bind that consumer to a repo
3. On the consumer run a yum command and install something
4. Try to list the history for the consumer to see the unit profile that yum reported
5. Observe that you get an error saying "An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/consumer.log."
6. Observe that in ~/.pulp/consumer.log it contains this traceback:

2015-02-02 13:56:41,525 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/home/bmbouter/Documents/pulp/client_lib/pulp/client/extensions/core.py", line 469, in run
    exit_code = Cli.run(self, args)
  File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/home/bmbouter/Documents/pulp/client_lib/pulp/client/extensions/extensions.py", line 211, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/home/bmbouter/Documents/pulp/client_consumer/pulp/client/consumer/cli.py", line 371, in history
    kwargs['start-date'], kwargs['end-date']).response_body
  File "/home/bmbouter/Documents/pulp/bindings/pulp/bindings/consumer.py", line 211, in history
    return self.server.GET(path, queries)
  File "/home/bmbouter/Documents/pulp/bindings/pulp/bindings/server.py", line 92, in GET
    return self._request('GET', path, queries)
  File "/home/bmbouter/Documents/pulp/bindings/pulp/bindings/server.py", line 150, in _request
    self._handle_exceptions(response_code, response_body)
  File "/home/bmbouter/Documents/pulp/bindings/pulp/bindings/server.py", line 191, in _handle_exceptions
    raise code_class_mappings[response_code](response_body)
  File "/home/bmbouter/Documents/pulp/bindings/pulp/bindings/exceptions.py", line 16, in __init__
    self.href = response_body.pop('_href', None)
AttributeError: 'NoneType' object has no attribute 'pop'

I expected it to list a filtered version of the history by event type instead it shows nothing.

Comment 1 Brian Bouterse 2015-02-28 23:22:32 UTC
Moved to https://pulp.plan.io/issues/685