Skip to content

Migration followup-2#1180

Merged
EbiRider merged 45 commits into
mainfrom
migration-followup2
Jul 23, 2026
Merged

Migration followup-2#1180
EbiRider merged 45 commits into
mainfrom
migration-followup2

Conversation

@EbiRider

@EbiRider EbiRider commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

this is a big PR that touches upon several topics and add new ones

new feature: Batch lvol migration
this is designed for namespaced volumes, since we can't migrate volumes individually from a shared namespace as of now one of our options is migrating every lvol under the shared subsystem for now this feature has a limit of 16 lvols

how to invoke? we added a new argument to the existing migrate commands --batch passing this is required for batch migration and if a migration is called on a namespaced volume the command will fail asking for --batch argument we set this explicitly for clarity and not mistakenly initiate a group migration also the migrate-continue command now expects a group migration id (more to that later) instead of a single migration Id if the --batch is passed to it

what are the related the changes?
for this we added a new task runner exclusively running the batch some of the logic used on the lvol migration is duplicated here on purpose since it's two distinct features and might need to develop differently this include adding this new container to the docker compose, to the collect logs script etc to establish this new container
on the database side we have a group migration entity that tracks this process and has a one to many relationship with migrations (because the batch migrate will initiate and control several single lvol migrations)

other topics this PR touches?

  1. cleanup logic: the code been enhanced, several bugs fixed and duplicates were removed and put into helpers this is used by both the migration runner itself and a new standalone cleanup command

  2. task runner lvol migration: some parts of the flow were reordered for example switching ana state of the source secondary and tertiary to inaccessible BEFORE the final step, also a revert was added in case the final step failed for any reason,
    fixing several bugs for the migration of lvols or clones with a tree of ancestry snapshots

  3. adding new rpc in rpc_client this for the batch migration, and also the migration_final_step has a parameter (operation) with default value of migrate this was changed so the call sites have to explicitly pass this value to add more clarity on the operation being executed, also removed the bdev_lvol_final_migration since it was no longer needed

@EbiRider
EbiRider requested a review from mxsrc July 17, 2026 04:56
@EbiRider EbiRider self-assigned this Jul 17, 2026
Comment thread simplyblock_core/rpc_client.py Fixed
Comment thread simplyblock_web/api/v2/cluster/storage_pool/volume/migration.py Fixed
Comment thread simplyblock_core/models/lvol_migration_group.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/rpc_client.py Fixed
EbiRider added 25 commits July 21, 2026 18:55
…er a failed migration even if the node become reachable later
@EbiRider
EbiRider force-pushed the migration-followup2 branch from e584862 to 3706701 Compare July 21, 2026 15:26
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
Comment thread simplyblock_core/services/tasks_runner_batch_migration.py Fixed
stat = src_rpc.bdev_lvol_transfer_stat(src_lvol_composite)
state = (stat or {}).get('transfer_state') if stat is not None else None
else:
state = None
@EbiRider
EbiRider marked this pull request as ready for review July 23, 2026 02:08
@EbiRider
EbiRider merged commit 262187c into main Jul 23, 2026
9 of 11 checks passed
@EbiRider
EbiRider deleted the migration-followup2 branch July 23, 2026 21:11
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.

3 participants