Omer Frenkel has posted comments on this change.

Change subject: engine: Cleanup the vfs when the vm is down and refresh host if 
needed
......................................................................


Patch Set 24:

(4 comments)

https://gerrit.ovirt.org/#/c/38624/24/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ClearNonResponsiveVdsVmsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ClearNonResponsiveVdsVmsCommand.java:

Line 72:             
runInternalActionWithTasksContext(VdcActionType.ProcessDownVm, new 
ProcessDownVmParameters(vm.getId(), true));
Line 73:             movedToDownVmIds.add(vm.getId());
Line 74:         }
Line 75: 
Line 76:         
hostDeviceManager.refreshHostIfAnyVmHasHostDevices(movedToDownVmIds, 
getVdsId());
there is no point trying to refresh the host, it is non responsive at this point
Line 77: 
Line 78:         runVdsCommand(VDSCommandType.UpdateVdsVMsCleared,
Line 79:                         new 
UpdateVdsVMsClearedVDSCommandParameters(getVdsId()));
Line 80:         if (!autoStartVmIdsToRerun.isEmpty()) {


https://gerrit.ovirt.org/#/c/38624/24/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ProcessDownVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ProcessDownVmCommand.java:

Line 78: 
Line 79:         QuotaManager.getInstance().rollbackQuotaByVmId(getVmId());
Line 80:         removeStatelessVmUnmanagedDevices();
Line 81: 
Line 82:         Guid hostId = cleanupVfs();
please check latest code, there is a code that clears host devices, so this 
might not be needed?
Line 83:         refreshHostIfNeeded(hostId);
Line 84: 
Line 85:         applyNextRunConfiguration();
Line 86:     }


Line 91:     }
Line 92: 
Line 93:     private void refreshHostIfNeeded(Guid hostId) {
Line 94:         // refresh host to get the host devices that were detached 
from the VM and re-attached to the host
Line 95:         if (!getParameters().isSkipHostRefresh() && hostId != null) {
please also send true in RunVmCommand.removeVmStatlessImages() as the vm did 
not start in this scenario and there is no need to refresh the host
Line 96:             runInternalAction(VdcActionType.RefreshHost, new 
VdsActionParameters(hostId));
Line 97:         }
Line 98:     }
Line 99: 


https://gerrit.ovirt.org/#/c/38624/24/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsVmsOperation.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsVmsOperation.java:

Line 133:         }
Line 134: 
Line 135:         if (!movedToDownVmIds.isEmpty()) {
Line 136:             HostDeviceManager hostDeviceManager = 
Injector.get(HostDeviceManager.class);
Line 137:             
hostDeviceManager.refreshHostIfAnyVmHasHostDevices(movedToDownVmIds, 
vds.getId());
the host is probably down here (right after stop command)
Line 138:         }
Line 139: 
Line 140:         if (!autoStartVmIdsToRerun.isEmpty()) {
Line 141:             
AutoStartVmsRunner.getInstance().addVmsToRun(autoStartVmIdsToRerun);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1f861a451f4e0961ec122e4c2594081ea6dc71b
Gerrit-PatchSet: 24
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to