Arik Hadas has posted comments on this change.

Change subject: engine: Removal of VM pool with VMs
......................................................................


Patch Set 1:

(2 comments)

Comments inside. Besides them, the localized AppError files should not be 
modified by us

https://gerrit.ovirt.org/#/c/40557/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmPoolCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmPoolCommand.java:

Line 54:     }
Line 55: 
Line 56:     @Override
Line 57:     protected void executeCommand() {
Line 58:         setPrestartedToZero();
you set the prestarted to zero so VMs won't be start again after stopping them 
right? so you need to lock the pool because stopping the VMs might take some 
time and the user can update the prestarted VMs count in the meantime
Line 59:         stopVms();
Line 60:         setCommandShouldBeLogged(false);
Line 61:         setSucceeded(true);
Line 62:     }


Line 86:     private boolean removeVmsInPool() {
Line 87:         List<VM> vmsInPool = 
DbFacade.getInstance().getVmDao().getAllForVmPool(getVmPoolId());
Line 88:         VdcReturnValueBase result;
Line 89:         for (VM vm : vmsInPool) {
Line 90:             if (!vm.isDown()) {
need to lock the VMs so users won't be able to run them after stopping them 
because of pool removal
Line 91:                 return false;
Line 92:             }
Line 93: 
Line 94:             result = runInternalActionWithTasksContext(


-- 
To view, visit https://gerrit.ovirt.org/40557
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I58b0f37903447b49edf74bea5a51108818701698
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <smela...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskri...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smela...@redhat.com>
Gerrit-Reviewer: Shmuel Melamud <smela...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to