DaanHoogland commented on code in PR #8089:
URL: https://github.com/apache/cloudstack/pull/8089#discussion_r1363607502
##########
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:
no @vishesh92, I did mean a life-lock. a dead-lock means it waits for a lock
that won´t be released, A life lock means two parties keep trying but keep
hitting each others lock. In this case a disconnect hold the lock while the
connect on the other side tries for it and fails as the disconnect is busy (for
just to long) and than the other way around.
##########
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:
no @vishesh92, I did mean a life-lock. a dead-lock means it waits for a lock
that won´t be released, A life lock means two parties keep trying but keep
hitting each others lock. In this case a disconnect hold the lock while the
connect on the other side tries for it and fails as the disconnect is busy (for
just to long) and than the other way around.
--
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]