Merge branch '4.20' into 4.22

This commit is contained in:
Suresh Kumar Anaparti 2025-12-05 18:41:18 +05:30
commit a0ba2aaf3f
No known key found for this signature in database
GPG Key ID: D7CEAE3A9E71D0AA

View File

@ -1332,13 +1332,14 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
}
} else if (task.getType() == Task.Type.DISCONNECT) {
try {
// an issue has been found if reconnect immediately after disconnecting. please refer to https://github.com/apache/cloudstack/issues/8517
// an issue has been found if reconnect immediately after disconnecting.
// wait 5 seconds before reconnecting
logger.debug("Wait for 5 secs before reconnecting, disconnect task - {}", () -> getLinkLog(task.getLink()));
Thread.sleep(5000);
} catch (InterruptedException e) {
}
shell.setConnectionTransfer(false);
logger.debug("Executing disconnect task - {}", () -> getLinkLog(task.getLink()));
logger.debug("Executing disconnect task - {} and reconnecting", () -> getLinkLog(task.getLink()));
reconnect(task.getLink());
} else if (task.getType() == Task.Type.OTHER) {
processOtherTask(task);