Skip to content

Fixed delayed power state update after vm shutdown#4284

Merged
yadvr merged 2 commits into
apache:masterfrom
shapeblue:error_changing_service_offering
Sep 1, 2020
Merged

Fixed delayed power state update after vm shutdown#4284
yadvr merged 2 commits into
apache:masterfrom
shapeblue:error_changing_service_offering

Conversation

@Spaceman1984
Copy link
Copy Markdown
Contributor

Description

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.

Fixes: #3159

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)

Screenshots (if appropriate):

How Has This Been Tested?

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.

@Spaceman1984
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

@yadvr yadvr added this to the 4.15.0.0 milestone Aug 26, 2020
Comment thread engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java Outdated
@Spaceman1984
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@Spaceman1984 Spaceman1984 marked this pull request as ready for review August 26, 2020 11:07
@blueorangutan
Copy link
Copy Markdown

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

@Spaceman1984
Copy link
Copy Markdown
Contributor Author

@blueorangutan test ?

@blueorangutan
Copy link
Copy Markdown

@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

@Spaceman1984
Copy link
Copy Markdown
Contributor Author

@blueorangutan test centos7 vmware-67u3

@blueorangutan
Copy link
Copy Markdown

@Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Aug 28, 2020

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@yadvr yadvr requested a review from DaanHoogland August 28, 2020 09:27
@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2594)
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

Copy link
Copy Markdown
Contributor

@wido wido left a comment

Choose a reason for hiding this comment

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

LGTM

Sounds logical!

@yadvr yadvr merged commit cb71774 into apache:master Sep 1, 2020
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.

Not possible to edit/change a VMware VM immediately after it's stopped

5 participants