Revert "fix: preserve original source lvolID through failback cutover" (#1276) - #1340
Merged
Conversation
Hamdy-khader
approved these changes
Sep 10, 2026
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.
Reverts #1276 (
789db7899) onR26.3.Why
#1276 made every namespaced clone fail.
sbctl snapshot clonedied with:Two hunks in
add_lvol_on_node(simplyblock_core/controllers/lvol_controller.py) are responsible:LVol.ns_idhas a model default of1— a legitimate nsid.snapshot_controller.clone()builds its record by hand and never resets it (the ordinary create path does,add_lvol_ha). Before #1276 only an explicitprimary_nsidfrom a migration/fail-over caller could pin an nsid, so that default was inert. After #1276 the record's default became a request: every clone demanded nsid=1, which in a shared subsystem belongs to the subsystem's first lvol. The widened guard then refused to re-claim another subsystem, turning a recoverable placement into a hard failure.--namespaced ''was no workaround: both CLI clone handlers passargs.namespacedas the 4th positional ofclone(), which ispvc_name, sonamespacedkept its defaultTrue(fixed separately).Verification
ruff check— cleanmypy simplyblock_web simplyblock_cli simplyblock_core— only the 2 pre-existingtasks_runner_node_add.pyannotation errors (that file is not in fix: preserve original source lvolID through failback cutover by swap… #1276, so they predate this revert)tests/unit— 1874 passed, 7 skipped, 23 subtests passedWhat this re-opens
This is a full revert, so the other fixes #1276 carried go with it. Before merging, please confirm these are acceptable to lose for now, or plan a narrower re-land:
_evict_stale_namespacereturns to indexingsubsystem_get(...)(a dict) with[0]— the eviction that silently never ranjc_set_dual_nodeis removed — a gracefulsn shutdownon a 2-node cluster can abort the surviving nodeFollow-up
The clone failure also has a one-line fix that is independent of this revert (
snapshot_controller.pyis not touched by #1276): resetlvol.ns_id = 0inclone(), matchingadd_lvol_ha. Worth landing regardless so the model default can never be requested again.🤖 Generated with Claude Code