Repository navigation
realtime re-balance remote agents - #14001
DaanHoogland wants to merge 2 commits into
Conversation
| verify(clusteredAgentManagerImpl).loadDirectlyConnectedHost(hostVO, false); | ||
| } | ||
|
|
||
| // https://github.com/apache/cloudstack/issues/9640 |
There was a problem hiding this comment.
| // https://github.com/apache/cloudstack/issues/9640 |
| // Indirectly connected agents (KVM hosts, SSVM, CPVM) dial in to a management server rather | ||
| // than being loaded directly by it, so this management server can't hand the host to a | ||
| // specific future owner the way it can for direct agents. Disconnect it instead: the agent | ||
| // reconnects on its own using its indirect agent LB configuration (the "host" global setting | ||
| // and indirect.agent.lb.algorithm), which is what actually determines its next owner. |
There was a problem hiding this comment.
evaluate and redact comment
| // Indirectly connected agents (KVM hosts, SSVM, CPVM) dial in to a management server rather than | ||
| // being loaded directly by it, so they must be disconnected (and left to reconnect on their own) | ||
| // instead of going through the direct-agent rebalance dance that expects a ClusteredDirectAgentAttache. |
There was a problem hiding this comment.
| // Indirectly connected agents (KVM hosts, SSVM, CPVM) dial in to a management server rather than | |
| // being loaded directly by it, so they must be disconnected (and left to reconnect on their own) | |
| // instead of going through the direct-agent rebalance dance that expects a ClusteredDirectAgentAttache. |
| final AgentAttache attache = findAttache(hostId); | ||
| if (attache != null && !(attache instanceof ClusteredDirectAgentAttache)) { | ||
| // Indirectly connected agents (KVM hosts, SSVM, CPVM) dial in to a management server rather | ||
| // than being loaded directly by it, so this management server can't hand the host to a | ||
| // specific future owner the way it can for direct agents. Disconnect it instead: the agent | ||
| // reconnects on its own using its indirect agent LB configuration (the "host" global setting | ||
| // and indirect.agent.lb.algorithm), which is what actually determines its next owner. | ||
| logger.debug("Host id={} ({}) is an indirectly connected agent; disconnecting it so it reconnects and picks a management server " + | ||
| "using its own load balancing configuration", hostId, attache); | ||
| result = handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected, true, true); | ||
| finishRebalance(hostId, futureOwnerId, result ? Event.RebalanceCompleted : Event.RebalanceFailed); | ||
| return result; | ||
| } | ||
|
|
There was a problem hiding this comment.
new method, move comment to javadoc
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14001 +/- ##
============================================
+ Coverage 19.73% 20.45% +0.71%
- Complexity 19955 21416 +1461
============================================
Files 6371 6488 +117
Lines 575784 589311 +13527
Branches 70478 72247 +1769
============================================
+ Hits 113644 120517 +6873
- Misses 449788 455664 +5876
- Partials 12352 13130 +778
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@nvazquez , can you have a look at this and discuss if needed? |
|
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 25.49% |
| Branch coverage | 19.79% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run



Description
This PR relates to agent rebalancing on MSses see #9640 but applies to atachees .
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?