Bug 849315

Summary: vdsm-upgrade exits with wrong exit code
Product: Red Hat Enterprise Linux 6 Reporter: Alon Bar-Lev <alonbl>
Component: vdsmAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED ERRATA QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: high    
Version: 6.3CC: abaron, acathrow, amureini, bazulay, bsarathy, fdeutsch, gouyang, hadong, hateya, iheim, ilvovsky, istein, jboggs, leiwang, lpeer, mburns, mpavlik, ovirt-maint, ycui, ykaul
Target Milestone: rcKeywords: TestBlocker, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra,
Fixed In Version: vdsm-4.9.6-31 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:07:38 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:
Attachments:
Description Flags
attached engine.log none

Description Alon Bar-Lev 2012-08-18 08:43:22 UTC
When vdsm-upgrade is exiting, it sets the wrong exit code (failure for success and success for failure).

This had not been discovered as:

1. ovirt-engine did not check for script exit code, this is going to be changed at ovirt-engine-3.1.

2. rhvm-h never exited the script waited for reboot, see bug#847103.

Provided (2) is fixed without (1), node upgrade successfully processed, however engine reports failure. Simply activating node will resume normal operation.

A fix is available[1].

[1] http://gerrit.ovirt.org/#/c/7279/

Comment 3 Alon Bar-Lev 2012-08-19 08:35:16 UTC
Version:

At least since vdsm-reg-4.9-113.1, which is bundled within:
---
Red Hat Enterprise Virtualization Hypervisor release 6.3 (20120710.0.el6_3)
---

This is from initial commit at upstream:
---
^8e53f0f vdsm_reg/vdsm-upgrade.py (Tabula Rasa 2011-06-15 23:26:19 +0300 170)     sys.exit(main())
---

Comment 4 Ilanit Stein 2012-09-03 06:58:30 UTC
This bug fails RHEV-H tests, involving upgrade. Marking it as testblocker.

Comment 7 Douglas Schilling Landgraf 2012-09-05 13:10:16 UTC
Hello Alon,

Thanks for the patches!

Cheers
Douglas

Comment 9 haiyang,dong 2012-09-21 10:38:24 UTC
Test version:
vdsm-4.9.6-34.0.el6_3.x86_64
ovirt-node-2.3.0-15.el6_3.7.noarch
rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3
SI18.1 rhevm-3.1.0-16.el6ev.noarch.rpm

upgrade from rhev-h 6.3**** to rhevh-h 6.3*** via RHEVM ,
The test result was that the rhevh was rebooted and really upgraded, but the rhevm showes "Install failed".
So that the bug is not fixed now.

Comment 10 Alon Bar-Lev 2012-09-21 11:00:33 UTC
(In reply to comment #9)
> So that the bug is not fixed now.

engine.log please.

Comment 11 haiyang,dong 2012-09-21 12:05:08 UTC
Created attachment 615408 [details]
attached engine.log

upgrade from rhev-hypervisor6-6.3-20120910.0.rhev31.el6_3 to rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3 via RHEVM

Comment 12 Alon Bar-Lev 2012-09-21 14:43:17 UTC
(In reply to comment #11)
> Created attachment 615408 [details]
> attached engine.log
> 
> upgrade from rhev-hypervisor6-6.3-20120910.0.rhev31.el6_3 to
> rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3 via RHEVM

I can confirm that this is the same root cause.

This is expected, as the bug was not fixed in 20120910 as far as I know.

If you try to upgrade rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3 to rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3 do you get a failure?

Comment 13 haiyang,dong 2012-09-24 03:10:12 UTC
Try to upgrade rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3 to rhev-hypervisor6-6.3-20120920.0.rhev31.el6_3.
Test result:
1.RHEVM shows that upgrade rhev-h successfully.
2012-Sep-24, 10:22:16 Detected new Host localhost.localdomain. Host state was set to Up.		
2012-Sep-24, 10:17:14 Host localhost.localdomain installed
2012-Sep-24, 10:17:14 Installing Host localhost.localdomain. Step: RHEV_INSTALL.
2012-Sep-24, 10:17:14 Installing Host localhost.localdomain. Step: umount; Details: umount Succeeded.
2012-Sep-24, 10:17:14 Installing Host localhost.localdomain. Step: doUpgrade; Details: Upgrade Succeeded. Rebooting.
2012-Sep-24, 10:17:14 Installing Host localhost.localdomain. Step: setMountPoint; Details: Mount succeeded..
2012-Sep-24, 10:16:27 Installing Host localhost.localdomain. Step: RHEV_INSTALL; Details: Connected to Host 10.66.11.139 with SSH key fingerprint: 75:59:4c:6c:78:66:f5:41:01:22:7c:8d:d3:95:68:50.
2012-Sep-24, 10:16:27 Host localhost.localdomain parameters were updated by admin@internal.
2012-Sep-24, 10:16:16 Host localhost.localdomain was switched to Maintenance mode by admin@internal.
2. But rhevh was not rebooted and upgraded,as far as i know,it didn't do anything about upgrade on rhevh side.After manual reboot RHEV-H,check that only one version can be selected to boot

Comment 20 haiyang,dong 2012-10-10 05:53:59 UTC
Version:
vdsm-4.9.6-36.0
rhev-hypervisor6-6.3-20121005.0.rhev31.el6_3

Try to upgrade rhev-hypervisor6-6.3-20121005.0.rhev31.el6_3 to rhev-hypervisor6-6.3-20121005.0.rhev31.el6_3  via rhevm.

Test result:
1.RHEVM shows that upgrade rhev-h successfully.
2.After upgrade successful, wait for a while,RHEV-H can automatic reboot.But on rhevh side,the grub.conf missed the content of the backup version after upgraded successfully via RHEVM, for this issue,has been reported BZ#863982 to track it.

Comment 23 Alon Bar-Lev 2012-10-24 15:10:16 UTC
*** Bug 869653 has been marked as a duplicate of this bug. ***

Comment 25 errata-xmlrpc 2012-12-04 19:07:38 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