Bug 980161

Summary: Requesting a package update on a non-existing consumer results in an unexpected client error
Product: [Retired] Pulp Reporter: Randy Barlow <rbarlow>
Component: rpm-supportAssignee: Michael Hrivnak <mhrivnak>
Status: CLOSED UPSTREAM QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: low    
Version: MasterCC: cduryee, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 21:57:36 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 Randy Barlow 2013-07-01 14:52:24 UTC
$ pulp-admin rpm consumer package update run --consumer-id doesnt_exist --name pulp-server -a
Update task created with id [ 2b5fb1d1-bafa-42b6-bc34-d703d9e57381 ]

This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...


An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

$ tail -n 15 ~/.pulp/admin.log 
2013-07-01 10:50:40,062 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/home/rbarlow/devel/pulp/platform/src/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 974, in run
    exit_code = command_or_section.execute(self.prompt, remaining_args)
  File "/home/rbarlow/devel/pulp/platform/src/pulp/client/extensions/extensions.py", line 224, in execute
    return self.method(*arg_list, **clean_kwargs)
  File "/home/rbarlow/devel/pulp/platform/src/pulp/client/commands/consumer/content.py", line 228, in run
    self.poll([task], kwargs)
  File "/home/rbarlow/devel/pulp/platform/src/pulp/client/commands/polling.py", line 146, in poll
    self.failed(task)
  File "/usr/lib/pulp/admin/extensions/rpm_admin_consumer/package.py", line 259, in failed
    details = task.result['details'][TYPE_ID_RPM]['details']
TypeError: 'NoneType' object has no attribute '__getitem__'

Comment 1 Sayli Karmarkar 2013-07-03 15:59:27 UTC
Jeremy might have filed a duplicate for this. Please check when fixing.

Comment 2 Chris Duryee 2014-11-11 21:41:22 UTC
This works for me on 2.4.3

$ pulp-admin rpm consumer package update run --consumer-id doesnt_exist --name pulp-server                                                    
Consumer [ doesnt_exist ] not found

Marking as MODIFIED so it gets picked up for 2.5.1.

Comment 3 Chris Duryee 2014-12-23 20:52:40 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 4 Preethi Thomas 2015-01-28 15:21:10 UTC
verified
[root@gizmo ~]# pulp-admin rpm consumer package update run --consumer-id doesnt_exist --name pulp-server                                  
Warning: path should have mode 0700 because it may contain sensitive information: /root/.pulp/

Consumer [ doesnt_exist ] not found

[root@gizmo ~]# rpm -qa pulp-serv er
[root@gizmo ~]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el6.noarch
[root@gizmo ~]#

Comment 5 Brian Bouterse 2015-02-28 21:57:36 UTC
Moved to https://pulp.plan.io/issues/362