Arik Hadas has uploaded a new change for review.

Change subject: core: fix audit log on migration rerun failure case
......................................................................

core: fix audit log on migration rerun failure case

In a specific case where migration fails, thus the VM is switched back
to Up state in the source and then goes down in the source, we used to
print an audit log message saying that it will be rerun although we
won't try to rerun. So this patch fix that audit log to be the one that
says the migration process failed.

Change-Id: I8e608cbdac5d38f7c3468f57cc563b8a3715359e
Signed-off-by: Arik Hadas <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/21722/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
index e345056..0e71249 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
@@ -358,10 +358,13 @@
         } else {
             // vm went down on the destination and source, migration failed.
             decreasePendingVms(getDestinationVds().getId());
-            _isRerun = true;
+            _isRerun = false;
             setSucceeded(false);
             log();
             failedToRunVm();
+            // signal the caller that a rerun was made so that it won't log
+            // the failure message again
+            _isRerun = true;
         }
     }
 


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

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

Reply via email to