Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s) #4681
Conversation
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
| show: (record) => { return ['Running'].includes(record.state) }, | ||
| args: (record, store) => { | ||
| var fields = [] | ||
| fields.push('forced') |
There was a problem hiding this comment.
@sureshanaparti what about systemvms, VR?
The reboot for systemVMs and VR are performed using rebootSystemVm and rebootRouter APIs respectively, should add support for these as well ?
There was a problem hiding this comment.
Added 'forced' reboot option for System VM and Router, as well. Existing reboot router operation already stops and starts the router, so the new 'forced' flag, would force stop and then start the router.
| } | ||
| UserVm userVm = rebootVirtualMachine(CallContext.current().getCallingUserId(), vmId, enterSetup == null ? false : cmd.getBootIntoSetup()); | ||
|
|
||
| UserVm userVm = rebootVirtualMachine(CallContext.current().getCallingUserId(), vmId, enterSetup == null ? false : cmd.getBootIntoSetup(), cmd.isForced()); |
There was a problem hiding this comment.
@sureshanaparti does forced parameter cause it to perform a stop/start at orchestration level?
|
|
||
| if (forced) { | ||
| Host vmOnHost = _hostDao.findById(vm.getHostId()); | ||
| if (vmOnHost == null || vmOnHost.getResourceState() != ResourceState.Enabled || vmOnHost.getStatus() != Status.Up ) { |
There was a problem hiding this comment.
@sureshanaparti is this a new behaviour, did it use to throw exception/fail when host is not enabled or up without forced=true?
There was a problem hiding this comment.
@rhtyd Start VM can fail (or) either pick another host when the VM's host is not Enabled / not Up. As the force reboot stops and starts the VM, there are chances that start VM would fail in that case, and so it's safe to not allow when force reboot when host is not Enabled / not Up.
yadvr
left a comment
There was a problem hiding this comment.
Some minor comments, testing required, otherwise LGTM.
|
@sureshanaparti is rebooting VM with forced=true|false covered in VM lifecycle smoketests? |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2675 |
no, existing test(s) should cover forced=false, will add test(s) for forced=true. |
68f6906 to
5c2c8c9
Compare
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2679 |
…ent, and Added 'forced' reboot option to stop and start the VM (using rebootVirtualMachine API)
- New parameter 'forced' in rebootSystemVm API, to stop and then start System VM - New parameter 'forced' in rebootRouter API, to force stop and then start Router
5c2c8c9 to
c66d297
Compare
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
@rhtyd Added tests to cover reboot with forced=true, for User VM, System VM and Router. |
|
Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2719 |
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2726 |
|
@blueorangutan test matrix |
|
@sureshanaparti a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3566)
|
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2821 |
|
@borisstoyanov are you lgtm on this? |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3619)
|
|
Bobby has confirmed manual testing. LGTM, let's merge. |
Description
Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s).
This PR addresses the following:
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Reboot Dialog with Force option in the UI:
How Has This Been Tested?