Validate updates to source while migrating#495
Merged
stgraber merged 30 commits intoFuturFusion:mainfrom Mar 6, 2026
Merged
Conversation
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…tches Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…on batch option Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…canceling queue entry Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…oint Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…ion status Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…ntries are waiting on it Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…l start errors Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…nitial running state Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
…hile migrating Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Signed-off-by: Max Asnaashari <max.asna@futurfusion.io>
Contributor
Author
|
@presztak Some UI changes will be needed here:
|
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.
Source data syncs are now permitted for instances in idle batches, however once a batch starts, manual and background syncing will be disabled for those VMs.
A new
Conflictstatus has been added for queue entries. This is similar toBlockedin that it is recoverable, but will not automatically self-resolve. A newPOST /1.0/queue/{uuid}/:resolveendpoint exists to resolve these entries, though this does not bypass the prior validation so if a conflicted entry is resolved with no changes, it will simply become conflicted again. This is true for every case except include-expression matching, which will only trigger a conflict once.Batches have
force_conflict_resolutionas a new config option underdefaults, which is false by default. This will attempt to ignore as many conflicts as possible. This can mean migrating VMs that no longer match the include expression of the batch, or migrating VMs with their initial placement and configuration, even after changes on the source.When starting a batch, if a prior source sync has caused a VM to no longer match the batch's include expression, a queue entry will still be created, but placed in the
ConflictstateOnce all worker tasks are complete, a final fetch of target and source data is made for each VM, and changes to the instance record are committed. If a VM's properties have changed, its placement will be recomputed (including rerunning the placement scriptlet, even if
rerun_scriptletsis false).Errored.Conflictstate. User must then update the VM on the source, or modify the placement scriptlet to fix the issue and then mark the queue entry as resolved.Conflictstate and the user must update the source, target, network overrides, or placement scriptlet to fix the issue and then mark the queue entry as resolved.Related changes:
Sources now have a
Syncingfield which is true/false indicating whether an active sync is in progress for that source.Batch reset now has a
--forceflag which will bypass validation and allow for cleaning up target VMs that are well into migration. All queue records will be cleared, but target instances for queue records that have fully completed won't be deleted.Batch reset now properly starts the source VM for all deleted target VMs
Queue cancel now has a
--cleanupand--forceflag. The former will perform the same cleanup as batch reset but for just this one queue entry. Force will allow for canceling and cleaning up queue entries in post-migration stages (except Finished).Background import verification status will not be reset for all disks if an instance's disk set changes in any way during a sync.
Uses Incus' agent wait pattern, and repeatedly tries to start the instance if it didn't start initially for some reason.
Changes some of the default CLI list columns to be more useful
include expressions for instances/networks will now parse UUID types as
uuid.String()internally. This means direct string comparison will work, but if someone is familiar with expr-lang and tries to directly calluuid.String(), the expression will not compile (it would end up asuuid.String().String()which is invalid).The placement scriptlet can now be modified while a batch is running, as long as no queue entries are in a state that precedes placement determination. This is always before instance creation, so can be bypassed by canceling those queue entries, updating the batch, and then restarting the canceled queue entries.
Placement now includes running state, which is set according to whatever state the source VM was in when the batch started. This is to distinguish from the instance record's own running state, which will change because we perform a final source sync and commit the results after the source VM has been explicitly powered off.
When completing migration and starting the target instance, if there are any errors, the queue entry will move to
Conflictstate so that last-minute tweaks can be made. The queue entry can then be marked resolved, which will run through the new source and target checks before updating the target instance again and trying to start it.