Uh oh!
There was an error while loading. Please reload this page.
KVM: Propagating changes on host parameters to the agents - #3491
Conversation
svenvogel
commented
Jul 15, 2019
@ustcweizhou small question. do you mean with "configuration" ... global settings? how can we add more options which already exists in the agent.properties with your code? |
ustcweizhou
commented
Jul 15, 2019
@svenvogel If global configuration does not exist, we need to add a ConfigKey at first. |
wido
commented
Jul 17, 2019
Thanks! This is very welcome. I also looked into this for #3500 , but my problem with it is that it's very hardcoded. Both on the Mgmt server and Agent side. The name for the keys are repeated multiple times and that can cause problems. It doesn't really scale. How could we handle that? |
svenvogel
commented
Jul 17, 2019
@wido@ustcweizhou yes could be cool if we find a method which is lesser hardcoded. maybe a global setting "," comma separated? |
yadvr
commented
Dec 7, 2019
@ustcweizhou I tried changing the base branch to master and 4.13, there are conflicts. 4.11 is very old, can you rebase to master? |
yadvr
commented
Jan 28, 2020
@ustcweizhou can you rebase to 4.13? I've tentatively set the milestone to 4.13.1.0. |
0d6dd8d to
65f4d53Compareweizhouapache
commented
Jan 28, 2020
rebased with latest master |
DaanHoogland
commented
Jan 28, 2020
@weizhouapache do we want this on 4.13 or on master. it is now based on master but targetted towards 4.13. Can you rebase or should we change the target? |
weizhouapache
commented
Jan 28, 2020
@DaanHoogland a, my bad. I will rebase with 4.13 |
65f4d53 to
88ed321CompareDaanHoogland
commented
Jan 28, 2020
@blueorangutan package |
blueorangutan
commented
Jan 28, 2020
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jan 28, 2020
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-679 |
DaanHoogland
commented
Jan 29, 2020
@blueorangutan test |
blueorangutan
commented
Jan 29, 2020
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Jan 30, 2020
Trillian test result (tid-842)
|
DaanHoogland
commented
Jan 30, 2020
@nvazquez can you review please. I see one ha error biut no relation to the code, thanks. |
blueorangutan
commented
Feb 17, 2020
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 17, 2020
Packaging result: ✖centos6 ✔centos7 ✖debian. JID-885 |
yadvr
commented
Feb 18, 2020
@blueorangutan package |
blueorangutan
commented
Feb 18, 2020
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 18, 2020
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-890 |
yadvr
commented
Feb 18, 2020
@blueorangutan test |
blueorangutan
commented
Feb 18, 2020
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Feb 18, 2020
Trillian test result (tid-1028)
|
yadvr
commented
Feb 19, 2020
@nvazquez@DaanHoogland@andrijapanicsb can you review? |
DaanHoogland
commented
Feb 19, 2020
tested according to Wei's spec and looks good. On advise from @nvazquez I also tested if the other pushed properties where still fine after the push: |
| s_logger.debug("Propagating changes on host parameters to the agents"); | ||
| Map<Long, List<Long>> hostsPerZone = getHostsPerZone(); | ||
| Map<String, String> params = new HashMap<String, String>(); | ||
| params.put("router.aggregation.command.each.timeout", _configDao.getValue("router.aggregation.command.each.timeout")); |
There was a problem hiding this comment.
What about removing this one from here and adding params as parameter?
There was a problem hiding this comment.
@nvazquez it is absolutely good.
I will create another PR. this PR has already been merged into 4.13 and 4.14 ...
| } | ||
| if (globalSettingUpdated.equals(ApiServiceConfiguration.ManagementServerAddresses.key()) || | ||
| globalSettingUpdated.equals(IndirectAgentLBServiceImpl.IndirectAgentLBAlgorithm.key())) { | ||
| _indirectAgentLB.propagateMSListToAgents(); |
There was a problem hiding this comment.
I think we can unify both calls as they do basically the same
| globalSettingUpdated.equals(IndirectAgentLBServiceImpl.IndirectAgentLBAlgorithm.key())) { | ||
| _indirectAgentLB.propagateMSListToAgents(); | ||
| } else if (globalSettingUpdated.equals(Config.RouterAggregationCommandEachTimeout.toString())) { | ||
| _agentManager.propagateChangeToAgents(); |
nvazquez
left a comment
There was a problem hiding this comment.
Thanks @weizhouapache code LGTM. Just left some small nice to have comments
DaanHoogland
commented
Feb 19, 2020
merging this as is but created #3896 for follow up work |
* 4.13: KVM: Propagating changes on host parameters to the agents (#3491)
Description
When we change a global setting and it needs to be applied to all kvm agents, it would be nice that the new value can be propagated to all kvm agents (and save in agent.properties if needed) so we do not need to manually restart cloudstack agent or change agent.properties.
it supports only "router.aggregation.command.each.timeout" for now.
In the future, it would be good to add a new column in "configurations" table to determine whether the configuration needs to be propagated to kvm agents.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
(1) change router.aggregation.command.each.timeout in global setting
(2) check agent.properties to see if the value is changed as well.