Repository navigation
fix(api): a migrated volume is found under the id its PV names - #1697
Open
schmidt-scaled wants to merge 2 commits into
Open
schmidt-scaled wants to merge 2 commits into
schmidt-scaled wants to merge 2 commits into
Conversation
Migration and fail-back give the volume a new record id; its namespace keeps the original one (LVol.ns_uuid). A Kubernetes PV names the original id for life, so every v2 lookup the CSI made for a migrated volume answered 404 in both clusters. Bed bf28 (2026-11-19): the CSI reconnect loop could not restore the paths a node crash had taken and vol-1 ran on 1 of 6 paths. _lookup_volume falls back to the pool's live volume whose ns_uuid is the requested id (online first, then newest), both when the id is unknown and when the record found belongs to another pool (the kept source). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Migration and fail-back give a volume a new record id, while its namespace keeps the original one (
LVol.ns_uuid). A PV names the original id for life, so every v2 lookup the CSI made for a migrated volume answered 404 in both clusters.Bed bf28 (2026-11-19):
vol-1's PV names731ff4bb, and the volume now lives on cluster B as record46a93411withns_uuid=731ff4bb. The CSI reconnect loop failed with "volume … not found in any pool" and could not restore the paths a node crash had taken, so the volume ran on 1 of 6 paths. Operator #929's cross-cluster resolver assumes a migrated volume keeps its id. With this change that lookup succeeds without any CSI change._lookup_volumefalls back to the pool's live volume whosens_uuidis the requested id: online first, then newest. It does this both when the id is unknown and when the record found belongs to another pool (the kept source). Every/volumes/{id}/…route uses this lookup, including detail and connect.Tests:
tests/unit/web/api/v2/test_volume_lookup_ns_uuid.py(6 tests). The v2 API unit suite passes (661).🤖 Generated with Claude Code