Bug 497867 - Provisioning, reboot of client scheduled even if kickstart failed
Provisioning, reboot of client scheduled even if kickstart failed
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: Justin Sherrill
wes hayutin
hhttps://riverraid.rhndev.redhat.com/...
:
Depends On:
Blocks: 457075 486216
  Show dependency treegraph
 
Reported: 2009-04-27 12:25 EDT by wes hayutin
Modified: 2009-10-28 15:29 EDT (History)
4 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-28 15:29:07 EDT
Type: ---
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 wes hayutin 2009-04-27 12:25:47 EDT
Description of problem:

4/24.1 build

recreate.
1. register a rhel 5 system
2. create ks profile
3. ks that system..

kickstart fails, however reboot still scheduled

D: do_call kickstart.initiate ('riverraid.rhndev.redhat.com', 'spacewalk-koan', 'ks=http://riverraid.rhndev.redhat.com/ty/vehPosyX ksdevice=eth0 ', '', 'rlx-3-06.rhndev.redhat.com:1', [])
D: Sending back response ((6,), 'Fatal error in Python code occured', {})
D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>reboot.reboot</methodName>\n<params>\n</params>\n</methodCall>\n", 'version': 2, 'id': 8}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1240863549.2  with expiration of  1240867149.2  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010000, 'X-RHN-Auth-Server-Time': '1240849359.33', 'X-RHN-Auth': '/RXJIbbgNic/wjuFAk+eBA==', 'X-RHN-Auth-Channels': [['rhel-i386-server-5', '20090427101701', '1', '1'], ['rhn-tools-rhel-i386-server-5', '20090427102006', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>reboot.reboot</methodName>\n<params>\n</params>\n</methodCall>\n", 'version': 2, 'id': 8}
D: handle_action actionid = 8, version = 2
D: do_call reboot.reboot ()

Broadcast message from root (pts/0) (Mon Apr 27 16:19:09 2009):

The system is going DOWN for reboot in 3 minutes!
Rebooting the system now
D: Sending back response (0, 'Reboot sucessfully started', {'version': '0'})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status:  (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
[root@rlx-3-06 ~]# shutdown -c
[root@rlx-3-06 ~]# 
Shutdown cancelled.
Comment 1 wes hayutin 2009-04-27 12:26:15 EDT
from the event viewer

System reboot   	 Completed   	 System reboot scheduled by admin   	 04/27/09 12:22:39 PM EDT
System Event 	Failed 	Initiate a kickstart scheduled by admin 	04/27/09 12:22:39 PM EDT
Package Install 	Completed 	Package Install scheduled by admin
Comment 2 Steve Salevan 2009-04-28 12:41:11 EDT
From /var/log/up2date:

[Tue Apr 28 16:34:21 2009] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 276, in __run_action
    (status, message, data) = CheckCli.__do_call(method, params)
  File "/usr/sbin/rhn_check", line 269, in __do_call
    retval = method(*params)
exceptions.TypeError: initiate() takes at most 5 arguments (6 given)
Comment 3 Justin Sherrill 2009-04-29 11:59:23 EDT
ab2bed7

 changing Action.prerequisite from being mapped as a Long to being mapped as an action, so you can easily set the pre-req if you only have a newly created action with no id (becuase it wasn't saved to the DB yet)
Comment 4 Justin Sherrill 2009-04-29 14:15:01 EDT
396e579 - small bug was created from previous commit where cancelling a kickstart would fail, this fixes that.
Comment 5 wes hayutin 2009-05-21 14:40:46 EDT
verified 5/20
Comment 6 Jan Pazdziora 2009-09-11 07:08:41 EDT
Stage validated with Satellite-5.3.0-RHEL5-re20090820.1 and RHN Tools Gold content.

I have manually installed spacewalk-koan and then broke it with this change:

# diff -u /usr/share/rhn/actions/kickstart.py.orig /usr/share/rhn/actions/kickstart.py
--- /usr/share/rhn/actions/kickstart.py.orig	2009-07-16 18:24:12.000000000 -0400
+++ /usr/share/rhn/actions/kickstart.py	2009-09-10 20:11:04.000000000 -0400
@@ -30,4 +30,4 @@
     log = up2dateLog.initLog() 
     log.log_me("initiating spacewalkkoan kickstart")
     return spacewalkkoan.initiate(kickstart_host, base, extra_append=extra_append,
-        static_device=static_device, system_record=system_record, preserve_files=preserve_files)
+        static_device=static_device, system_record=system_record, preserve_files=preserve_files, badparam='badbad')

Then I schedule the kickstart and run rhn_check -vv:

# rhn_check -vv
D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>spacewalk-koan</string></value>\n<value><string>0.1.11</string></value>\n<value><string>12.el5sat</string></value>\n<value><string></string></value>\n<value><string>noarch</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 450}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1252627928.43  with expiration of  1252631528.43  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010161, 'X-RHN-Auth-Server-Time': '1252667177.63', 'X-RHN-Auth': 'ZX/JP3326slQOES6h0ld4A==', 'X-RHN-Auth-Channels': [['rhel-i386-server-5', '20090911130326', '1', '1'], ['rhn-tools-rhel-i386-server-5', '20090904164551', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>spacewalk-koan</string></value>\n<value><string>0.1.11</string></value>\n<value><string>12.el5sat</string></value>\n<value><string></string></value>\n<value><string>noarch</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 450}
D: handle_action actionid = 450, version = 2
D: do_call packages.update ([['spacewalk-koan', '0.1.11', '12.el5sat', '', 'noarch']],)
D: Called update [['spacewalk-koan', '0.1.11', '12.el5sat', '', 'noarch']]
Loaded plugins: rhnplugin
Package spacewalk-koan-0.1.11-12.el5sat.noarch already installed and latest version
D: Downloading Packages:
D: Running Transaction Test
D: Finished Transaction Test
D: Transaction Test Succeeded
D: Running Transaction
Updating package profile
D: Sending back response (0, 'Update Succeeded', {})
D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>kickstart.initiate</methodName>\n<params>\n<param>\n<value><string>xen62.englab.brq.redhat.com</string></value>\n</param>\n<param>\n<value><string>spacewalk-koan</string></value>\n</param>\n<param>\n<value><string> </string></value>\n</param>\n<param>\n<value><string></string></value>\n</param>\n<param>\n<value><string>vmware139.englab.brq.redhat.com:1</string></value>\n</param>\n<param>\n<value><array><data>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 452}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1252627957.22  with expiration of  1252631557.22  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010161, 'X-RHN-Auth-Server-Time': '1252667206.57', 'X-RHN-Auth': 'IMscVrHUQ83d0IwJ0E5auQ==', 'X-RHN-Auth-Channels': [['rhel-i386-server-5', '20090911130326', '1', '1'], ['rhn-tools-rhel-i386-server-5', '20090904164551', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>kickstart.initiate</methodName>\n<params>\n<param>\n<value><string>xen62.englab.brq.redhat.com</string></value>\n</param>\n<param>\n<value><string>spacewalk-koan</string></value>\n</param>\n<param>\n<value><string> </string></value>\n</param>\n<param>\n<value><string></string></value>\n</param>\n<param>\n<value><string>vmware139.englab.brq.redhat.com:1</string></value>\n</param>\n<param>\n<value><array><data>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 452}
D: handle_action actionid = 452, version = 2
D: do_call kickstart.initiate ('xen62.englab.brq.redhat.com', 'spacewalk-koan', ' ', '', 'vmware139.englab.brq.redhat.com:1', [])
initiating spacewalkkoan kickstart
D: Sending back response ((6,), 'Fatal error in Python code occured', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: Called refresh_rpmlist
Updating package profile
D: local action status:  (0, 'rpmlist refreshed', {})
# rpm -qf /usr/share/rhn/actions/kickstart.py

The WebUI (/rhn/systems/details/kickstart/SessionStatus.do) shows green checkbox next Initiate Kickstart and then the red fail sign next to Kickstart failed.

Moving to RELEASE_PENDING.
Comment 7 Clifford Perry 2009-10-28 15:29:07 EDT
Closing bug. 530 is GA and we somehow missed this one to close.

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