Skip to content

Commit 3591185

Browse files
committed
bug 14168: add re-try to mgt server, in case mgt server is down. status 14168: resolved fixed
1 parent 1b4954d commit 3591185

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎agent/src/com/cloud/agent/Agent.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,13 @@ public void start() {
243243
s_logger.error("Unable to start the resource: " + _resource.getName());
244244
throw new CloudRuntimeException("Unable to start the resource: " + _resource.getName());
245245
}
246+
246247
_connection.start();
248+
while (!_connection.isStartup()) {
249+
_shell.getBackoffAlgorithm().waitBeforeRetry();
250+
_connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
251+
_connection.start();
252+
}
247253
}
248254

249255
public void stop(final String reason, final String detail) {

0 commit comments

Comments
 (0)