Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine/orchestration: fix missing vm powerstate update vm state #10407

Open
wants to merge 4 commits into
base: 4.20
Choose a base branch
from

Conversation

shwstppr
Copy link
Contributor

Description

Fixes #10406
VMs were not moving to Stopped state when PowerReportMissing is processed.

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)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Fixes apache#10406
VMs were not moving to Stopped state when PowerReportMissing is processed.

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.99%. Comparing base (789f94b) to head (00a13ca).
Report is 7 commits behind head on 4.20.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #10407   +/-   ##
=========================================
  Coverage     15.98%   15.99%           
- Complexity    13077    13083    +6     
=========================================
  Files          5649     5649           
  Lines        495624   495625    +1     
  Branches      60003    60003           
=========================================
+ Hits          79250    79268   +18     
+ Misses       407526   407506   -20     
- Partials       8848     8851    +3     
Flag Coverage Δ
uitests 4.01% <ø> (ø)
unittests 16.83% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm, but no idea if this has side effects.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12487

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm

2025-02-17T14:14:55,772 DEBUG [c.c.v.VirtualMachinePowerStateSyncImpl] (AgentManager-Handler-1:[]) (logid:) VM state report is updated. Host {"id":2,"name":"ref-trl-6851-k-Mu24-wei-zhou-kvm2","type":"Routing","uuid":"eb8661f9-6a36-4449-8923-cfe3fb849500"}, VM instance {"id":1159,"instanceName":"i-2-1159-VM","type":"User","uuid":"9e1de80e-ddcf-4c8b-87bc-1c1412292a46"}, power state: PowerReportMissing
2025-02-17T14:14:55,783 INFO  [c.c.v.ClusteredVirtualMachineManagerImpl] (AgentManager-Handler-1:[ctx-d817875a]) (logid:) VM VM instance {"id":1159,"instanceName":"i-2-1159-VM","type":"User","uuid":"9e1de80e-ddcf-4c8b-87bc-1c1412292a46"} is at Running and we received a PowerReportMissing report while there is no pending jobs on it
...
2025-02-17T14:14:55,843 INFO  [c.c.v.ClusteredVirtualMachineManagerImpl] (AgentManager-Handler-1:[ctx-d817875a]) (logid:) VM VM instance {"id":1159,"instanceName":"i-2-1159-VM","type":"User","uuid":"9e1de80e-ddcf-4c8b-87bc-1c1412292a46"} is sync-ed to at Stopped state according to power-off report from hypervisor.

@DaanHoogland DaanHoogland added this to the 4.20.1 milestone Feb 17, 2025
Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

clgtm

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

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

code LGTM

Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12498

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12499

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-12461)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 56397 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10407-t12461-kvm-ol8.zip
Smoke tests completed. 139 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_11_isolated_network_with_dynamic_routed_mode Error 2.27 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 2.35 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 2.35 test_ipv4_routing.py
test_06_purge_expunged_vm_background_task Failure 392.82 test_purge_expunged_vms.py

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.

VM state is not updated when it is stopped unexpectedly on hypervisor
9 participants