Hello Liran Zelkha,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/26099

to review the following change.

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: lzel...@redhat.com <lzel...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/99/26099/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..543ba1a 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());
-            super.executeCommand();
-            this.setExecutionContext(ec);
+            if (ec != null) {
+                ec.setJob(this.getExecutionContext().getJob());
+                super.executeCommand();
+                this.setExecutionContext(ec);
+            } else {
+                super.executeCommand();
+            }
         } 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/26099
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3871bd414509324d4178ea633ca4d7f9aae74ebf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to