Skip to content

docs: design for SeiNode import existing storage#106

Merged
bdchatham merged 3 commits intomainfrom
docs/design-seinode-import-volume
Apr 20, 2026
Merged

docs: design for SeiNode import existing storage#106
bdchatham merged 3 commits intomainfrom
docs/design-seinode-import-volume

Conversation

@bdchatham
Copy link
Copy Markdown
Collaborator

Tracks #105. Related: #104.

Summary

Direction-setting doc for adding first-class "import existing volume" support to SeiNode, so users can stage a pre-populated PVC/PV and reference it from the SeiNode spec — rather than relying on the current ensure-data-pvc Create()-then-AlreadyExists accident (which is #104).

Decision in the doc: adopt Shape A (`import.pvcName`) + Shape D (`import.pvName`) together. Defer Shape E (VolumeSnapshot CR) to a later pass once snapshot-restore is directly needed. Reject Shape C (EBS snapshot ID with controller-side CreateVolume) to avoid making the controller cloud-provider-aware.

Why this is just the design doc (no code)

This PR is deliberately narrow — prose + tables, no CRD changes, no task implementation. Goal is to get directional sign-off inline via comments, then a follow-up PR with the full LLD and implementation.

What's left open

Three open questions called out at the bottom of the doc — deletion semantics, validation scope (mutate vs. read-only-fail), init-plan interaction with the bootstrap Job. Each has my current lean, but all three are genuinely open for the LLD.

Review ask

  • Inline comments on specific claims welcome
  • Pay special attention to:
    • The "reject Shape C" reasoning (cloud-provider awareness) — if you disagree, the design shifts
    • The three open questions — each needs a decision before LLD work starts
    • The "does NOT cover" list — make sure we're not implicitly promising something we shouldn't

Test plan

N/A — documentation only. If the direction lands, follow-up PR does the LLD + implementation with unit tests.

🤖 Generated with Claude Code

Tracks #105. Direction-setting doc for adding first-class "import
existing volume" support to SeiNode, rather than relying on the
`ensure-data-pvc` `Create`-then-`AlreadyExists` code path (which is
exactly the bug in #104).

Decision: adopt Shape A (import PVC by name) + Shape D (import PV
by name) together. Defer Shape E (VolumeSnapshot) to a later pass
when snapshot-restore is specifically required. Reject Shape C
(EBS snapshot ID with controller-side CreateVolume) to avoid making
the controller cloud-provider-aware.

The import-path design forces the validation logic missing from
#104 — same refactor fixes both.

Open questions for the LLD: deletion semantics for imported volumes,
scope of validation (mutate vs. read-only-fail), and init-plan
interaction with bootstrap-Job progression.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread docs/design-seinode-import-volume.md Outdated
Comment thread docs/design-seinode-import-volume.md
Comment thread docs/design-seinode-import-volume.md Outdated
bdchatham and others added 2 commits April 20, 2026 08:25
Three changes from #106 review:

1. Scope down to Shape A only. Drop Shape D from the Decision;
   move to "Additional options considered" as evaluated-but-not-adopted.
   Orphan adoption is reachable via Shape A with one extra operator
   step (create a PVC bound to the orphan PV, then reference it).
   Less CRD surface, less task-path branching.

2. Flip deletion semantics to "always preserve imported PVCs."
   deleteNodeDataPVC finalizer is a no-op for imported volumes.
   Operators opted into import explicitly; controller should not
   touch storage it didn't create. Moved from open question to
   decided section.

3. Turn validation requirements from open question into a
   concrete table. Seven requirements the imported PVC must
   satisfy (exists, not terminating, Bound, RWO, capacity, PV
   integrity). Explicit list of what we do NOT check (fstype,
   content, labels, SC) with reasoning.

Two open questions remain for the LLD (bootstrap-plan
interaction, validation retry budget).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per PR feedback: keep the design as idiomatic to the existing code
path as possible. Import does not change the init plan; it only
changes what ensure-data-pvc does internally.

- When spec.dataVolume.import.pvcName is set, ensure-data-pvc
  verifies the named PVC rather than creating one. Every other task
  in the init plan runs unchanged.
- No skipBootstrap flag, no branching in the planner, no diverged
  reconcile progression.
- The operator is trusted to provide a PVC whose contents are
  compatible with the rest of the init progression. Failures surface
  through the normal plan-Failed channel.

This removes open question #1 (bootstrap-plan interaction) entirely.
Only one open question remains: validation retry budget semantics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bdchatham
Copy link
Copy Markdown
Collaborator Author

Addressed your latest feedback in c86790b:

  • Removed the separate task (validate-imported-pvc) idea entirely
  • Import is now strictly a PVC-source substitution inside ensure-data-pvc
  • Init plan is unchanged; every successor task runs as-is
  • Explicit section saying the controller does NOT skip any steps, does NOT refuse to run configure-genesis on imported data, does NOT take responsibility for data contents
  • Operator is trusted to provide a PVC that works downstream; failures surface through the normal plan-Failed channel

Only one open question remains for the LLD (retry budget semantics).

@bdchatham bdchatham merged commit 117c82b into main Apr 20, 2026
2 checks passed
@bdchatham
Copy link
Copy Markdown
Collaborator Author

Pushed 98a1179 — retry semantics decided: retry indefinitely with exponential backoff, surface via Condition. All direction-level open questions are now resolved. LLD work is implementation specifics (backoff curve, Condition schema, tests). Ready for merge whenever you're happy with the direction.

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