Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timing error leading to a false positive. #1641

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

pjuarezd
Copy link
Member

What is the isse?

When the KES pod starts we read from the pod logs the "Root Token"

VAULT_ROOT_TOKEN=$(kubectl logs -l app=vault | grep "Root Token: " | sed -e "s/Root Token: //g")

However pod running doesn't mean vault process inside already reached that step on the init process and we end up with an empty root token sometimes

Solution

We wait for the KES deploy Status instead of the pod running, then we wait for the log message to show, with timeout.
If the log message doesn't show, this time is a possitive fail.

When the KES pod starts we read from the pod logs the "Root Token"
https://github.com/minio/operator/blob/5ef838a70a45d9a7de9a5400be153bcbdb2e5223/testing/console-tenant%2Bkes.sh#L73
However pod running doesn't mean vault process inside already reached that step on the init process.

Solution: We wait for the KES deploy Status instead of the pod running.

Then we wait for the log message to show, with timeout.

If the log message doesn't show, this time is a possitive fail.
Signed-off-by: pjuarezd <pjuarezd@users.noreply.github.com>
@pjuarezd pjuarezd merged commit 4f282ca into minio:master Jun 14, 2023
24 checks passed
@pjuarezd pjuarezd deleted the fix-vault-test branch June 14, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants