Liran Zelkha has uploaded a new change for review.

Change subject: core: Not Responding Treatment is broken
......................................................................

core: Not Responding Treatment is broken

NPE on VdsNotRespondingTreatmentCommand prevents hosts from rebooting 
automatically
using power-management.

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


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/57/26057/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 ddd96cf..ec5062b 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
@@ -67,9 +67,13 @@
             // Make sure that the StopVdsCommand that runs by the RestartVds
             // don't write over our job, and disrupt marking the job status 
correctly
             ExecutionContext ec = (ExecutionContext) 
ObjectUtils.clone(this.getExecutionContext());
-            ec.setJob(this.getExecutionContext().getJob());
+            if (ec != null)
+                ec.setJob(this.getExecutionContext().getJob());
+
             super.executeCommand();
-            this.setExecutionContext(ec);
+
+            if (ec != null)
+                this.setExecutionContext(ec);
         } else {
             setCommandShouldBeLogged(false);
             log.infoFormat("Host {0}({1}) not fenced since it's status is ok, 
or it doesn't exist anymore.",


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

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

Reply via email to