Bug 1434582

Summary: Multiple Preview and Commit on previous snapshot results in vm without disk.
Product: Red Hat Enterprise Virtualization Manager Reporter: Koutuk Shukla <kshukla>
Component: ovirt-engineAssignee: Daniel Erez <derez>
Status: CLOSED ERRATA QA Contact: Carlos Mestre González <cmestreg>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.0.7CC: amureini, derez, eedri, gklein, lsurette, ratamir, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.1.1   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-25 00:53:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Koutuk Shukla 2017-03-21 20:46:51 UTC
Description of problem:

2 snapshot were created and multiple preview and commit attempts were carried out. After a attempt of preview and commit on 1st snapshot all the lv's dissapear from rhevm database. Disk tab on vm is seen empty. Illegal volumes are seen under both snapshots.

Also another behavior which is seen is rhevm allows to preview and commit a snapshot having illegal image.

Version-Release number of selected component (if applicable):
Red Hat Virtualization Manager Version: 4.0.7.4-0.1.el7ev


How reproducible:
100 %

Steps to Reproduce:
Below are exact same steps which Customer had performed. Issue seen on step no. 15, 16 and 17.

1. Chain before any snapshot was created.  
d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

2. Snapshot Post OS install Configuration was created
f8ff321b-d046-4e22-9c75-d3584b25249d --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

3. Another snapshot with same name Post OS install Configuration was created
0a6e4a94-6c3b-4751-9b17-b020aa0181ff --> f8ff321b-d046-4e22-9c75-d3584b25249d --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

4. Snapshot created in step 2 was deleted.
Merge of  f8ff321b-d046-4e22-9c75-d3584b25249d --> d0023f96-5640-4495-a0ee-df3e00e933a2 was done.
0a6e4a94-6c3b-4751-9b17-b020aa0181ff --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

5. First preview of Post OS install Configuration created one new lv below.
27e6ebf3-bc36-48e9-b6d8-e3ebf75155fe --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
0a6e4a94-6c3b-4751-9b17-b020aa0181ff --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

6. First restore of Post OS install Configuration deleted one lv.
27e6ebf3-bc36-48e9-b6d8-e3ebf75155fe --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

7. Second preview of Post OS install Configuration created one new lv below.
f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
27e6ebf3-bc36-48e9-b6d8-e3ebf75155fe --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

8.  Second  restore of Post OS install Configuration deleted one lv.
f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

9. Snapshot Post TimeForce preinstall  was created which added a new lv.
463c73ed-c3e6-4664-8cb9-9ba6ffee4a22 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

10.  First preview of Post TimeForce preinstall  added a new lv 
9babd814-2fc4-4ff4-9d82-601f0cc22177 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
463c73ed-c3e6-4664-8cb9-9ba6ffee4a22 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

11. First restore of Post TimeForce preinstall deleted lv
9babd814-2fc4-4ff4-9d82-601f0cc22177 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

12. Second preview of Post TimeForce preinstall  added a new lv 
28d866fd-5597-4bda-8145-2d4b4a61b9b8 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
9babd814-2fc4-4ff4-9d82-601f0cc22177 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

13. Second restore of Post TimeForce preinstall deleted lv
28d866fd-5597-4bda-8145-2d4b4a61b9b8 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

14. Third preview of Post OS install configuration was initiated which created a new lv
3935f7c0-65c4-40c4-86df-eceee99d1eb7 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
28d866fd-5597-4bda-8145-2d4b4a61b9b8 --> f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000
f0b9527b-06ff-4bcc-82fa-48712bd795c2 --> d0023f96-5640-4495-a0ee-df3e00e933a2 --> 00000000-0000-0000-0000-000000000000

15. Third restore of Post OS install configuration was initiated which deleted 2 lv's as per engine logs.  At this time the other snapshot "Post TimeForce preinstall" had a disk "f0b9527b-06ff-4bcc-82fa-48712bd795c2" in illegal state.

-- As per engine logs 28d866fd-5597-4bda-8145-2d4b4a61b9b8 and f0b9527b-06ff-4bcc-82fa-48712bd795c2 are removed. 
-- However the rhevm database also does not show  3935f7c0-65c4-40c4-86df-eceee99d1eb7 and d0023f96-5640-4495-a0ee-df3e00e933a2.
-- rhevm gui shows d0023f96-5640-4495-a0ee-df3e00e933a2 under Post OS install configuration snapshot illegal.

16.  Third preview on Post TimeForce preinstall was carried out which already had disk "f0b9527b-06ff-4bcc-82fa-48712bd795c2" in illegal state.   rhevm allowed this task.
-- no lv was added

17.  Third restore on Post TimeForce preinstall was carried out 
-- Whole Image group d1f7c575-0290-4680-b980-df1562e4f6bc  was deleted.

Actual results:
Disk tab on vm is seen empty. Illegal volumes are seen under both snapshots.

Expected results:
Preview and commit of the previous snapshot should not remove all the lv's and also rhevm should not allow to preview and commit a snapshot with illegal volume.

Additional info: I will attach engine.log and rhevm database dump for analysis. Below is the details of the vm on which this test was carried out. Please ignore test_Disk2 in rhevm portal this was added later. Actual disk which was missing is test_Disk1

VMname: test
VMid: 83a0e18f-5d27-498c-b1b6-86ba92bb5748
Disk alias : test_Disk1

Comment 4 Allon Mureinik 2017-03-22 04:22:45 UTC
Daniel - This looks like the same issue as bug 1379131.
Can you please confirm/refute? Thanks!

Comment 5 Daniel Erez 2017-03-22 10:27:55 UTC
(In reply to Allon Mureinik from comment #4)
> Daniel - This looks like the same issue as bug 1379131.
> Can you please confirm/refute? Thanks!

Indeed looks similar. Moving to MODIFIED for verification.

Comment 11 Carlos Mestre González 2017-04-11 13:08:33 UTC
Verified flow specified in the bug description on 4.1.1.8-0.1.el7.
All images legal state.