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
This commit is contained in:
Dingane Hlaluku 2018-07-20 09:05:58 +02:00 committed by dahn
parent 70bd177064
commit a6e0204ccc

View File

@ -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);
}
}