CASMPET-7273: k8s-verify-cluster: Allow etcdbackup pods in states other than Running and Completed #631
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.
This test fails if it finds any pods in the
kube-system
namespace that are notRunning
orCompleted
. In most cases, this is fine, but if it happens to run while anetcdbackup
job pod is starting up or terminating, then it may catch that pod in states likeContainerCreating
orTerminating
. Basically, there are non-error states that those pods may be found in. This PR updates the test so that when checking thekube-system
namespace, it fails if:etcdbackup
pod is in a state other thanRunning
orCompleted
etcdbackup
pod is in a state other thanRunning
,Completed
,ContainerCreating
,Init:#/#
,NotReady
,Pending
,PodInitializing
, orTerminating
.This will avoid the false failure that Mikhail reported when opening this ticket.
I have tested this on mug and ran the test repeatedly, verifying that it now correctly handles the case where an
etcdbackup
pod is in one of the other valid states.