Skip to content

Update CIDR/Gateway of the Shared Networks from Guest IP ranges #11249

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Jul 20, 2025

Description

This PR updates the CIDR/Gateway of the Shared Networks from Guest IP ranges.

CIDR/Gateway list are maintained for shared networks in networks table (null when there are no Guest IP ranges), and only the first one would be returned through the list networks response (for backward compatibility).

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?

Created a shared network with gateway/netmask/startip/endip, Checked the network cidr/gateway after the following operations - added more guest ip ranges to the shared network, removed some ranges and added new ranges, removed all ranges and added new ranges. Deployed instances on the shared network.

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

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances shared network functionality by allowing network CIDR and gateway fields to store comma-separated values representing multiple IP ranges. When guest IP ranges are added or removed from a shared network, the corresponding CIDR and gateway values are automatically updated to reflect all active ranges.

  • Adds utility methods for managing comma-separated strings and extracting first values
  • Modifies network CIDR/gateway management to support multiple values during IP range operations
  • Updates API responses to display only the first CIDR/gateway value for backward compatibility

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
StringUtils.java Adds utility methods for comma-separated string manipulation and first value extraction
ConfigurationManagerImpl.java Updates VLAN creation/deletion to maintain network CIDR/gateway lists
ApiResponseHelper.java Modifies network response to show first CIDR/gateway value only
schema-41930to41940.sql Increases database column sizes for CIDR and gateway fields
schema-41930to41940-cleanup.sql Empty cleanup script for database migration
Upgrade41930to41940.java Database upgrade handler for version 4.19.3.0 to 4.19.4.0
Upgrade41920to41930.java Database upgrade handler for version 4.19.2.0 to 4.19.3.0
DatabaseUpgradeChecker.java Registers new upgrade handlers in the upgrade chain

@sureshanaparti sureshanaparti added this to the 4.19.4 milestone Jul 20, 2025
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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 Jul 20, 2025

Codecov Report

❌ Patch coverage is 0% with 112 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.76%. Comparing base (0d4147f) to head (500d375).

Files with missing lines Patch % Lines
.../cloud/configuration/ConfigurationManagerImpl.java 0.00% 54 Missing ⚠️
...com/cloud/network/element/BigSwitchBcfElement.java 0.00% 27 Missing ⚠️
...ils/src/main/java/com/cloud/utils/StringUtils.java 0.00% 22 Missing ⚠️
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11249      +/-   ##
============================================
- Coverage     16.76%   16.76%   -0.01%     
+ Complexity    14285    14283       -2     
============================================
  Files          5767     5767              
  Lines        512657   512734      +77     
  Branches      62359    62370      +11     
============================================
- Hits          85950    85941       -9     
- Misses       417108   417194      +86     
  Partials       9599     9599              
Flag Coverage Δ
uitests 3.85% <ø> (ø)
unittests 17.68% <0.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.

@blueorangutan
Copy link

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

@sureshanaparti
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@sureshanaparti sureshanaparti modified the milestones: 4.19.4, 4.20.2, 4.21.0 Jul 25, 2025
@sureshanaparti sureshanaparti force-pushed the cidr-gateway-from-guest-ip-ranges-for-shared-nw branch from 01ef7f3 to 278a0b4 Compare July 25, 2025 14:23
Copy link

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

@sureshanaparti sureshanaparti changed the base branch from 4.19 to main July 25, 2025 14:24
@sureshanaparti sureshanaparti force-pushed the cidr-gateway-from-guest-ip-ranges-for-shared-nw branch from 278a0b4 to 500d375 Compare July 25, 2025 14:26
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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 14374

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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 14377

@nvazquez
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_list_zones_metrics Error 0.25 test_metrics_api.py

Copy link
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

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_list_zones_metrics Error 0.24 test_metrics_api.py

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy