fix(startup): improve startup detection for bucket creation (backport #23) #24
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.
Welcome to Cryostat3! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Related to cryostatio/cryostat-helm#115
See #4
Description of the change:
Changes a bit of logic in the entrypoint script for detecting if the SeaweedFS storage "cluster" is ready. The previous method relied on a "cluster.check" command with a relatively long timeout, but the startup would sometimes take longer than this timeout. In these slow startup cases, the entrypoint's forked process would continue to try to create the specified S3 buckets, even if the cluster was not yet ready. The bucket creation would fail, leaving the storage in an "uninitialized" state - Cryostat would not find its expected buckets in this storage instance later on. This change sets a shorter timeout on the "cluster.check" command and loops on it, as well as increases a few sleep durations, to try to ensure that the cluster is really ready before the forked process tries to initialize the buckets.
Motivation for the change:
How to manually test:
quay.io/andrewazores/cryostat-storage:startup-check-1
$ helm install cryostat --set authentication.openshift.enabled=true --set core.route.enabled=true --set pvc.enabled=true --set storage.image.repository=quay.io/andrewazores/cryostat-storage --set storage.image.tag=startup-check-1 ./charts/cryostat/
This is an automatic backport of pull request fix(startup): improve startup detection for bucket creation #23 done by Mergify.