Bring cts-lab audits back to life - #4164
Open
clumens wants to merge 25 commits into
Open
Conversation
These have been disabled due to nebulous long-ago refactorings since 2017, which is a doubly long time ago. Let's re-enable them and see what happens.
This uses `crm_node -e` to figure out what epoch a node joined the cluster. However, this option was removed by 55ab749 in 2017 and the whole epoch concept doesn't even apply to a non-heartbeat cluster. So, this check can be removed.
I can't find any reference to this argument as far back as the latest state of the 1.1 branch, which is where I stopped looking.
This may affect other attributes besides score. This was introduced by 66f20f7.
These audits check if a resource is running in more than one place which is always going to be the case in the split brain test.
This code was ssh'ing into each host, running cibadmin -Q, writing that to a file, and then scp'ing that file back to a host. There was also some juggling around to handle the first host in the list differently. It also didn't clean up the files it wrote. This is all a little more complicated than it needs to be. Instead, we can just capture stdout from the ssh command and write that to a file on the executor, diff things there, and clean up.
Sometimes, the CIBAudit test fails because different nodes have cib-last-written timestamps that are different. However, nothing else in the CIB is different. So, just remove the timestamp to remove the possibility of any differences there.
I don't think they should be run more than once, certainly not things like the PrimitiveAudit which runs at least once before any of the tests run, and then runs during the tests as well. But that's a bigger problem to solve. The problem here is that every time PrimitiveAudit (or its subclasses) run, they append to various lists without first resetting them. Over time, this means that the same checks get run over and over again. This really drags down the tests. So, just reset the lists.
The clean variable is unnecessary and makes this block kind of weird to read, so just remove it.
* Move the have_systemd test into _find_core_with_coredumpctl so we have one less case to consider in the caller. * Get rid of the unnecessary intermediate found variable.
This is just the same trick where we invert the test and continue, allowing everything else to be unindented.
We don't need to loop through the nodes twice.
* Nothing uses the _trim2int function. * Move the strip call into _trim_string to simplify callers. * Simplify callers by making everything a single call instead of two.
This has been an empty list since a refactoring commit in 2005 (73281ce).
If the split fails with an exception, it's possible one or both members of the tuple won't exist, in which case the logging message will also raise an exception. I don't think logging the tuple members is useful, so just remove it.
We were querying each node in a partition to see if it had quorum, but not doing anything with that information. So, let's start testing it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.