Skip to content

[Draft] vm: add Expunged as final VM state and enable expunge VMs in Expunging state#7029

Closed
weizhouapache wants to merge 8 commits intoapache:mainfrom
weizhouapache:4.18-add-vm-state-Expunged
Closed

[Draft] vm: add Expunged as final VM state and enable expunge VMs in Expunging state#7029
weizhouapache wants to merge 8 commits intoapache:mainfrom
weizhouapache:4.18-add-vm-state-Expunged

Conversation

@weizhouapache
Copy link
Copy Markdown
Member

Description

main changes of this PR

  • Introduce a new state Expunged which is final vm state (currently the final vm state is Expunging)
  • Enable expunge a vm in Expunging state (current the action is disabled)
  • Update vm state to Expunged if succeed to expunge a VM
  • Update vm state to Error if fail to expunge a VM
  • Add Expunged but not removed VMs to VM cleanup task.

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)

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?

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 28, 2022

Codecov Report

Merging #7029 (419fe3d) into main (5665782) will increase coverage by 0.01%.
The diff coverage is 11.86%.

@@             Coverage Diff              @@
##               main    #7029      +/-   ##
============================================
+ Coverage     11.76%   11.78%   +0.01%     
- Complexity     7661     7671      +10     
============================================
  Files          2503     2503              
  Lines        245958   245968      +10     
  Branches      38374    38378       +4     
============================================
+ Hits          28946    28990      +44     
+ Misses       213248   213200      -48     
- Partials       3764     3778      +14     
Impacted Files Coverage Δ
...tack/engine/orchestration/NetworkOrchestrator.java 6.11% <0.00%> (ø)
...ain/java/com/cloud/vm/dao/ConsoleProxyDaoImpl.java 0.69% <0.00%> (ø)
...ain/java/com/cloud/vm/dao/DomainRouterDaoImpl.java 33.77% <0.00%> (ø)
...va/com/cloud/vm/dao/SecondaryStorageVmDaoImpl.java 0.77% <0.00%> (ø)
.../src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java 0.75% <0.00%> (ø)
.../main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java 25.65% <0.00%> (ø)
.../cloud/baremetal/manager/BaremetalManagerImpl.java 0.00% <0.00%> (ø)
...ck/network/contrail/model/VirtualMachineModel.java 23.83% <ø> (ø)
...ager/allocator/impl/UserConcentratedAllocator.java 0.00% <0.00%> (ø)
...ava/com/cloud/api/query/dao/UserVmJoinDaoImpl.java 3.20% <0.00%> (+0.01%) ⬆️
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a 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
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5139

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan test matrix

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian Build Failed (tid-5710)

@weizhouapache weizhouapache added this to the 4.18.0.0 milestone Dec 30, 2022
@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a 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
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5142

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-5708)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39310 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7029-t5708-xenserver-71.zip
Smoke tests completed. 106 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-5709)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
Total time taken: 44081 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7029-t5709-vmware-67u3.zip
Smoke tests completed. 106 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-5711)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43722 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7029-t5711-kvm-centos7.zip
Smoke tests completed. 106 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@weizhouapache
Copy link
Copy Markdown
Member Author

@DaanHoogland
could you please review this PR ? thanks

Comment thread api/src/main/java/com/cloud/vm/VirtualMachine.java Outdated
Copy link
Copy Markdown
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

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a 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.

Co-authored-by: dahn <daan.hoogland@gmail.com>
@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a 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
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5158

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5159

@weizhouapache
Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-5735)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39894 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7029-t5735-kvm-centos7.zip
Smoke tests completed. 106 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland DaanHoogland marked this pull request as ready for review January 9, 2023 09:43
@weizhouapache
Copy link
Copy Markdown
Member Author

@DaanHoogland
moved to draft. let's revisit afterwards

@weizhouapache weizhouapache modified the milestones: 4.18.0.0, 4.18.1.0 Jan 12, 2023
@weizhouapache weizhouapache marked this pull request as draft January 12, 2023 08:08
@weizhouapache
Copy link
Copy Markdown
Member Author

small fix: #7086

@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

13.4% 13.4% Coverage
2.7% 2.7% Duplication

@weizhouapache weizhouapache changed the title vm: add Expunged as final VM state and enable expunge VMs in Expunging state [WIP] vm: add Expunged as final VM state and enable expunge VMs in Expunging state Jan 17, 2023
@weizhouapache weizhouapache changed the title [WIP] vm: add Expunged as final VM state and enable expunge VMs in Expunging state [Draft] vm: add Expunged as final VM state and enable expunge VMs in Expunging state Jan 17, 2023
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jan 27, 2023

@weizhouapache should this be closed as the simpler fix is merged now? https://github.com/apache/cloudstack/pull/7086/files ?

@weizhouapache weizhouapache modified the milestones: 4.18.1.0, 4.19.0.0 Feb 21, 2023
@weizhouapache weizhouapache deleted the 4.18-add-vm-state-Expunged branch June 23, 2023 13:08
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.

4 participants