Skip to content

lxc: Make incremental memory migration opt-in - #3828

Merged
stgraber merged 1 commit into
lxc:mainfrom
fivetime:fix/incremental-memory-opt-in
Aug 14, 2026
Merged

stgraber merged 1 commit into
lxc:mainfrom
fivetime:fix/incremental-memory-opt-in

Conversation

@fivetime

Copy link
Copy Markdown
Contributor

The migration.incremental.memory configuration is documented with a default of false, but the LXC migration sender currently enables pre-dumps when the key is unset. It also probes the CRIU dirty-memory feature even when the setting is explicitly false.

Treat incremental memory migration as opt-in and only probe CRIU when the expanded configuration is explicitly true. Preserve the existing default iteration count and upper bound.

The driver package tests and go vet pass on Linux.

@fivetime
fivetime requested a review from stgraber as a code owner August 13, 2026 09:58
"github.com/stretchr/testify/require"
)

func TestMigrationPreDumpSettings(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is making a bunch of completely needless changes to the code just to allow this test to exist. At the end of the day, all this test does is check if util.IsTrue in fact returns true when passed true.

It's completely pointless and should be removed, allowing the code itself to actually be readable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I removed the test and the helper introduced solely for it, and restored the check to the migration control flow directly.

@stgraber

Copy link
Copy Markdown
Member

Please rebase so we have a single commit to look at. Incus review process is to consider each commit individually, so we generally dislike follow-up commits undoing a previous commit's content.

Signed-off-by: Simon Zhou <jp.zdm2008@gmail.com>
@fivetime
fivetime force-pushed the fix/incremental-memory-opt-in branch from 3748e67 to 2e2f45a Compare August 14, 2026 03:25
@fivetime

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and squashed the follow-up into a single signed-off commit as requested. Thanks.

@stgraber
stgraber merged commit 3d9f841 into lxc:main Aug 14, 2026
89 checks passed
@fivetime
fivetime deleted the fix/incremental-memory-opt-in branch September 17, 2026 07:37
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.

2 participants