Laszlo Hornyak has uploaded a new change for review.

Change subject: engine: start HA vm if lost connection with host
......................................................................

engine: start HA vm if lost connection with host

Checks if the VM that the engine lost connection with is HA, and starts
it if it is.

Change-Id: I003bc348e6fe1214e3b5865cb9fe7b3a777c2c69
Signed-off-by: Laszlo Hornyak <[email protected]>
Bug-Url: https://bugzilla.redhat.com/958841
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
1 file changed, 10 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/49/14749/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
index e9c7b80..d79d3d8 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
@@ -6,6 +6,7 @@
 import org.ovirt.engine.core.common.AuditLogType;
 import org.ovirt.engine.core.common.VdcObjectType;
 import org.ovirt.engine.core.common.action.FenceVdsActionParameters;
+import org.ovirt.engine.core.common.action.RunVmParams;
 import org.ovirt.engine.core.common.action.SetStoragePoolStatusParameters;
 import org.ovirt.engine.core.common.action.VdcActionType;
 import org.ovirt.engine.core.common.businessentities.StoragePoolStatus;
@@ -109,14 +110,18 @@
         getVmList().addAll(getVmDAO().getAllMigratingToHost(getVdsId()));
         for (VM vm : getVmList()) {
             DestroyVmOnDestination(vm);
-            Backend.getInstance()
+            getBackend()
                     .getResourceManager()
                     .RunVdsCommand(VDSCommandType.SetVmStatus,
                             new SetVmStatusVDSCommandParameters(vm.getId(), 
VMStatus.Unknown));
-            // log VM transition to unknown status
-            AuditLogableBase logable = new AuditLogableBase();
-            logable.setVmId(vm.getId());
-            AuditLogDirector.log(logable, 
AuditLogType.VM_SET_TO_UNKNOWN_STATUS);
+            if(vm.isAutoStartup()) {
+                getBackend().runInternalAction(VdcActionType.RunVm, new 
RunVmParams());
+            } else {
+                // log VM transition to unknown status
+                AuditLogableBase logable = new AuditLogableBase();
+                logable.setVmId(vm.getId());
+                AuditLogDirector.log(logable, 
AuditLogType.VM_SET_TO_UNKNOWN_STATUS);
+            }
         }
     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I003bc348e6fe1214e3b5865cb9fe7b3a777c2c69
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to