This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new a6e0204  fix provisionCertificate api returns NPE when 'reconnect' 
parameter is true (#2756)
a6e0204 is described below

commit a6e0204cccf547625d7e3b6886e613055f43fb68
Author: Dingane Hlaluku <[email protected]>
AuthorDate: Fri Jul 20 09:05:58 2018 +0200

    fix provisionCertificate api returns NPE when 'reconnect' parameter is true 
(#2756)
    
    This PR fixes NPE with the provisionCertificateCmd when reconnect is set to 
True.
    
    Also fixes the following Marvin test failures:
    - test_certauthority_root.py
---
 .../main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
 
b/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
index 38822cb..d0cced3 100644
--- 
a/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
+++ 
b/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
@@ -367,10 +367,10 @@ public class ClusteredAgentManagerImpl extends 
AgentManagerImpl implements Clust
         Boolean result = propagateAgentEvent(hostId, Event.ShutdownRequested);
         if (result == null) {
             super.reconnect(hostId);
-
+            return;
         }
         if (!result) {
-            throw new CloudRuntimeException("Failed to propagating agent 
change request event:" + Event.ShutdownRequested + " to host:" + hostId);
+                throw new CloudRuntimeException("Failed to propagate agent 
change request event:" + Event.ShutdownRequested + " to host:" + hostId);
         }
     }
 

Reply via email to