Repository navigation
fix(k8s): the first Longhorn sync creates its namespace and retries - #60
Merged
Merged
Conversation
The bootstrap started Longhorn's first sync with a bare operation, which doesn't inherit the app's sync options or retry: on a fresh cluster it failed (namespaces "longhorn-system" not found), for good, and every later sync wave waited on it. Found by an unattended --new-cluster rebuild of a live cluster on v1.24.0 (the earlier run's "app project not found" error hid it). The operation now carries the app's syncOptions and retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Found by the fully unattended
nix run .#reinstall -- <master> --new-clusteron a live 3-node encrypted cluster, on v1.24.0.The bootstrap started Longhorn's first sync by patching a bare
operationonto the Application. An operation doesn't inherit the app'ssyncOptionsor itsretry, so:CreateNamespace=truewas missing, and the sync failed withnamespaces "longhorn-system" not found.retry, that failure was final, and every later sync wave waited on Longhorn.The run before this one failed earlier, with "app project default not found" (fixed in v1.23.1), which hid this bug.
The operation now carries the app's
syncOptionsandretry, read from the rendered Application. The newbootstrap-longhorn-synctest runs the bootstrap's actual jq program on the actual rendered Application and checks the operation creates the namespace, retries, and syncs the rendered branch. It fails without the fix.Live: sending that exact operation unblocked the stuck rebuild. It then finished by itself (
exit=0): all 28 apps are Synced and Healthy, every volume and Nextcloud's database were restored, and the data fingerprints are identical before and after.🤖 Generated with Claude Code