Bug 854765

Summary: beta2 - Upgrade script should successfully terminate before reboot occurs
Product: Red Hat Enterprise Linux 6 Reporter: Mike Burns <mburns>
Component: vdsmAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED ERRATA QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.3CC: abaron, acathrow, alonbl, bazulay, bsarathy, cpelland, cshao, fdeutsch, gouyang, iheim, ilvovsky, istein, jboggs, leiwang, lpeer, mburns, ovirt-maint, ycui, ykaul
Target Milestone: betaKeywords: TestBlocker, ZStream
Target Release: 6.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: vdsm-4.9.6-34.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 847103 Environment:
Last Closed: 2012-12-04 19:10:35 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:
Bug Depends On: 847103    
Bug Blocks:    

Description Mike Burns 2012-09-05 19:01:12 UTC
+++ This bug was initially created as a clone of Bug #847103 +++

Currently the ovirt-functions::reboot() executes /sbin/reboot directly, previous versions used cron to perform reboot but slept until reboot.

As a result the ssh session that invokes the upgrade script is not terminated, leaving the TCP session opened, thus enforce engine to wait for timeout.

Desired behaviour is to allow script to successfully terminate before reboot by executing reboot at background, either by crond[1], or by sub-shell[2], or any other magic.

[1] echo "* * * * * sleep 10 && /sbin/reboot" > /var/spool/cron/root
[2] nohup sh -c '( sleep 10 && reboot )' < /dev/null > /dev/null 2>&1


----------------------------

See original bug for debugging details, but in summary, vdsm changed to call python instead of bash.  When testing with that version, we uncovered the following 3 problems:

--- Additional comment from mburns on 2012-09-05 14:55:33 EDT ---

(In reply to comment #18)
> Mike,
> 
> I tried this[1] image.
> 
> 1. There is no /data/updates in new image, so image upload fails.

/data/updates is created by vdsm on startup.  This is caused by (#3) vdsm failing to start, so just another symptom of #3

> 
> 2. After I create /data/updates, update succeeds but no reboot.

Partially ovirt-node, partially vdsm.  Patches posted upstream:

http://gerrit.ovirt.org/7777 -- ovirt-node
http://gerrit.ovirt.org/7778 -- vdsm

> 
> 3. Another issue: after I approve, vdsm does not come up:

Pure vdsm issue (vdsm team to fill in details

> 
> [root@alonbl4 ~]# /etc/init.d/vdsmd start
> checking certs..
> vdsm: libvirt already configured for vdsm                  [  OK  ]
> Starting iscsid: 
> vdsm: Failed to define network filters on libvirt          [FAILED]
> 
> Do you have rhev-m environment to test?
> 
>

Comment 3 Douglas Schilling Landgraf 2012-09-06 16:00:50 UTC
For vdsm does not come up:
> 
> [root@alonbl4 ~]# /etc/init.d/vdsmd start
> checking certs..
> vdsm: libvirt already configured for vdsm                  [  OK  ]
> Starting iscsid: 
> vdsm: Failed to define network filters on libvirt          [FAILED]
> 
> Do you have rhev-m environment to test?
> 

[Downstream]: vdsmd: set nwfilter on ovirt-node
https://gerrit.eng.lab.tlv.redhat.com/#/c/1915/

[Upstream]:Upstream: vdsmd: set nwfilter on ovirt-node
http://gerrit.ovirt.org/#/c/7821/

Comment 9 errata-xmlrpc 2012-12-04 19:10:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1508.html