nvazquez opened a new pull request #2309: CLOUDSTACK-10132: Multiple Management
Servers Support for agents
URL: https://github.com/apache/cloudstack/pull/2309
JIRA Ticket: https://issues.apache.org/jira/browse/CLOUDSTACK-10132
Functional Specification:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Multiple+Management+Servers+Support+on+agents
This feature allows the direct agents to support multiple management
servers. With this feature, a load balancer may no longer be necessary. The
CloudStack administrator is responsible for setting a list of management
servers and an algorithm in which to sort them, to the management server, using
global configurations. The management server is responsible for applying
algorithm to the management server list and propagate it to the agents.
### Overview
A new global configuration is added: 'direct.agent.lb.algorithm'. Possible
values of this global configuration are: 'static', 'roundrobin' and 'shuffle',
corresponding to the algorithm that would be applied to the list of comma
separated hosts defined on 'host' global configuration before sending them to
the agents.
- 'static': No modification is made to the original 'host' list
- 'roundrobin': Rotate items one by one once the list is read
- 'shuffle': Randomly sort the list
A central utility is reading values from both global configurations on
management server startup and is responsible of propagating list to each agent.
In propagated list, the first element acts as the main host. Load balancing
takes place by prepending the management server each agent should connect to,
to the propagated actual list.
Once agents connect to management server, they receive a comma separated
string of management servers. This value is compared to their actual 'host'
configuration, and in case they differ, 'host' property is updated and
persisted on 'agent.properties' file with the newly received string.
Reconnection logic between agent and management server is refactored as
well. If agent is not able to establish a connection to its actual management
server after some timeout interval, it attempts connection to the next element
on its 'host' list.
Also, a background task is added to the agents to attempt reconnection to
their main management server in pursuit of balancing. The interval of this
background task is set on 'hosts.lb.background.interval' property on
'agent.properties' file. It can be optionally disabled, by setting property to 0
### Example
Supposing an environment in which there are 3 management servers: A, B and C
and 3 KVM agents.
Setting 'host' = 'A,B,C', agents will receive lists depending on
'direct.agent.lb' value:
- 'static': Each agent will receive the list: 'A,B,C'
- 'roundrobin': First agent receives: 'A,B,C', second agent receives:
'B,C,A', third agent receives: 'C,B,A'
- 'shuffle': Each agent will receive a list in random order.
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
With regards,
Apache Git Services