Skip to content

Config 'vm.network.nic.max.secondary.ipaddresses' - Update default value (and value if not set) to 10 as per the config description and default value in parseInt of the config #11256

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

Conversation

sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Jul 22, 2025

Description

This PR updates the config 'vm.network.nic.max.secondary.ipaddresses' default value (and value if not set) to 10 as per the config description (as per the last relevant commit: 0b956bb) and default value in parseInt of the config (here: 4925b9f).

Fixes #11250

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?

Verified the config 'vm.network.nic.max.secondary.ipaddresses' default value & value.

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 updates the default value for the configuration 'vm.network.nic.max.secondary.ipaddresses' from 256 to 10 to align with its config description and improve consistency between the default value definition and fallback parsing logic.

  • Updates the config enum default value from "256" to "10"
  • Modifies NetworkServiceImpl to use the config's default value as fallback instead of hardcoded 10
  • Adds database migration scripts to update existing installations

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Config.java Updates MaxNumberOfSecondaryIPsPerNIC default value from "256" to "10"
NetworkServiceImpl.java Changes fallback value in parseInt from hardcoded 10 to config's default value
schema-42010to42020.sql Database migration script to update default and null values
schema-42010to42020-cleanup.sql Empty cleanup script for the migration
Upgrade42010to42020.java Database upgrade handler for version 4.20.1.0 to 4.20.2.0
DatabaseUpgradeChecker.java Registers the new upgrade handler in the upgrade chain

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

Copy link

codecov bot commented Jul 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 16.74%. Comparing base (22b753e) to head (74fddd7).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ain/java/com/cloud/network/NetworkServiceImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              main   #11256       +/-   ##
============================================
+ Coverage     3.89%   16.74%   +12.84%     
- Complexity       0    14062    +14062     
============================================
  Files          417     5724     +5307     
  Lines        33973   507787   +473814     
  Branches      6097    61734    +55637     
============================================
+ Hits          1324    85027    +83703     
- Misses       32491   413282   +380791     
- Partials       158     9478     +9320     
Flag Coverage Δ
uitests 3.89% <ø> (ø)
unittests 17.66% <0.00%> (?)

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.

@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 14292

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

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM

Verified manually

Set the global setting "vm.network.nic.max.secondary.ipaddresses" to 11

  1. Created a VM with isolated network
  2. Add 11 secondary IP to VM
  3. Exception observed if the user tries to add 12 the secondary IP

@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

@DaanHoogland
Copy link
Contributor

This will need some upgrade testing @sureshanaparti :

  • 4.19 -> 4.21
  • 4.20.1 -> 4.21

@blueorangutan
Copy link

[SF] Trillian test result (tid-13850)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 55399 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11256-t13850-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

@DaanHoogland DaanHoogland modified the milestones: 4.20.2, 4.21.0 Jul 24, 2025
@DaanHoogland
Copy link
Contributor

After a bit of backtalk with @sureshanaparti , we agreed to move this to 4.21 as 4.20.1 -> 4.20.2 -> 4.21 upgrades for this will be tricky and this is only a minor issue.

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.20 to main July 24, 2025 12:57
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 24, 2025
@sureshanaparti sureshanaparti moved this from Done to In Progress in Apache CloudStack 4.21.0 Jul 24, 2025
…e (and value if not set) to 10 as per the config description and default value in parseInt of the config
@sureshanaparti sureshanaparti force-pushed the config-vm.network.nic.max.secondary.ipaddresses-default-value-sync branch from 4cebdd0 to 74fddd7 Compare July 24, 2025 13:00
@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 14353

@DaanHoogland
Copy link
Contributor

upgrades tested from 4.19 and 4.20

@DaanHoogland DaanHoogland merged commit ae50103 into apache:main Jul 25, 2025
20 of 26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.21.0 Jul 25, 2025
@DaanHoogland DaanHoogland deleted the config-vm.network.nic.max.secondary.ipaddresses-default-value-sync branch July 25, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Allocating guest IP for nic failed: Maximum No of IPs per NIC has been crossed
4 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