Shahar Havivi has uploaded a new change for review.

Change subject: Engine: Informative message when VM starts in Pause mode
......................................................................

Engine: Informative message when VM starts in Pause mode

Fix bug presented in commit:
426442dd0b6c76237d5ae9c14c7c5905ad975e09

Change-Id: Ie2728997c26ed9ac4021e9c2d4e824a232107a99
Signed-off-by: Shahar Havivi <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/17701/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
index 4153d8e..7d2bf63 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
@@ -557,7 +557,7 @@
                                         AuditLogType.VDS_INITIATED_RUN_VM
                                         : getTaskIdList().size() > 0 ?
                                                 
AuditLogType.USER_INITIATED_RUN_VM
-                                                : isRunAndPaused() ? 
AuditLogType.USER_INITIATED_RUN_VM_AND_PAUSE
+                                                : getVm().isRunAndPause() ? 
AuditLogType.USER_INITIATED_RUN_VM_AND_PAUSE
                                                         : 
AuditLogType.USER_STARTED_VM
                         : _isRerun ? AuditLogType.USER_INITIATED_RUN_VM_FAILED 
: AuditLogType.USER_FAILED_RUN_VM;
             }
@@ -1047,13 +1047,9 @@
         return vmPool.getVmPoolType().equals(VmPoolType.Manual);
     }
 
-    private boolean isRunAndPaused() {
-        return getVm().isRunAndPause() && 
getVmDynamicDao().get(getVmId()).getStatus() == VMStatus.Paused;
-    }
-
     @Override
     public void reportCompleted() {
-        if (isRunAndPaused()) {
+        if (getVm().isRunAndPause() && 
getVmDynamicDao().get(getVmId()).getStatus() == VMStatus.Paused) {
             final ExecutionContext executionContext = getExecutionContext();
             executionContext.setShouldEndJob(true);
             ExecutionHandler.endJob(executionContext, true);


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

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

Reply via email to