Bug 1390254 - [z-stream clone - 4.0.5] Upgrade from 3.6 to 4.0 fails on 04_00_0140_convert_memory_snapshots_to_disks.sql
Summary: [z-stream clone - 4.0.5] Upgrade from 3.6 to 4.0 fails on 04_00_0140_convert_...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.0.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.0.6
: ---
Assignee: Arik
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On: 1382746
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-31 14:56 UTC by rhev-integ
Modified: 2017-01-10 17:00 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1382746
Environment:
Last Closed: 2017-01-10 17:00:27 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log and DB dumps (1.07 MB, application/x-gzip)
2016-11-07 17:18 UTC, sefi litmanovich
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0043 0 normal SHIPPED_LIVE Red Hat Virtualization Manager 4.0.6 2017-01-10 21:52:43 UTC
oVirt gerrit 65440 0 None None None 2016-10-31 14:56:17 UTC
oVirt gerrit 66313 0 None None None 2016-11-10 09:35:23 UTC

Comment 1 sefi litmanovich 2016-11-07 17:17:10 UTC
Hi, Are we sure that this is fixed for 4.0.5?
Failed to verify with rhevm-4.0.5.5-0.1.el7ev.noarch.
I did add some vms with different "states" to the test but basically the same:

1. Have rhevm-3.6.9.2-0.1.el6.noarch on rhel 6.8.
2. Created 5 pairs of vms, for each per one vm is left up and the other down before the upgrade (didn't think this should effect this scenario but tried it nonetheless):
pair a. snapshot with memory -> preview -> commit -> remove snapshot (snapshot points to 'Active')
pair b.  snapshot with memory -> preview -> commit (DID NOT remove snapshot)
pair c. live snapshot without memory -> preview -> commit -> remove snapshot (snapshot points to 'Active')
paird d. live snapshot without memory -> preview -> commit (DID NOT remove snapshot)
pair e. normal snapshot (vm is down).
3. backup the engine.
4. re provision engine slave with rhel-7.2
5. install ovirt-engine-setup-4.0.5.5-0.1.el7ev.noarch and all other dependencies.
6. restore engine DB with backup file from (3).
7. engine-setup.

Got same message as reporter, see attached log and DB dumps for all the information.

Comment 2 sefi litmanovich 2016-11-07 17:18:03 UTC
Created attachment 1218158 [details]
log and DB dumps

Comment 3 Arik 2016-11-08 10:51:27 UTC
(In reply to sefi litmanovich from comment #1)
> Hi, Are we sure that this is fixed for 4.0.5?

The fix is there but apparently there's a bug in it.
You created a nice test! is it possible for you to manually modify the script
/usr/share/ovirt-engine/dbscripts/upgrade/04_00_0140_convert_memory_snapshots_to_disks.sql
right before the run?
It would be great time-saver to test it with the following line after line 59 in that script:
AND length(memory_volume) > 0

Comment 4 Arik 2016-11-08 11:07:00 UTC
(In reply to Arik from comment #3)
(I'm asking that after I validated that with this modification the reported issue is resolved on the attached db dump. I'm asking that in order to see that there are no other cases which are in the tested flow that the proposed fix won't cover)

Comment 5 sefi litmanovich 2016-11-08 12:49:09 UTC
I changed line 59 as you asked in comment 3 and setup succeeded as you expected.
Env is back up with all the vms and their snapshots in the same state they were before the backup->upgrade flow.

Comment 6 sefi litmanovich 2016-11-21 16:00:35 UTC
Verified with rhevm-4.0.6-0.1.el7ev.noarch according to the steps mentioned in comment#1

Comment 8 errata-xmlrpc 2017-01-10 17:00:27 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.

https://rhn.redhat.com/errata/RHBA-2017-0043.html


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