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

cks: cleanup clusters on owner account cleanup #10572

Draft
wants to merge 4 commits into
base: 4.19
Choose a base branch
from

Conversation

shwstppr
Copy link
Contributor

Description

When the owner account of k8s clusters is deleted, while its node VMs get expunged, the cluster entry in DB remain present. This PR fixes the issue by cleaning up all clusters for the account deleted.

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?

When the owner account of k8s clusters is deleted, while its node VMs
get expunged, the cluster entry in DB remain present. This PR fixex the
issue by cleaning up all clusters for the account deleted.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 15.16%. Comparing base (95c2481) to head (5a7d4a8).

Files with missing lines Patch % Lines
...bernetes/cluster/KubernetesClusterManagerImpl.java 63.63% 8 Missing ⚠️
...bernetes/cluster/dao/KubernetesClusterDaoImpl.java 0.00% 7 Missing ⚠️
...ubernetes/cluster/KubernetesServiceHelperImpl.java 0.00% 3 Missing ⚠️
...c/main/java/com/cloud/user/AccountManagerImpl.java 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10572   +/-   ##
=========================================
  Coverage     15.16%   15.16%           
- Complexity    11326    11331    +5     
=========================================
  Files          5414     5414           
  Lines        474804   474832   +28     
  Branches      57909    57911    +2     
=========================================
+ Hits          72002    72025   +23     
- Misses       394749   394753    +4     
- Partials       8053     8054    +1     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.89% <50.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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bernardodemarco bernardodemarco self-requested a review March 14, 2025 17:59
@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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 12789

@Pearl1594
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-12710)

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@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 12794

@shwstppr
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@shwstppr 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-12712)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 45348 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10572-t12712-kvm-ol8.zip
Smoke tests completed. 132 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_05_vmschedule_test_e2e Failure 362.41 test_vm_schedule.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants