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

Cross-pool live migration: move CPU check to the target host #5111

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

robhoes
Copy link
Member

@robhoes robhoes commented Jul 14, 2023

This required adding VM_metrics to the metadata export/import.

robhoes added 3 commits July 12, 2023 14:10
This includes the current_domain_type field, which is important for live
imports, including those during a cross-pool live migration.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
The target host of a live migration is running by definition the same or
a newer version of the software compared to the source host. As CPU
checks are often extended or even changed in software updates, it is
best to perform such checks on the target host. However, currently it is
the source host that does these checks. This patch moves the check to
the target host.

A cross-pool live migration always begins with a dry-run VM-metadata
import on the target host. This is where checks for free memory and GPU
capacity are already carried out. The metadata import handler is
extended to accept a `check_cpu` query parameter to signal that a CPU
check is needed. This is included in the import call done in
`assert_can_migrate` on the source host, and the old CPU check in there
is dropped.

Source hosts without this patch will still perform the CPU checks
themselves, so we do not compromise safety.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
@robhoes robhoes marked this pull request as ready for review July 14, 2023 15:13
Copy link
Contributor

@lindig lindig left a comment

Choose a reason for hiding this comment

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

Just from a review it's difficult to say if this works but no obvious problems for me.

@robhoes robhoes merged commit e19cfd9 into xapi-project:master Jul 19, 2023
@robhoes robhoes deleted the check-cpu-on-remote branch July 19, 2023 11:04
github-merge-queue bot pushed a commit that referenced this pull request Dec 13, 2024
…CPU check to the target host (#6175)

Rebased the work from 2023 merged in #5111 and #5132, that caused issues
and was partially fixed in #5148, but was completely reverted in #5147.
I've integrated the fix from #5148 and additionally the fix suggested by
@minglumlu in CA-380715 that was not merged at the time due to time
constraints.

This series passed the tests that were originally failing: sxm-unres
(Job ID 4177739), vGPUSXMM60CrossPool (4177750), and also passed the
Ring3 BST+BVT (209341). I can run more migration tests if needed - I've
heard @Vincent-lau has requested for these to be separated into its own
suite instead of being only in Core and Distribution regression tests.
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.

3 participants