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(startup): improve startup detection for bucket creation (backport #23) #24

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Sep 9, 2024

Welcome to Cryostat3! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

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:

  1. Check out feat(deployment): split out -db and -storage deployments cryostat-helm#184
  2. Check out this PR and build it, or use quay.io/andrewazores/cryostat-storage:startup-check-1
  3. Get a Kubernetes or OpenShift cluster
  4. Using OpenShift (crc) as an example, $ 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/
  5. Open Cryostat Web UI and ensure that Archives view is available, and other archive-related operations work
    This is an automatic backport of pull request fix(startup): improve startup detection for bucket creation #23 done by Mergify.

@andrewazores andrewazores merged commit 17045f9 into cryostat-v3.0 Sep 9, 2024
2 checks passed
@mergify mergify bot deleted the mergify/bp/cryostat-v3.0/pr-23 branch September 9, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant