Skip to content

Commit 5a65b2f

Browse files
Dingane Hlalukuborisstoyanov
authored andcommitted
fix provisionCertificate api returns NPE when 'reconnect' parameter is true (apache#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
1 parent 0491f72 commit 5a65b2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,10 @@ public void reconnect(final long hostId) throws CloudRuntimeException, AgentUnav
367367
Boolean result = propagateAgentEvent(hostId, Event.ShutdownRequested);
368368
if (result == null) {
369369
super.reconnect(hostId);
370-
370+
return;
371371
}
372372
if (!result) {
373-
throw new CloudRuntimeException("Failed to propagating agent change request event:" + Event.ShutdownRequested + " to host:" + hostId);
373+
throw new CloudRuntimeException("Failed to propagate agent change request event:" + Event.ShutdownRequested + " to host:" + hostId);
374374
}
375375
}
376376

0 commit comments

Comments
 (0)