Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: get migration target specs from their sources #807

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gjcolombo
Copy link
Contributor

Broken out from #806; related to #804.

Instead of checking the compatibility of migration source and target instance specs, have targets initialize from amended versions of their sources' specs. The benefits of doing this are that

  • The control plane no longer has to remember how it initialized a migration source in order to produce a compatible spec to send to the target, and
  • Most migration compatibility checks are no longer needed--the target's device definitions are compatible with the source's because they are the source's definitions.

Some components of the source spec, notably its Crucible and viona backends, do need to change during migration: Crucible backends need new generation numbers, and viona backends need the VNIC names that the target sled assigned to them. To accommodate this, the sync phase substitutes the target's Crucible and viona backend descriptors into the source's spec. The forthcoming API changes in the rest of #806 will formalize this more, but the current approach is sufficient to keep the PHD Crucible migration tests passing.

In the future, migration targets won't have a spec until the migration protocol has started. Prepare for this change as follows:

  • Create the VMM tokio runtime just before creating VM components instead of creating it up front and running the entire VM initialization process on it. This is needed because the runtime's thread count depends on the number of vCPUs in the VM, and that information comes from the instance spec.
  • Slightly adjust the instance_spec_get API to reflect that a spec might not be available if a VM is initializing via live migration.

Tests: cargo test, PHD.

@gjcolombo gjcolombo requested a review from hawkw November 13, 2024 00:16
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

overall, this looks great! i had a couple tiny nits.

bin/propolis-server/src/lib/migrate/compat.rs Outdated Show resolved Hide resolved
bin/propolis-server/src/lib/migrate/preamble.rs Outdated Show resolved Hide resolved
bin/propolis-server/src/lib/migrate/preamble.rs Outdated Show resolved Hide resolved
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.

2 participants