You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/02/11 08:04:40 UTC

[GitHub] [cloudstack] sureshanaparti opened a new pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

sureshanaparti opened a new pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681


   ### Description
   Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM 
   
   This PR addresses the following:
   
   - Replaces the legacy stop/start logic to reboot VM on KVM, with libvirt's native reboot operation that will use ACPI event based rebooting.
   - Introduced a 'forced' parameter in the rebootVirtualMachine API, which facilitates to stop and start the VM.
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### 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)
   - [x] 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
   
   
   ### Screenshots (if appropriate):
   Reboot Dialog with Force option in the UI:
   
   <img width="836" alt="RebootDialogWithForceOption_UI" src="https://user-images.githubusercontent.com/12028987/107613131-aaefa800-6c6d-11eb-94ab-e6f0c3908462.png">
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   - Deployed a VM (on KVM), and Performed normal Reboot.
   - Deployed a VM (on KVM), and Performed force Reboot.
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777984847


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777985097


   @sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574335490



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -964,6 +964,15 @@ private UserVm rebootVirtualMachine(long userId, long vmId, boolean enterSetup)
         if (vm.getState() == State.Running && vm.getHostId() != null) {
             collectVmDiskStatistics(vm);
             collectVmNetworkStatistics(vm);
+
+            if (forced) {
+                Host vmOnHost = _hostDao.findById(vm.getHostId());
+                if (vmOnHost == null || vmOnHost.getResourceState() != ResourceState.Enabled || vmOnHost.getStatus() != Status.Up ) {

Review 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.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780329969


   @sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777285309


   @sureshanaparti is rebooting VM with forced=true|false covered in VM lifecycle smoketests?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r575000740



##########
File path: ui/src/config/section/compute.js
##########
@@ -125,6 +125,7 @@ export default {
           show: (record) => { return ['Running'].includes(record.state) },
           args: (record, store) => {
             var fields = []
+            fields.push('forced')

Review 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.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574327182



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2910,7 +2937,8 @@ public UserVm rebootVirtualMachine(RebootVMCmd cmd) throws InsufficientCapacityE
         if (enterSetup != null && enterSetup && !HypervisorType.VMware.equals(vmInstance.getHypervisorType())) {
             throw new InvalidParameterValueException("Booting into a hardware setup menu is not implemented on " + vmInstance.getHypervisorType());
         }
-        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());

Review comment:
       @sureshanaparti does forced parameter cause it to perform a stop/start at orchestration level?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-786366036


   <b>Trillian test result (tid-3619)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 32387 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4681-t3619-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Smoke tests completed. 85 look OK, 1 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_migrate_VM_and_root_volume | `Error` | 59.21 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 51.15 | test_vm_life_cycle.py
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780741150


   @blueorangutan test matrix


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-791902141


   Bobby has confirmed manual testing. LGTM, let's merge.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574336857



##########
File path: ui/src/config/section/compute.js
##########
@@ -125,6 +125,7 @@ export default {
           show: (record) => { return ['Running'].includes(record.state) },
           args: (record, store) => {
             var fields = []
+            fields.push('forced')

Review 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 ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780741862


   @sureshanaparti a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574335490



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -964,6 +964,15 @@ private UserVm rebootVirtualMachine(long userId, long vmId, boolean enterSetup)
         if (vm.getState() == State.Running && vm.getHostId() != null) {
             collectVmDiskStatistics(vm);
             collectVmNetworkStatistics(vm);
+
+            if (forced) {
+                Host vmOnHost = _hostDao.findById(vm.getHostId());
+                if (vmOnHost == null || vmOnHost.getResourceState() != ResourceState.Enabled || vmOnHost.getStatus() != Status.Up ) {

Review comment:
       @rhtyd Start VM will fail when host is not Enabled and not Up. As the force reboot stops and starts the VM, the start VM would fail, and so it's safe to not allow when force reboot when host is not Enabled and not Up.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780329998


   > > @sureshanaparti is rebooting VM with forced=true|false covered in VM lifecycle smoketests?
   > 
   > no, existing test(s) should cover forced=false, will add test(s) for forced=true.
   
   @rhtyd Added tests to cover reboot with forced=true, for User VM, System VM and Router.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780665144


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780665972


   @sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-785036839


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-786048936


   @borisstoyanov are you lgtm on this?
   @blueorangutan test


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777268425


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-785037069


   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-786049431


   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574326766



##########
File path: ui/src/config/section/compute.js
##########
@@ -125,6 +125,7 @@ export default {
           show: (record) => { return ['Running'].includes(record.state) },
           args: (record, store) => {
             var fields = []
+            fields.push('forced')

Review comment:
       @sureshanaparti what about systemvms, VR?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777269229


   @sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777359188


   > @sureshanaparti is rebooting VM with forced=true|false covered in VM lifecycle smoketests?
   
   no, existing test(s) should cover forced=false, will add test(s) for forced=true.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd merged pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-785075268


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2821


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780329405


   @blueorangutan package


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780691435


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2726


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-780353345


   Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2719


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574328960



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -964,6 +964,15 @@ private UserVm rebootVirtualMachine(long userId, long vmId, boolean enterSetup)
         if (vm.getState() == State.Running && vm.getHostId() != null) {
             collectVmDiskStatistics(vm);
             collectVmNetworkStatistics(vm);
+
+            if (forced) {
+                Host vmOnHost = _hostDao.findById(vm.getHostId());
+                if (vmOnHost == null || vmOnHost.getResourceState() != ResourceState.Enabled || vmOnHost.getStatus() != Status.Up ) {

Review comment:
       @sureshanaparti is this a new behaviour, did it use to throw exception/fail when host is not enabled or up without forced=true?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777291161


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2675


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-777999455


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2679


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s)

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#issuecomment-781054119


   <b>Trillian test result (tid-3566)</b>
   Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 37807 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4681-t3566-vmware-65u2.zip
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
   Smoke tests completed. 85 look OK, 1 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_03_deploy_and_upgrade_kubernetes_cluster | `Failure` | 779.21 | test_kubernetes_clusters.py
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4681: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #4681:
URL: https://github.com/apache/cloudstack/pull/4681#discussion_r574335851



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2910,7 +2937,8 @@ public UserVm rebootVirtualMachine(RebootVMCmd cmd) throws InsufficientCapacityE
         if (enterSetup != null && enterSetup && !HypervisorType.VMware.equals(vmInstance.getHypervisorType())) {
             throw new InvalidParameterValueException("Booting into a hardware setup menu is not implemented on " + vmInstance.getHypervisorType());
         }
-        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());

Review comment:
       yes @rhtyd 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org