Visitar URL original
Add support for dependent disks during in-cluster near-live migration by presztak · Pull Request #3794 · lxc/incus · GitHub
Skip to content

Add support for dependent disks during in-cluster near-live migration - #3794

Merged
stgraber merged 8 commits into
lxc:mainfrom
presztak:near_live_migration_dependent2
Aug 20, 2026
Merged

stgraber merged 8 commits into
lxc:mainfrom
presztak:near_live_migration_dependent2

Conversation

@presztak

@presztak presztak commented Aug 7, 2026

Copy link
Copy Markdown
Member

Closes: #3059

@github-actions github-actions Bot added Documentation Documentation needs updating API Changes to the REST API labels Aug 7, 2026
@presztak
presztak marked this pull request as ready for review August 7, 2026 08:29
@presztak
presztak requested a review from stgraber as a code owner August 7, 2026 08:29
@stgraber

stgraber commented Aug 7, 2026

Copy link
Copy Markdown
Member

@presztak I really don't like the added shared/api options. We shouldn't have anything internal be exposed to the public API in that way.

Is there no way for us to detect what we need internally considering all of this is happening with a shared database and with the client user-agent and certificate set to the cluster internal one so we can detect that this isn't a user request but is in fact a cluster-internal operation.

@presztak

presztak commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

@stgraber Another option I thought, would be to detect that this is a copy request originating from a different node, I mean, an inter-cluster request. However, reusing copy request elsewhere would then cause us to always skip shared volumes.

@presztak
presztak marked this pull request as draft August 11, 2026 17:50
@presztak
presztak force-pushed the near_live_migration_dependent2 branch from ee091c9 to cc41ffd Compare August 11, 2026 17:50
@github-actions github-actions Bot removed Documentation Documentation needs updating API Changes to the REST API labels Aug 11, 2026
@presztak

Copy link
Copy Markdown
Member Author

quick update, on the server side, we're now using migration directly instead of copy. This avoids exposing new external fields related to dependent disk migration, and has reduced the number of commits to 4. I've moved the PR back to draft, since we're still missing support for near-live migration when the remote is on shared storage but dependent disks are local.

@presztak
presztak force-pushed the near_live_migration_dependent2 branch 4 times, most recently from 0697974 to f0caf63 Compare August 17, 2026 07:17
@presztak
presztak marked this pull request as ready for review August 17, 2026 07:30
Comment thread cmd/incusd/instance_post_nearlive.go Resolved
Comment thread test/suites/clustering_move.sh Resolved
@presztak
presztak force-pushed the near_live_migration_dependent2 branch 2 times, most recently from cc1fa7a to 73e9c6b Compare August 18, 2026 08:27
@stgraber

Copy link
Copy Markdown
Member

@presztak what's with that "test" commit? :)

@presztak

Copy link
Copy Markdown
Member Author

@stgraber it's just for testing purpose for now as I've hit issues on linstor driver.

@presztak
presztak force-pushed the near_live_migration_dependent2 branch 3 times, most recently from 8e041bc to 2fb80b1 Compare August 18, 2026 16:42
@stgraber
stgraber force-pushed the near_live_migration_dependent2 branch from 2fb80b1 to 8c9d64d Compare August 18, 2026 20:42
@stgraber

Copy link
Copy Markdown
Member

@presztak the Info flag seems wrong to me. It's meant to indicate whether an efficient transfer of incremental state is available or not (the requirement for near live migration).

Only ZFS and btrfs offer that. The rest all rely on rsync/dd which aren't suitable for this use case.

Remote pools within a cluster also don't need the flag set to true anyway since the data isn't going to be moving at all. But if you were to go cross-cluster between remote storage drivers on both ends, none of our drivers have an efficient way to transfer those snapshots so they shouldn't be treated as handling near live migration.

@presztak
presztak force-pushed the near_live_migration_dependent2 branch from 8c9d64d to 643dc50 Compare August 19, 2026 08:03
@presztak

Copy link
Copy Markdown
Member Author

@stgraber, ok, I did it that way because the initial condition was:

if poolInfo.Name == "dir" || poolInfo.Name == "lvm" {
    return fmt.Errorf("Near-live migration isn't supported for dependent disk %q on %q storage pools", dev.Name, poolInfo.Name)
}

So NearLiveMigration was true for everything except dir and lvm. But I see your point now, and I've made adjustments based on your feedback.

…pshot

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
…ar-live migration

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
…nd local dependent disks

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
@presztak
presztak force-pushed the near_live_migration_dependent2 branch from 643dc50 to a7b39eb Compare August 19, 2026 12:25
@stgraber
stgraber merged commit 358f755 into lxc:main Aug 20, 2026
172 of 173 checks passed
@presztak
presztak deleted the near_live_migration_dependent2 branch August 20, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Near-live migration for containers

2 participants