Skip to content

Harden autoupdate deploy and recover the RustFS bucket - #339

Merged
mxschmitt merged 2 commits into
mainfrom
fix/autoupdate-followups
Oct 26, 2026
Merged

mxschmitt merged 2 commits into
mainfrom
fix/autoupdate-followups

Conversation

@mxschmitt

@mxschmitt mxschmitt commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Follow-ups to #338.

  • file-service:
    • /api/v1/health now checks the upload bucket and recreates it (including its expiry rule) when it's missing. RustFS stores data in an emptyDir, so a RustFS restart used to drop the bucket and break uploads until file restarted.
    • If storage isn't reachable at startup, file-service now keeps running instead of crash-looping, and the readiness probe keeps the pod out of traffic until storage is back. The probe timeout is raised to 5s to fit the check.
  • upgrade_k3s_containers.sh:
    • Generate manifests before pulling images, so a missing env file fails fast and doesn't re-pull every 15 minutes.
    • Source the env file only in the generate.sh subshell, so it can't override script variables.
    • Add --max-time to the health check curls, so a hung request can't hold the deploy lock forever.

🤖 Generated with Claude Code

Follow-ups to #338:
- file-service health checks the bucket and recreates it when missing
  (RustFS uses an emptyDir, so a RustFS restart drops the bucket)
- readiness probe timeout raised to fit the storage check
- autoupdate: generate manifests before pulling images, source the env
  file only in that subshell, delete workers before applying manifests,
  and time-box the health check requests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T13:26:26.016922Z f297229 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f297229207

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread file-service/main.go
Comment on lines +244 to +246
exists, err := s.s3Client.BucketExists(ctx, BUCKET_NAME)
if err == nil && !exists {
err = s.ensureBucket(ctx)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retry lifecycle configuration after partial bucket recovery

If bucket recreation succeeds but SetBucketLifecycle fails—for example, because the shared three-second context expires—the bucket remains without its one-day expiration rule. Subsequent health probes see that the bucket exists, skip ensureBucket, and report success, so lifecycle configuration is never retried and newly uploaded artifacts accumulate indefinitely. Track successful lifecycle setup or reconcile the rule on subsequent probes before considering recovery complete.

Useful? React with 👍 / 👎.

- Revert deleting workers before apply: a failing apply or rustfs wait
  would leave control with only deleted workers
- Retry the bucket lifecycle rule until it is set
- Don't exit on startup when storage is not reachable yet; stay up and
  let the readiness probe report it
- Keep both errors when bucket creation and the existence check fail

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mxschmitt
mxschmitt merged commit 301b654 into main Oct 26, 2026
11 checks passed
@mxschmitt
mxschmitt deleted the fix/autoupdate-followups branch October 26, 2026 14:34
@flakiness-io

flakiness-io Bot commented Oct 26, 2026

Copy link
Copy Markdown

Test Results Summary

This comment shows the latest test results for this pull request.

Commit Status Test Results CI Runs
25279a6 ✅ Passed 50 passed · 1 flaky 1 runs
⚠️ 1 flaky

⚠️ Ubuntu 24.04 · firefox e2e/tests/visual.spec.ts:137 › should handle platform core related features › should handle the timeout correctly

View full report

ℹ️ About Flakiness.io in GitHub

Your team has set up Flakiness.io pull request comments. This comment is updated when

  • The first test results arrive for this pull request
  • A later run reports more results for the same commit
  • A new commit is pushed and tested

Flakiness.io rewrites the comment in place, so it always reflects the most recently tested commit.

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.

1 participant