Deprecate send-migration local flag in favor of memory_mode=local - #8820
Draft
phip1611 wants to merge 2 commits into
Draft
Deprecate send-migration local flag in favor of memory_mode=local#8820phip1611 wants to merge 2 commits into
phip1611 wants to merge 2 commits into
Conversation
Local migration was modeled as a boolean orthogonal to MigrationMode, although the two were never independent: local+postcopy was rejected and local made precopy meaningless. Fold it into the enum as MigrationMode::Local so only the three valid states are representable. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
With MigrationMode::Local in place, the boolean local() helper hid the third state: "not local" still split into precopy and postcopy at every call site. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
phip1611
commented
Aug 28, 2026
| #[derive(Copy, Clone, Default, Deserialize, Serialize, Debug, PartialEq, Eq)] | ||
| pub enum MigrationMode { | ||
| /// Transfer memory as memory FDs via a UNIX socket. | ||
| Local, |
Member
Author
There was a problem hiding this comment.
@rbradford @sboeuf while on it. I really dislike the name local. Mind changing it? And isn't every UNIX domain socket migration (unix://) kinda local so the name was misleading since forever?
Member
There was a problem hiding this comment.
--local sends the FDs for the memory so no copy so it's different. But a name that conveys that meaning would be an improvement.
| /// field directly; use [`Self::effective_memory_mode`], which translates | ||
| /// the old flag to the new setting. | ||
| #[deprecated(note = "set `memory_mode` to `MigrationMode::Local` instead")] | ||
| #[serde(default)] |
Member
Author
There was a problem hiding this comment.
@rbradford @sboeuf Do we have a process for fading out functionality from the API? I think this should be covered with the new #8751 we merged.
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.
Since we have
MigrationModedescribing the ways memory gets migrated from A to B, we should fold thelocalflag into this. I really love this cleanup. It makes so much more sense to model it in code like this.Steps to Undraft