cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

check for active MSses before starting DB upgrade

Open DaanHoogland opened this issue 1 month ago • 7 comments

Description

This PR...

Fixes: #11973

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?

DaanHoogland avatar Nov 26 '25 14:11 DaanHoogland

Codecov Report

:x: Patch coverage is 56.14035% with 25 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 16.19%. Comparing base (028dd86) to head (e79dacb). :warning: Report is 10 commits behind head on 4.20.

Files with missing lines Patch % Lines
...java/com/cloud/upgrade/DatabaseUpgradeChecker.java 56.14% 22 Missing and 3 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12140      +/-   ##
============================================
+ Coverage     16.18%   16.19%   +0.01%     
- Complexity    13298    13304       +6     
============================================
  Files          5657     5657              
  Lines        498470   498511      +41     
  Branches      60493    60505      +12     
============================================
+ Hits          80660    80725      +65     
+ Misses       408830   408800      -30     
- Partials       8980     8986       +6     
Flag Coverage Δ
uitests 4.00% <ø> (-0.01%) :arrow_down:
unittests 17.04% <56.14%> (+0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Nov 26 '25 14:11 codecov[bot]

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

blueorangutan avatar Dec 02 '25 09:12 blueorangutan

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

blueorangutan avatar Dec 02 '25 17:12 blueorangutan

@blueorangutan test

DaanHoogland avatar Dec 03 '25 07:12 DaanHoogland

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

blueorangutan avatar Dec 03 '25 07:12 blueorangutan

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

Test Result Time (s) Test File

blueorangutan avatar Dec 03 '25 09:12 blueorangutan

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

Test Result Time (s) Test File

blueorangutan avatar Dec 03 '25 22:12 blueorangutan

there might be an issue if the MS state is incorrect (for example MS is Down but the state is still Up) but this will avoid the incidental upgrade of a mgmt server while but other mgmt servers are still running.

I think it is good. this brings more benefits than disadvantages.

tnx @weizhouapache , as mentioned off-line I’ll add a doc PR to address any in-clarities in the changed behaviour.

DaanHoogland avatar Dec 12 '25 14:12 DaanHoogland