Skip to content

kvm: use ACPI and signal based reboot on KVM#4528

Closed
yadvr wants to merge 1 commit intoapache:4.15from
shapeblue:libvirt-acpi-reboot
Closed

kvm: use ACPI and signal based reboot on KVM#4528
yadvr wants to merge 1 commit intoapache:4.15from
shapeblue:libvirt-acpi-reboot

Conversation

@yadvr
Copy link
Copy Markdown
Member

@yadvr yadvr commented Dec 10, 2020

This replace the legacy stop/start logic with libvirt's native reboot
operation that will use ACPI and signal based rebooting of VM on KVM
hosts.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

This replace the legacy stop/start logic with libvirt's native reboot
operation that will use ACPI and signal based rebooting of VM on KVM
hosts.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@weizhouapache
Copy link
Copy Markdown
Member

weizhouapache commented Dec 11, 2020

@wido
Copy link
Copy Markdown
Contributor

wido commented Dec 11, 2020

I'm ok with this.

Any modern distro has ACPI enabled and should respond to it. Nowadays it's usually systemd handling this but in older versions it's acpid.

@mlsorensen
Copy link
Copy Markdown
Contributor

If ACPI is off in the guest, that would apparently fail for any hypervisor that is using ACPI triggers to reboot. I haven't checked myself but I've been told that the Xen and VMware use ACPI triggers for the reboot API as well, and I think it would be expected behavior.

If it becomes an issue for KVM users who are accustomed to the current behavior, perhaps there can be a 'forced' option like stopVirtualMachine has, and that can be a shortcut to a full stop and start, so the various plugin workflows are properly called.

@weizhouapache
Copy link
Copy Markdown
Member

If ACPI is off in the guest, that would apparently fail for any hypervisor that is using ACPI triggers to reboot. I haven't checked myself but I've been told that the Xen and VMware use ACPI triggers for the reboot API as well, and I think it would be expected behavior.

If it becomes an issue for KVM users who are accustomed to the current behavior, perhaps there can be a 'forced' option like stopVirtualMachine has, and that can be a shortcut to a full stop and start, so the various plugin workflows are properly called.

@rhtyd it would be nice to have 'forced' option as @mlsorensen said.

@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Dec 24, 2020

That sounds sensible, thanks @mlsorensen @weizhouapache I'll update the logic to perform ACPI reboot (default), and if a forced API arg is provided do a stop + start (at the orchestration level, not in hypervisor plugin).

@DaanHoogland
Copy link
Copy Markdown
Contributor

code here looks good, are you still implementing the stop / start in this PR @rhtyd , or is that somewhere else?

@yadvr yadvr changed the base branch from master to 4.15 February 4, 2021 08:40
@yadvr yadvr modified the milestones: 4.16.0.0, 4.15.1.0 Feb 4, 2021
@sureshanaparti
Copy link
Copy Markdown
Contributor

code here looks good, are you still implementing the stop / start in this PR @rhtyd , or is that somewhere else?

@DaanHoogland @rhtyd Addressed the suggested changes on the PR: #4681 , which provides the forced reboot option (to stop and start VM), along with ACPI reboot for KVM VM.

@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Feb 11, 2021

Closing this old PR, in favour of the new

@yadvr yadvr closed this Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants