Omer Frenkel has posted comments on this change.

Change subject: core: Detect host in idle prep for maintenance and re-migrate
......................................................................


Patch Set 14:

(4 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
Line 70:     }
Line 71: 
Line 72:     private void cancelIncommingMigrations() {
Line 73:         for (Guid hostId :vdssToMaintenance.keySet()) {
Line 74:             for (VM vm : 
getVmDAO().getAllRunningOnOrMigratingToVds(hostId)) {
i think this will also cancel migrate of vms that are migrating out of this 
host as well
Line 75:                 if (vm.getStatus() == VMStatus.MigratingFrom) {
Line 76:                     log.infoFormat("Cancelling incoming migration of 
{0}", vm);
Line 77:                     runVdsCommand(VDSCommandType.CancelMigrate, new 
CancelMigrationVDSParameters(vm.getRunOnVds(), vm.getId(), true));
Line 78:                 }


Line 72:     private void cancelIncommingMigrations() {
Line 73:         for (Guid hostId :vdssToMaintenance.keySet()) {
Line 74:             for (VM vm : 
getVmDAO().getAllRunningOnOrMigratingToVds(hostId)) {
Line 75:                 if (vm.getStatus() == VMStatus.MigratingFrom) {
Line 76:                     log.infoFormat("Cancelling incoming migration of 
{0}", vm);
maybe worth logging the vm id as well
Line 77:                     runVdsCommand(VDSCommandType.CancelMigrate, new 
CancelMigrationVDSParameters(vm.getRunOnVds(), vm.getId(), true));
Line 78:                 }
Line 79:             }
Line 80:         }


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/IVdsEventListener.java
Line 60:     boolean restartVds(Guid vdsId);
Line 61: 
Line 62:     void addExternallyManagedVms(List<VmStatic> externalVmList);
Line 63: 
Line 64:     void moveToMaintenance(VDS vds);
although name is correct, it is very close to the existing 
vdsMovedToMaintenance, no?


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
Line 1866:                         _vds.getName());
Line 1867:             } else {
Line 1868:                 if (System.currentTimeMillis() - 
_vdsManager.getStatusChangedTime() > Config.<Integer> 
GetValue(ConfigValues.HostPreparingForMaintenanceIdleTime)) {
Line 1869:                     // try to put the host to Maintenance again.
Line 1870:                     
ResourceManager.getInstance().getEventListener().moveToMaintenance(_vds);
no need to set the statusChangedTime to now? i am not sure it will be set again 
(as current status is already preparingFor..)
Line 1871:                 }
Line 1872:             }
Line 1873:         }
Line 1874:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e18bcfbc566b6fd92d276c5c739ba607e2a53f0
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to