vishesh92 commented on code in PR #8089:
URL: https://github.com/apache/cloudstack/pull/8089#discussion_r1363293751
##########
engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java:
##########
@@ -1120,18 +1131,26 @@ private AgentAttache handleConnectedAgent(final Link
link, final StartupCommand[
final HostVO host =
_resourceMgr.createHostVOForConnectedAgent(startup);
if (host != null) {
- ready = new ReadyCommand(host.getDataCenterId(), host.getId(),
NumbersUtil.enableHumanReadableSizes);
-
- if (!indirectAgentLB.compareManagementServerList(host.getId(),
host.getDataCenterId(), agentMSHostList, lbAlgorithm)) {
- final List<String> newMSList =
indirectAgentLB.getManagementServerList(host.getId(), host.getDataCenterId(),
null);
- ready.setMsHostList(newMSList);
- ready.setLbAlgorithm(indirectAgentLB.getLBAlgorithmName());
-
ready.setLbCheckInterval(indirectAgentLB.getLBPreferredHostCheckInterval(host.getClusterId()));
- s_logger.debug("Agent's management server host list is not
up to date, sending list update:" + newMSList);
- }
+ GlobalLock joinLock = getHostJoinLock(host.getId());
Review Comment:
I am not sure what you mean by life-lock.
If you mean a deadlock, as per my understanding of Agent's implementation,
it will first send a disconnect (not waiting for disconnect to complete on
server) and then send a connect to a different server. So, it's unlikely. Even
if that happens, it will wait for lock for only 60 seconds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]