Uh oh!
There was an error while loading. Please reload this page.
Externalize KVM Agent's option to change migration thread timeout - #4570
Conversation
RodrigoDLopez
left a comment
There was a problem hiding this comment.
Hi @GutoVeronezi
Can you please explain to me the context? and how it has been tested?
Reading your description I got an idea, but I couldn't reproduce it.
GutoVeronezi
commented
Jan 8, 2021
I had two hosts with CentOS7. I tried to migrate a VM from a host to another, but one of my hosts was with overloaded RAM, so, it would take more than 10 seconds (the hardcoded timeout) to migrate the VM. With the externalized configuration, I could change the timeout to 20 seconds and my migration ran just fine. |
DaanHoogland
commented
Jan 18, 2021
@GutoVeronezi makes sense functionally and the code looks good except for the naming, why do you use |
Yes, it is local, but it refers to a migration from one host to the other, so it is verified if the VMs were correctly migrated from the source host to the |
GutoVeronezi
commented
Mar 24, 2021
Can anyone review this PR? |
DaanHoogland
commented
Mar 25, 2021
@wido@weizhouapache@GabrielBrascher@ravening can one of you guys look at this, please? |
wido
commented
Mar 25, 2021
I honestly don't get it yet. I need to think about this for a moment. |
GabrielBrascher
commented
Mar 25, 2021
@wido from my understanding, KVM with Rhel/CentOS does some kind of processing which results in Libvirt taking longer to get the domain ID when migrating the VM. Ubuntu, on the other hand, retrieves domain ID in less than 10 seconds. Am I right, @GutoVeronezi? |
GabrielBrascher
left a comment
There was a problem hiding this comment.
The variable dest.domain.migrate.retrieve.timeout is going to be placed at the agent.properties, right?
If so, I would recommend adding it on agent/conf/agent.properties. Something similar to what was done at PR #4585 where it was added commented lines as documentation as well as the variable with the default value.
wido
commented
Mar 26, 2021
In addition, shouldn't this be prefixed with 'vm' then as other migration options have the same prefix. |
GutoVeronezi
commented
Mar 26, 2021
Yes, that is the case. |
GabrielBrascher
commented
Mar 29, 2021
@GutoVeronezi what do you think of @wido's suggestion? At the agent.properties there are already some parameters regarding VM migrations, such as Maybe adding this parameter nearby those (e.g. after |
GutoVeronezi
commented
Mar 31, 2021
@GabrielBrascher@wido I have changed the config name, is there something else to do? |
GabrielBrascher
commented
Apr 1, 2021
@blueorangutan package |
blueorangutan
commented
Apr 1, 2021
@GabrielBrascher a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Apr 1, 2021
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 302 |
| } | ||
| private int parseAgentPropertiesVmMigrateDomainRetrieveTimeout() throws IOException { | ||
| final File agentPropertiesFile = PropertiesUtil.findConfigFile(KeyStoreUtils.AGENT_PROPSFILE); |
There was a problem hiding this comment.
@weizhouapache I took a look into this class and I am a bit confused. It seems like a facade of PropertiesUtils mixed with an another purpouse.
It seems to me that this class is badly structured, without a clear flow and with nonsense logs. I think it will add a meaningless complexity to the code instead of facility it.
In other hand, in PR #4586 there is a proposal of a handler that will simplify this code. If it be approved, I will change this PR to use the handler.
GutoVeronezi
commented
May 10, 2021
@weizhouapache can you look at this? |
GutoVeronezi
commented
May 17, 2021
Waiting for PR 4586 to be merged to use the |
yadvr
commented
May 25, 2021
@GutoVeronezi just another example where related PRs should be clubbed together, commits can be separate to allow reviewing of them individually. |
GabrielBrascher
commented
May 25, 2021
@rhtyd @GutoVeronezi my 2 cents here is: I think that PR #4586 has nothing to do with #4570. The first one externalizes the KVM agent storage reboot configuration (#4586), while the second one (#4570) allows configuring migration thread timeout. They are completely different variables, that impact distinct components and change different behaviors. The only thing that links both PRs is the I see it as a personal way of seeing. One could keep two PRs as they affect different parts and could easily be debugged and done separately. On the other hand, one could have them on a generic PR such as |
@DaanHoogland@GabrielBrascher@RodrigoDLopez@sureshanaparti I'm pinging you here because you all reviewed #4585 and #4586. #4585 introduced a handler that facilitate agent properties' file reading, which can be used here. However, #4585 was merged and reverted, therefore I had to submit a new work (#5239), which was merged a few days ago. Now I rebased this one and applied only the real changes. |
GutoVeronezi
commented
Jul 29, 2021
@blueorangutan package |
blueorangutan
commented
Jul 29, 2021
@GutoVeronezi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Jul 29, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 700 |
weizhouapache
commented
Jul 29, 2021
@blueorangutan test |
blueorangutan
commented
Jul 29, 2021
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
RodrigoDLopez
left a comment
There was a problem hiding this comment.
Code LGTM.
I'll test it and then post my results as soon as possible.
blueorangutan
commented
Jul 30, 2021
Trillian test result (tid-1425)
|
weizhouapache
commented
Aug 17, 2021
@blueorangutan package |
blueorangutan
commented
Aug 17, 2021
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 17, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 894 |
GutoVeronezi
commented
Aug 23, 2021
Could we re-run the tests in this one? |
nvazquez
commented
Aug 25, 2021
@GutoVeronezi can you please fix the conflicts? We can start a new round of tests after that |
…rate-thread-timeout
GutoVeronezi
commented
Aug 25, 2021
@nvazquez done, thanks! |
nvazquez
commented
Aug 25, 2021
@blueorangutan package |
blueorangutan
commented
Aug 25, 2021
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 25, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1009 |
nvazquez
commented
Aug 25, 2021
@blueorangutan test |
blueorangutan
commented
Aug 25, 2021
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
RodrigoDLopez
left a comment
There was a problem hiding this comment.
The proposal is okay and CLGTM.
blueorangutan
commented
Aug 26, 2021
Trillian test result (tid-1774)
|
Description
We noticed that sometimes migration in KVM fails due to a latency to move the VM process (domain) from the source host to the target. This has been noticed in Rhel7 and CentOS7. An exception can be observed due to the default (hard-coded) timeout that is extrapolated and ACS can't find the migrated VM's domain in the target host.
This PR intends to externalize that option in the KVM agent configuration. Default timeout will remain 10 seconds.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
It has been tested locally.