Skip to content

CA-380789: Not get power_state from snapshots with suspend VDIs #5148

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

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

minglumlu
Copy link
Member

This commit is to fix an issue which was introduced by 3d039f3. In VM migration, the suspend_vdis will be get from snapshots the power_state of which is `Suspended. The individual snapshots are represented as VM records in XAPI as well. They are different with the base VM record.

This commit reverts this part to the logic prior to 3d039f3.

This commit is to fix an issue which was introduced by 3d039f3.
In VM migration, the suspend_vdis will be get from snapshots the
power_state of which is `Suspended. The individual snapshots are
represented as VM records in XAPI as well. They are different with the
base VM record.

This commit reverts this part to the logic prior to 3d039f3.

Signed-off-by: Ming Lu <[email protected]>
Comment on lines 1243 to +1244
(fun acc vm ->
if power_state = `Suspended then
if Db.VM.get_power_state ~__context ~self:vm = `Suspended then
Copy link
Member

Choose a reason for hiding this comment

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

It's clear how reverting fixes the issue, maybe rename the binding to make sure it can't be mistaken again?

Suggested change
(fun acc vm ->
if power_state = `Suspended then
if Db.VM.get_power_state ~__context ~self:vm = `Suspended then
(fun acc vm_or_snapshot ->
let power_state = Db.VM.get_power_state ~__context ~self:vm_or_snapshot then
if power_state = `Suspended then

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's minimize the changes at this stage :)

@minglumlu minglumlu merged commit df7cbfd into xapi-project:master Aug 14, 2023
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