Bug 999477 - Needs better error handling when trying to install package/group on a consumer that does not exist on the server
Needs better error handling when trying to install package/group on a consume...
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: consumers (Show other bugs)
2.2 Beta
Unspecified Unspecified
low Severity unspecified
: ---
: 2.4.0
Assigned To: Jeff Ortel
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 07:39 EDT by Preethi Thomas
Modified: 2014-08-09 02:57 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-09 02:57:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2013-08-21 07:39:35 EDT
Description of problem:

If you try to install a package or package group on a consumer that does not exist on the server, the error message is misleading


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

[root@hp-dl380pgen8-02-vm-16 ~]# rpm -qa pulp-server
pulp-server-2.2.0-0.27.beta.fc19.noarch
[root@hp-dl380pgen8-02-vm-16 ~]# 

How reproducible:


Steps to Reproduce:
1. Run package or package group install on a consumer-id that does not exist on the server


Actual results:

[root@hp-dl380pgen8-02-vm-16 ~]#  pulp-admin rpm consumer package-group install run  --consumer-id f19-consumer --name birds
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.

[root@hp-dl380pgen8-02-vm-16 ~]# pulp-admin consumer list
+----------------------------------------------------------------------+
                               Consumers
+----------------------------------------------------------------------+

Id:            consumer1
Display Name:  consumer1
Description:   None
Bindings:      
  Confirmed:   rhel6-64
  Unconfirmed: 
Notes:         


Id:            f19-client
Display Name:  F19 client
Description:   F19 consumer
Bindings:      
  Confirmed:   errata, upload, pulp_unittest, zoo
  Unconfirmed: 
Notes:         
  Consumer: f19-client


[root@hp-dl380pgen8-02-vm-16 ~]# 

Expected results:


Additional info:

2013-08-21 07:39:04,504 - 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 974, 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/python2.7/site-packages/pulp/client/commands/consumer/content.py", line 115, in run
    self.poll([task], kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/client/commands/polling.py", line 146, in poll
    self.failed(task)
  File "/usr/lib/pulp/admin/extensions/rpm_admin_consumer/package_group.py", line 139, in failed
    details = task.result['details'][TYPE_ID_PKG_GROUP]['details']
TypeError: 'NoneType' object has no attribute '__getitem__'
Comment 1 Jeff Ortel 2014-05-09 10:52:50 EDT
Fixed by 1082245 which was included in 2.4.0-0.13.beta.
Comment 2 Preethi Thomas 2014-06-04 10:06:39 EDT
verified

[root@hp-dl380pgen8-01 ~]# rpm -qa |grep pulp-consumer
pulp-consumer-client-2.4.0-0.19.beta.fc20.noarch
[root@hp-dl380pgen8-01 ~]# 


[root@hp-dl380pgen8-01 ~]# pulp-admin rpm consumer package-group install run  --consumer-id f19-consumer --name birds
Consumer [ f19-consumer ] not found

[root@hp-dl380pgen8-01 ~]# pulp-admin consumer list
+----------------------------------------------------------------------+
                               Consumers
+----------------------------------------------------------------------+

Id:            kitkat
Display Name:  kitkat
Description:   None
Bindings:      
  Confirmed:   zoo
  Unconfirmed: 
Notes:         


[root@hp-dl380pgen8-01 ~]#
Comment 3 Randy Barlow 2014-08-09 02:57:11 EDT
This has been fixed in Pulp 2.4.0-1.

Note You need to log in before you can comment on or make changes to this bug.