Maor Lipchuk has posted comments on this change.

Change subject: engine:VM with remaining disks will not be deleted.(#822051)
......................................................................


Patch Set 5: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
Line 224:                     // Get all disk images for VM (VM should not have 
any image disk associated with it).
Because we can't be sure if all the disks initiated tasks.

For example VM with two disks, one will initiate a task the other don't for 
some reason.
 The first disk task will finish in the VDSM successfully but still we will 
have a disk which will be remained in the VM.

Line 233:                         imagesLeftInVm = true;
ok, that I can agree with, 
if we want to do it properly we should use one transaction for all the 
EndVmCommand and not only for the update.

Line 237:                         }
On which query are you talking about?
The process is as follow:
 Get the disks from the DB using VmHandler.updateDisksFromDb(getVm());
 Filter them with ImagesHandler.filterImageDisks
 set each disk with ILLEGAL state
 Update the image of the disk (for the ILLEGAL state)

Line 239:                     }
Wrong, EndVmCommand is called only if first disk succeeded to initiate task , 
since this command is being called after there is a task which is already 
running..

In the old behaviour disk was become floating and it could cause many problems, 
I think this solution should improve it a bit more, since "garbage" in the VDSM 
can be cleaned when user will try to remove that VM again.

--
To view, visit http://gerrit.ovirt.org/5806
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic59918037a87a2c169c4410d297de81a03ab6848
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to