Uh oh!
There was an error while loading. Please reload this page.
Externalize kvm agent storage reboot configuration - #4586
Conversation
RodrigoDLopez
left a comment
There was a problem hiding this comment.
Hey @GutoVeronezi nice feature ...
I was thinking and if we change the name of these files, put something more accurate or self explainable?
AgentProperty.java => AgentProperties.java
since we will work to bring all available properties to this file, right?AgentPropertyFile.java => AgentPropertiesFileHandler.java
this class sounds like a handler or facility to me, am I right?
Bearing in mind that we are looking to standardize and normalize things here. What do you think of normalizing the KVMHAMonitor.java file, at least on the lines where some changes were needed.
String _hostIP => String hostIP
My eyes bleed when I see things like that in the code.
| private static final Logger s_logger = Logger.getLogger(KVMHAMonitor.class); | ||
| private final Map<String, NfsStoragePool> _storagePool = new ConcurrentHashMap<String, NfsStoragePool>(); | ||
| private final Map<String, NfsStoragePool> _storagePool = new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
And if we start to normalize these variable names in this file?
Removing these underscore at the start of any variable. at least where some changes were needed
There was a problem hiding this comment.
you mean
| privatefinalMap<String, NfsStoragePool> _storagePool = newConcurrentHashMap<>(); | |
| privatefinalMap<String, NfsStoragePool> storagePool = newConcurrentHashMap<>(); |
@RodrigoDLopez ;)
(will need work in the rest of the file!!!)
GutoVeronezi
commented
Jan 15, 2021
@RodrigoDLopez sure, the new files names will be more intuitive. About the normalizations of the names, I understand what you mean, I'll do it too. |
DaanHoogland
commented
Jan 19, 2021
good work @GutoVeronezi looking forward to see this merged, but I am going to put my foot down for very extensive testing. 👍 |
RodrigoDLopez
commented
Feb 1, 2021
nice job @GutoVeronezi |
GutoVeronezi
commented
Mar 24, 2021
Can anyone review this PR? |
DaanHoogland
left a comment
There was a problem hiding this comment.
code looks good (in spite of the unguarded formats in debug statements. but this needs (as said) extensive 3rd party testing.
| private static final Logger s_logger = Logger.getLogger(KVMHAMonitor.class); | ||
| private final Map<String, NfsStoragePool> _storagePool = new ConcurrentHashMap<String, NfsStoragePool>(); | ||
| private final Map<String, NfsStoragePool> _storagePool = new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
you mean
| privatefinalMap<String, NfsStoragePool> _storagePool = newConcurrentHashMap<>(); | |
| privatefinalMap<String, NfsStoragePool> storagePool = newConcurrentHashMap<>(); |
@RodrigoDLopez ;)
(will need work in the rest of the file!!!)
| private final String _hostIP; /* private ip address */ | ||
| /* private ip address */ | ||
| private final String _hostIP; |
There was a problem hiding this comment.
same here
| privatefinalString_hostIP; | |
| privatefinalStringhostIP; |
There was a problem hiding this comment.
If the contributor decides to proceed with renaming this variable, I would also suggest removing the commented line /* private IP address */, and leave simply hostIP, or then something as hostPrivateIP or privateIpAddress, as this is expected to be the HostVO.privateIpAddress.
DaanHoogland
commented
Mar 25, 2021
I just did, but this is not what you need most, I'll look in the company to find test effort for us, to get this merged. As a general rule we need two lgtm, on of which should have at least tested extensively and the other at least looked at the code. |
blueorangutan
commented
May 10, 2021
Packaging result: ✔️ centos7 ✖️ centos8 ✔️ debian. SL-JID 547 |
blueorangutan
commented
May 10, 2021
Packaging result: ✖️ centos7 ✖️ centos8 ✖️ debian. SL-JID 561 |
blueorangutan
commented
May 11, 2021
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 578 |
GutoVeronezi
commented
May 24, 2021
@blueorangutan test |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Code LGTM.
I added a suggestion regarding the variable naming change; nothing that would block this PR anyway.
| private final String _hostIP; /* private ip address */ | ||
| /* private ip address */ | ||
| private final String _hostIP; |
There was a problem hiding this comment.
If the contributor decides to proceed with renaming this variable, I would also suggest removing the commented line /* private IP address */, and leave simply hostIP, or then something as hostPrivateIP or privateIpAddress, as this is expected to be the HostVO.privateIpAddress.
GutoVeronezi
commented
May 25, 2021
@DaanHoogland@GabrielBrascher rename done. |
| # Should be disabled for users with unmanaged iscsi connections on their hosts | ||
| # | ||
| #This parameter specifies if the host must be rebooted when something go wrong with heartbeat. | ||
| # reboot.host.and.alert.management.on.hearbeat.timeout=true |
There was a problem hiding this comment.
typo hearbeat => heartbeat
| * Default value: 60000 (ms). | ||
| */ | ||
| public static final AgentProperties<Integer> HEARTBEAT_UPDATE_TIMEOUT = new AgentProperties<Integer>("hearbeat.update.timeout", 60000); | ||
There was a problem hiding this comment.
check the typo error 'hearbeat', and correct it wherever applicable.
sureshanaparti
commented
Jun 24, 2021
@GutoVeronezi is this PR ready for review? |
GutoVeronezi
commented
Jun 24, 2021
@sureshanaparti as I mentioned in #4585 (comment), this PR will be rebased if #4585 be merged, therefore it still is a WiP. |
1022328 to
53fb485Compareblueorangutan
commented
Jul 29, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 701 |
RodrigoDLopez
left a comment
There was a problem hiding this comment.
The code LGTM.
i'll be able to test this one on this weekend. perhaps i'll post my results in the next monday.
| # heartbeat.update.timeout=60000 | ||
| # This parameter specifies if the host must be rebooted when something goes wrong with the heartbeat. | ||
| # reboot.host.and.alert.management.on.heartbeat.timeout=true |
There was a problem hiding this comment.
hope the newline is there ;)
There was a problem hiding this comment.
@DaanHoogland It's there =)
GitHub warns when there is no newline at the end of the file, e.g.:
There was a problem hiding this comment.
ah, you're right. forgot about that.
blueorangutan
commented
Jul 31, 2021
Trillian test result (tid-1434)
|
blueorangutan
commented
Jul 31, 2021
Trillian test result (tid-1437)
|
DaanHoogland
commented
Aug 2, 2021
test_vpc_redundant is failing all over the open PRs, but running one last time anyway to be as sure as possible |
blueorangutan
commented
Aug 2, 2021
Trillian test result (tid-1446)
|
DaanHoogland
commented
Aug 2, 2021
@RodrigoDLopez did you test this? |
RodrigoDLopez
commented
Aug 4, 2021
Sorry @DaanHoogland I couldn't run the tests yet. I'm having problems with my test environment, but I will run the tests as soon as possible. |
GutoVeronezi
commented
Aug 9, 2021
@blueorangutan package |
blueorangutan
commented
Aug 9, 2021
@GutoVeronezi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Aug 9, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 815 |
DaanHoogland
commented
Aug 11, 2021
@blueorangutan test |
blueorangutan
commented
Aug 11, 2021
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Aug 11, 2021
Trillian test result (tid-1588)
|
DaanHoogland
commented
Aug 12, 2021
@RodrigoDLopez anything to share yet? |
RodrigoDLopez
commented
Aug 12, 2021
I ran some tests with this propose. But I'm not sure about my environment. I couldn't see my kvm agent stop at any point. forcing my heartbeat timeout on two kvm hosts it's possible to see that the ones without the parameter Kvm-nd01 Kvm-nd02 |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Thanks for the PR @GutoVeronezi.
LGTM based on code review and manual tests done by @RodrigoDLopez.
The test looks good, probably the host was not rebooted due to some test env details. The logic behind loading the agent configuration, validating it and changing the execution flow according to it seems OK.
GutoVeronezi
commented
Aug 23, 2021
@DaanHoogland@GabrielBrascher@RodrigoDLopez is this good to go? Is there anything else to do? |
nvazquez
commented
Aug 23, 2021
Thanks for testing @RodrigoDLopez |
blueorangutan
commented
Aug 23, 2021
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
GutoVeronezi
commented
Aug 23, 2021
@nvazquez ok, thanks! |
blueorangutan
commented
Aug 23, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 981 |
nvazquez
commented
Aug 23, 2021
@blueorangutan test |
blueorangutan
commented
Aug 23, 2021
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Aug 24, 2021
Trillian test result (tid-1754)
|
Description
On KVMHAMonitor, when there is an inconsistency on the heartbeat's file or heartbeat timeout is extrapolated several times, the host is restarted. The host restarting amid several operations might bring inconsistency problems; therefore, it is interesting to let operators choose if they want the host restart or not on the hearbeat's timeout or storage errors.
This PR intends to externalize the heartbeat reboot configuration on KVMHAMonitor. The default value is
true; therefore, the current behavior is maintained.This PR depends on PR#4585.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
It has been tested locally on a test lab.
hearbeat.update.timeout=10setting toagent.propertiesto force a timeout on hearbeat.reboot.host.and.alert.management.on.hearbeat.timeoutsetting toagent.propertiesand changed it some times;