Bug 873755

Summary: engine: preview of snapshot will remove from view disks that were added to the vm after snapshot was taken (disks exist in db and vdsm), commiting the preview will not delete that disk
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Maor <mlipchuk>
Status: CLOSED WORKSFORME QA Contact: Dafna Ron <dron>
Severity: high Docs Contact:
Priority: high    
Version: 3.1.0CC: abaron, bazulay, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, scohen, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: Regression, Reopened
Target Release: 3.2.0Flags: scohen: Triaged+
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-25 10:46:55 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:
Attachments:
Description Flags
logs none

Description Dafna Ron 2012-11-06 16:15:15 UTC
Created attachment 639422 [details]
logs

Description of problem:

I took a snapshot of a vm with one disk and than added a second disk. 
preview -> commit will remove the disk from the UI, disk still exists in db and vdsm. 

Version-Release number of selected component (if applicable):

si24

How reproducible:

100%

Steps to Reproduce:
1. create a vm with 1 disk and take a snapshot
2. add a second disk
3. preview -> disk disappears from UI view -> commit 
  
Actual results:

disk still exists in db and vdsm but not in UI. 

Expected results:

1. in the past the behaviour was not to remove any disks created after the snapshot was taken. 
2. even if we changed behaviour we still need to remove the disk in vdsm and db. 

Additional info: logs + lvs before and after the commit

this is the disk that disappeared from view: 

4d34ec65-76f1-434e-a2d2-64cb56d2419c

after creating the disk first: 

diff after create snapshot and 2ed disk: 

[root@gold-vdsd ~]# diff /tmp/lvs.txt /tmp/lvs2.txt 
19a20
>   0cb34221-9c55-4beb-b99d-358bf0efe956 af5bb9ad-ebe7-4ade-8d0d-a6882d11af44 -wi-----   1.00g                                           
21a23
>   4d34ec65-76f1-434e-a2d2-64cb56d2419c af5bb9ad-ebe7-4ade-8d0d-a6882d11af44 -wi-----   1.00g                                           
23a26
>   7c5812b8-b434-43da-b7b9-6615a08431ba af5bb9ad-ebe7-4ade-8d0d-a6882d11af44 -wi-----   1.00g  

diff after commit: 


[root@gold-vdsd ~]# diff /tmp/lvs.txt /tmp/lvs_commit.txt
21a22,23
>   44dfdacc-f87c-4a2d-b184-3cf0d846107a af5bb9ad-ebe7-4ade-8d0d-a6882d11af44 -wi-----   1.00g                                           
>   4d34ec65-76f1-434e-a2d2-64cb56d2419c af5bb9ad-ebe7-4ade-8d0d-a6882d11af44 -wi-----   1.00g                                           
23a26
>   7c5812b8-b434-43da-b7b9-6615a08431ba af5bb9ad-ebe7-4ade-8d0d-a6882d11af44 -wi-----   1.00g                   


this is the disk in db after the commit: 

 4d34ec65-76f1-434e-a2d2-64cb56d2419c | 2012-11-06 17:48:30+02 |  1073741824 | 00000000-0000-0000-0000-000000000000 | 00000000-0000-0000-0000-000000000000 |           1 | 2012-11-06 17:48:30+02     | 40b8bba6-0a0c-4e13-a93c-cf4b594c00c4
 |           1 |             5 | 4e136e88-882a-4d5b-90e6-2a12bcf49323 | 2012-11-06 17:48:27.753052+02 | 2012-11-06 17:48:31.148047+02 | 00000000-0000-0000-0000-000000000000 | t

Comment 3 Maor 2013-02-25 10:46:55 UTC
Verified with NFS and ISCSI.
After snapshot was committed the disk was not appeared in DB.