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

Enforce distinct hostnames network #10212

Open
wants to merge 3 commits into
base: 4.19
Choose a base branch
from

Conversation

vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Jan 20, 2025

Description

Fixes #9775

This PR adds check to ensure we check for unique hostname for other networks in the VPC as well.

This PR also adds another global setting vm.distinct.hostname.scope which sets the scope of resources for which the VMs should have a unique hostname. Default value is network.

Details

This pull request includes several changes to enhance the network domain search functionality and improve the configuration management for VM hostname uniqueness. The most important changes include adding new methods for network domain searches, updating the search builder initialization, and modifying the hostname uniqueness check logic.

Enhancements to network domain search functionality:

Improvements to VM hostname uniqueness check:

Mock implementation updates:

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?

@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 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 Jan 20, 2025

Codecov Report

Attention: Patch coverage is 1.25000% with 79 lines in your changes missing coverage. Please review.

Project coverage is 15.85%. Comparing base (9967bb3) to head (91344bf).
Report is 5 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% 57 Missing ⚠️
...ain/java/com/cloud/network/dao/NetworkDaoImpl.java 0.00% 22 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #10212      +/-   ##
============================================
+ Coverage     15.13%   15.85%   +0.72%     
- Complexity    11274    11279       +5     
============================================
  Files          5408     5042     -366     
  Lines        473974   444507   -29467     
  Branches      57813    52651    -5162     
============================================
- Hits          71730    70474    -1256     
+ Misses       394227   366156   -28071     
+ Partials       8017     7877     -140     
Flag Coverage Δ
uitests ?
unittests 15.85% <1.25%> (-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.

@blueorangutan
Copy link

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

@vishesh92 vishesh92 force-pushed the enforce-distinct-hostnames-network branch from befd5a5 to 8888b27 Compare January 20, 2025 12:27
@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 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 12130

@vishesh92 vishesh92 marked this pull request as ready for review January 21, 2025 06:26
@DaanHoogland DaanHoogland added this to the 4.19.2 milestone Jan 21, 2025
@vishesh92 vishesh92 force-pushed the enforce-distinct-hostnames-network branch from d7336c1 to c9855aa Compare January 21, 2025 10:39
@vishesh92 vishesh92 force-pushed the enforce-distinct-hostnames-network branch 2 times, most recently from fbd4153 to 5aa2b60 Compare January 21, 2025 10:43
@vishesh92 vishesh92 force-pushed the enforce-distinct-hostnames-network branch from 5aa2b60 to 91344bf Compare January 21, 2025 10:44
@vishesh92
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 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.

@apache apache deleted a comment from blueorangutan Jan 21, 2025
@blueorangutan
Copy link

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

@vishesh92
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

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

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.

Option to restrict duplicate instance names in same network domain, VPC etc
3 participants