Skip to content

bll: Allow resuming Paused/Suspended VMs with older custom compatibil… - #1178

Merged
dupondje merged 1 commit into
masterfrom
fix_resume_compat
Aug 26, 2026
Merged

bll: Allow resuming Paused/Suspended VMs with older custom compatibil…#1178
dupondje merged 1 commit into
masterfrom
fix_resume_compat

Conversation

@dupondje

Copy link
Copy Markdown
Member

…ity version

When a data center is upgraded to a newer compatibility version, VMs that were hibernated (Suspended) or Paused with an older custom compatibility version could no longer be resumed. The validation in RunVmCommand rejected them with ACTION_TYPE_FAILED_VM_COMPATIBILITY_VERSION_NOT_SUPPORTED, even though these VMs were already running with that version before the upgrade and are only being resumed, not started fresh.

Skip the custom compatibility version check when the VM status is Paused or Suspended, so that the RESUME_PAUSE and RESUME_HIBERNATE flows can proceed. The check is still enforced for VMs being started from Down status, preserving the existing protection against running a VM with an unsupported compatibility version.

Added tests covering:

  • Down VM with older custom compatibility version still fails validation
  • Suspended VM with older custom compatibility version now passes
  • Paused VM with older custom compatibility version now passes

Are you the owner of the code you are sending in, or do you have permission of the owner?

[y]

@peter-boden peter-boden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM apart from a small nit 😅

// Skip the compatibility version check when resuming a Paused or Suspended VM,
// since the VM was already running with its custom compatibility version before
// the data center was upgraded and is only being resumed, not started fresh.
if (getVm().getCustomCompatibilityVersion() != null &&

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The old code also did it, but the mixed use of getVm() and vm is confusing.

@dupondje
dupondje force-pushed the fix_resume_compat branch 3 times, most recently from 4a731cf to c5ad6ea Compare August 17, 2026 13:20
@dupondje
dupondje requested a review from peter-boden August 17, 2026 13:39
@dupondje dupondje self-assigned this Aug 17, 2026
@JasperB-TeamBlue

Copy link
Copy Markdown
Collaborator

/ost

@github-actions

Copy link
Copy Markdown

⏳ Running ost suite 'basic-suite-master' on distro 'centos9'.

Follow the progress here.

@github-actions

Copy link
Copy Markdown

😎💪 ost suite 'basic-suite-master' on distro 'centos9' finished successfully. (details)

@JasperB-TeamBlue JasperB-TeamBlue left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Functionality wise looking good, just a slight improvement that could be made on the test side of things.

…ity version

When a data center is upgraded to a newer compatibility version, VMs that
were hibernated (Suspended) or Paused with an older custom compatibility
version could no longer be resumed. The validation in RunVmCommand
rejected them with ACTION_TYPE_FAILED_VM_COMPATIBILITY_VERSION_NOT_SUPPORTED,
even though these VMs were already running with that version before the
upgrade and are only being resumed, not started fresh.

Skip the custom compatibility version check when the VM status is Paused
or Suspended, so that the RESUME_PAUSE and RESUME_HIBERNATE flows can
proceed. The check is still enforced for VMs being started from Down
status, preserving the existing protection against running a VM with an
unsupported compatibility version.

Added tests covering:
- Down VM with older custom compatibility version still fails validation
- Suspended VM with older custom compatibility version now passes
- Paused VM with older custom compatibility version now passes

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
@dupondje
dupondje merged commit 73c567c into master Aug 26, 2026
11 checks passed
@dupondje
dupondje deleted the fix_resume_compat branch August 26, 2026 14:06
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