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 2020/08/25 15:04:37 UTC

[GitHub] [cloudstack] Spaceman1984 opened a new pull request #4284: Fixed delayed power state update after vm shutdown

Spaceman1984 opened a new pull request #4284:
URL: https://github.com/apache/cloudstack/pull/4284


   ## Description
   <!--- Describe your changes in detail -->
   After a vm is shutdown, the power state isn't updated immediately. This prevents changing the service offering.
   This PR updates the power state immediately after the vm is confirmed to be shutdown.
   
   <!-- 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: # -->
   Fixes: #3159 
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] 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)
   
   ## Screenshots (if appropriate):
   
   ## 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. -->
   This has been tested by starting a vm, waiting for the power state in the db to be updated to powerOn, then shutting down the vm and as soon as the vm is down, checking the power state in the db. Can also be verified by changing the service offering after stopping the vm.
   
   <!-- 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] blueorangutan commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


   @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 #4284: Fixed delayed power state update after vm shutdown

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



##########
File path: engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
##########
@@ -1657,6 +1657,10 @@ protected boolean sendStop(final VirtualMachineGuru guru, final VirtualMachinePr
                     return false;
                 }
 
+                final UserVmVO userVm = _userVmDao.findById(vm.getId());
+                userVm.setPowerState(PowerState.PowerOff);
+                _userVmDao.update(userVm.getId(), userVm);
+
                 guru.finalizeStop(profile, answer);

Review comment:
       @Spaceman1984 should we update the power state after guru finalises the stop? What is there is an exception then the power state will be off while VM may actually be running?




----------------------------------------------------------------
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] Spaceman1984 commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


   @blueorangutan test centos7 vmware-67u3


----------------------------------------------------------------
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 #4284: Fixed delayed power state update after vm shutdown

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


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


----------------------------------------------------------------
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 #4284: Fixed delayed power state update after vm shutdown

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


   <b>Trillian test result (tid-2594)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 57072 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4284-t2594-vmware-67u3.zip
   Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
   Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Smoke tests completed. 79 look OK, 2 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_07_reboot_ssvm | `Failure` | 41.27 | test_ssvm.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 565.58 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 3851.59 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 3851.63 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 0.03 | test_vpc_redundant.py
   ContextSuite context=TestVPCRedundancy>:teardown | `Error` | 0.05 | test_vpc_redundant.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] blueorangutan commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


   @Spaceman1984 unsupported parameters provided. Supported mgmt server os are: `centos6, centos7, centos8, ubuntu`. Supported hypervisors are: `kvm-centos6, kvm-centos7, kvm-centos8, kvm-ubuntu, xenserver-71, xenserver-65sp1, vmware-67u3, vmware-65u2, vmware-60u2, vmware-55u3, xcpng76, xcpng80, xcpng81, xenserver-74, xcpng74`


----------------------------------------------------------------
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] Spaceman1984 commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


   @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] Spaceman1984 commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


   @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 #4284: Fixed delayed power state update after vm shutdown

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


   @Spaceman1984 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 #4284: Fixed delayed power state update after vm shutdown

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


   @Spaceman1984 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] Spaceman1984 commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


   @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 merged pull request #4284: Fixed delayed power state update after vm shutdown

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


   


----------------------------------------------------------------
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 #4284: Fixed delayed power state update after vm shutdown

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


   @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] blueorangutan commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


   @Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) 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] blueorangutan commented on pull request #4284: Fixed delayed power state update after vm shutdown

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


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


----------------------------------------------------------------
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] Spaceman1984 commented on a change in pull request #4284: Fixed delayed power state update after vm shutdown

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



##########
File path: engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
##########
@@ -1657,6 +1657,10 @@ protected boolean sendStop(final VirtualMachineGuru guru, final VirtualMachinePr
                     return false;
                 }
 
+                final UserVmVO userVm = _userVmDao.findById(vm.getId());
+                userVm.setPowerState(PowerState.PowerOff);
+                _userVmDao.update(userVm.getId(), userVm);
+
                 guru.finalizeStop(profile, answer);

Review comment:
       np @rhtyd, I'll move it down.




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