Bug 843882 - error when --reboot is specified with package install on a client
Summary: error when --reboot is specified with package install on a client
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.0.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 38
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-27 15:31 UTC by Preethi Thomas
Modified: 2013-09-09 16:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:07:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2012-07-27 15:31:17 UTC
Description of problem:

error when --reboot is specified with package install on a client
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. register a cosnumer and bind a repo
2.  run pulp-admin consumer package install with --reboot option
3.
  
Actual results:
see the error

Expected results:


Additional info:

From pulp.log
2012-07-27 11:32:33,195 17816:140681004377856: pulp.server.agent.direct.services:INFO: services:161 Task RMI (succeeded)
Succeeded
  sn : 3c5fadf6-9040-4fdd-bfb7-d1704f778070
  origin : b4427289-0200-4063-bad0-09eb30da258f
  user data : 47177bd9-d800-11e1-8b86-525400c5886c
  retval:
{'status': False, 'chgcnt': 1, 'details': {'rpm': {'status': True, 'details': {'resolved': [{'name': 'screen', 'qname': 'screen-4.0.3-16.el6.x86_64', 'epoch': '0', 'version': '4.0.3', 'release': '16.el6', 'arch': 'x86_64', 'repoid': 'rhel6_2'}], 'deps': []}}}, 'reboot': {'scheduled': False, 'details': {'message': "global name 'log' is not defined", 'trace': 'Traceback (most recent call last):\n\n  File "/usr/lib/python2.6/site-packages/pulp/agent/lib/dispatcher.py", line 177, in reboot\n    r = handler.reboot(options)\n\n  File "/usr/lib/pulp/agent/handlers/linux.py", line 33, in reboot\n    log.info(command)\n\nNameError: global name \'log\' is not defined\n'}}}


from admin.log
2012-07-27 11:25:02,156 - ERROR - Client-side exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/client/extensions/core.py", line 470, in run
    Cli.run(self, args)
  File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 790, in run
    exit_code = command_or_section.execute(remaining_args)
  File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 166, in execute
    self.method(*arg_list, **clean_kwargs)
  File "/usr/lib/pulp/admin/extensions/rpm_admin_consumer/pulp_cli.py", line 155, in run
    self.install(id, units, options)
  File "/usr/lib/pulp/admin/extensions/rpm_admin_consumer/pulp_cli.py", line 171, in install
    self.process(id, task)
  File "/usr/lib/pulp/admin/extensions/rpm_admin_consumer/pulp_cli.py", line 64, in process
    self.succeeded(id, task)
  File "/usr/lib/pulp/admin/extensions/rpm_admin_consumer/pulp_cli.py", line 183, in succeeded
    prompt.render_failure_message(details['message'])
KeyError: 'message'

Comment 1 Jeff Ortel 2012-08-02 14:02:54 UTC
Fixed but need to update CLI to report this kind of error properly.

Comment 2 Jeff Ortel 2012-08-02 14:03:15 UTC
build: 0.320.

Comment 3 Preethi Thomas 2012-09-11 13:39:02 UTC
verified
[root@preethi-el6-pulp ~]# rpm -q pulp-rpm-server
pulp-rpm-server-2.0.3-1.el6.noarch
[root@preethi-el6-pulp ~]# 

[root@preethi-el6-pulp ~]# pulp-admin consumer package install -n zsh --consumer-id pulp-client --reboot
Install task created with id [42fd1207-fc16-11e1-98c6-525400c5886c]

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

[/]
Install Succeeded

+----------------------------------------------------------------------+
                               Installed
+----------------------------------------------------------------------+

Name:    zsh
Version: 4.3.10
Arch:    x86_64
Repoid:  rhel6_2


[root@preethi-el6-pulp ~]#

Comment 4 Preethi Thomas 2013-01-09 17:07:07 UTC
Pulp v2.0 released


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