Skip to content

Fix MS Host duplicate registration#13560

Draft
Pearl1594 wants to merge 3 commits into
4.20from
fix-mshost-duplicate-registration
Draft

Fix MS Host duplicate registration#13560
Pearl1594 wants to merge 3 commits into
4.20from
fix-mshost-duplicate-registration

Conversation

@Pearl1594

Copy link
Copy Markdown
Contributor

Description

In a Kubernetes setup with a stateful set configuration, virtual ip/mac address keeps changing while hostname is kept constant. In such a case, restarting pods results in multiple hosts registered with same hostname as we register using mac or ip address. This PR uses hostname as well to look for existing management server before registering a new one. Hostname could be null, in which case the implementation is same as what was present earlier.

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

Screenshots (if appropriate):

How Has This Been Tested?

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

@Pearl1594 Pearl1594 requested a review from nvazquez July 7, 2026 14:34
@Pearl1594 Pearl1594 marked this pull request as draft July 7, 2026 14:34
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.07692% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.71%. Comparing base (3d7d412) to head (78516ea).
⚠️ Report is 71 commits behind head on 4.20.

Files with missing lines Patch % Lines
...ain/java/com/cloud/cluster/ClusterManagerImpl.java 0.00% 16 Missing ⚠️
...cloud/cluster/dao/ManagementServerHostDaoImpl.java 60.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #13560      +/-   ##
============================================
+ Coverage     16.26%   16.71%   +0.45%     
- Complexity    13429    14117     +688     
============================================
  Files          5661     5667       +6     
  Lines        500010   521396   +21386     
  Branches      60715    69941    +9226     
============================================
+ Hits          81331    87170    +5839     
- Misses       409606   424543   +14937     
- Partials       9073     9683     +610     
Flag Coverage Δ
uitests 4.09% <ø> (-0.07%) ⬇️
unittests 17.58% <23.07%> (+0.45%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
16.4% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants