-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Enhance DHCP functionality by adding lease timeout support #12410
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
...s components. Updated DhcpEntryCommand to include lease time, modified VmDhcpConfig to handle lease time, and adjusted related scripts and configurations to accommodate this new parameter. This allows for configurable DHCP lease durations, improving flexibility in network management.
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:
- In case of a new feature add useful documentation (raise doc PR at https://github.com/apache/cloudstack-documentation)
- Be patient and persistent. It might take some time to get a review or get the final approval from the committers.
- Pay attention to the quality of your code, ensure tests are passing and your PR doesn't have conflicts.
- Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Issues, Mailing list and Slack.
- Be sure to read the CloudStack Coding Conventions.
Apache CloudStack is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@cloudstack.apache.org (https://cloudstack.apache.org/mailing-lists.html)
Slack: https://apachecloudstack.slack.com/
@DaanHoogland
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks generally good, one remark and also needs testing of course
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@ ## main #12410 +/- ## ============================================ + Coverage 17.76% 17.85% +0.09% - Complexity 15863 15984 +121 ============================================ Files 5923 5929 +6 Lines 530558 531102 +544 Branches 64830 64914 +84 ============================================ + Hits 94262 94851 +589 + Misses 425749 425636 -113 - Partials 10547 10615 +68
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DaanHoogland
commented
Jan 13, 2026
@NVShawn you have some conflicts with the style guards ; trailing white spaces and unused imports as far I saw.
DaanHoogland
commented
Jan 21, 2026
@blueorangutan package
blueorangutan
commented
Jan 21, 2026
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.
blueorangutan
commented
Jan 21, 2026
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 16474
sureshanaparti
commented
Jan 22, 2026
@blueorangutan package
blueorangutan
commented
Jan 22, 2026
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.
blueorangutan
commented
Jan 22, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 16484
DaanHoogland
commented
Jan 22, 2026
@NVShawn , every other time we get an unnecessary stubbing error in unpredictable order in
11:50:09 [INFO] Running org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest
11:50:09 [ERROR] Tests run: 34, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.196 s <<< FAILURE! - in org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest
11:50:12 [ERROR] unnecessary Mockito stubbings(org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest) Time elapsed: 0.019 s <<< ERROR!
11:50:12 org.mockito.exceptions.misusing.UnnecessaryStubbingException:
11:50:12
11:50:12 Unnecessary stubbings detected in test class: ManagementServerMaintenanceManagerImplTest
11:50:12 Clean & maintainable test code requires zero unnecessary code.
11:50:12 Following stubbings are unnecessary (click to navigate to relevant line of code):
11:50:12 1. -> at org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest.prepareForMaintenanceAndCancelFromPreparingForMaintenanceState(ManagementServerMaintenanceManagerImplTest.java:342)
11:50:12 Please remove unnecessary stubbings or use 'lenient' strictness. More info: javadoc for UnnecessaryStubbingException class.
11:50:12
11:50:12 [INFO]
11:50:12 [INFO] Results:
11:50:12 [INFO]
11:50:12 [ERROR] Errors:
11:50:12 [ERROR] ManagementServerMaintenanceManagerImplTest.unnecessary Mockito stubbings ? UnnecessaryStubbing
11:50:12 [INFO]
11:50:12 [ERROR] Tests run: 34, Failures: 0, Errors: 1, Skipped: 0
This time in the ubuntu build and last time in the EL build. I discussed quickly with @vishesh92 and it might be due to a timing issue that makes the stub being called sometimes and not at other times (due to your changes???). I think we need to fix the test to continue :(
vishesh92
commented
Jan 22, 2026
@NVShawn , every other time we get an unnecessary stubbing error in unpredictable order in
11:50:09 [INFO] Running org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest 11:50:09 [ERROR] Tests run: 34, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.196 s <<< FAILURE! - in org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest 11:50:12 [ERROR] unnecessary Mockito stubbings(org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest) Time elapsed: 0.019 s <<< ERROR! 11:50:12 org.mockito.exceptions.misusing.UnnecessaryStubbingException: 11:50:12 11:50:12 Unnecessary stubbings detected in test class: ManagementServerMaintenanceManagerImplTest 11:50:12 Clean & maintainable test code requires zero unnecessary code. 11:50:12 Following stubbings are unnecessary (click to navigate to relevant line of code): 11:50:12 1. -> at org.apache.cloudstack.maintenance.ManagementServerMaintenanceManagerImplTest.prepareForMaintenanceAndCancelFromPreparingForMaintenanceState(ManagementServerMaintenanceManagerImplTest.java:342) 11:50:12 Please remove unnecessary stubbings or use 'lenient' strictness. More info: javadoc for UnnecessaryStubbingException class. 11:50:12 11:50:12 [INFO] 11:50:12 [INFO] Results: 11:50:12 [INFO] 11:50:12 [ERROR] Errors: 11:50:12 [ERROR] ManagementServerMaintenanceManagerImplTest.unnecessary Mockito stubbings ? UnnecessaryStubbing 11:50:12 [INFO] 11:50:12 [ERROR] Tests run: 34, Failures: 0, Errors: 1, Skipped: 0This time in the ubuntu build and last time in the EL build. I discussed quickly with @vishesh92 and it might be due to a timing issue that makes the stub being called sometimes and not at other times (due to your changes???). I think we need to fix the test to continue :(
I am not sure if this is related to the changes in the PR. I am not sure but I think I remember seeing similar failures in a different PR as well. I checked the tests and couldn't find why this might happen. Let me try building the packages again.
@blueorangutan package
blueorangutan
commented
Jan 22, 2026
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.
blueorangutan
commented
Jan 22, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 16486
@weizhouapache
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
weizhouapache
commented
Jan 27, 2026
@blueorangutan package
blueorangutan
commented
Jan 27, 2026
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.
blueorangutan
commented
Jan 27, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16554
Pearl1594
commented
Jan 28, 2026
@blueorangutan test
blueorangutan
commented
Jan 28, 2026
@Pearl1594 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
blueorangutan
commented
Jan 29, 2026
|
[SF] Trillian test result (tid-15327)
|
Description
This PR enhances the feature added in #3662 to allow for non-infinite dhcp lease times.
So we do not break current installs, we keep the 'infinite' lease time as default but allow for a config to change the lease times to non-infinite values.
We've had issues with VMs with the lease set to infinite where they never check to see if their IP is still available, so we get IP conflicts. In our environment, with a combination of very short lived and long lived VMs and constrained IP address, we have to rely on IP address re-use and lease timeouts. This change allows us to configure our IP lease timeouts without modifying default behavior.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity