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

fix(nm): load dhcp server configuration after change #5018

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

mattdibi
Copy link
Contributor

@mattdibi mattdibi commented Nov 23, 2023

While performing some tests we discovered an issue affecting the DHCP servers: when changing a DHCP server configuration (i.e. on a network interface already running a DHCP server, we just change the DHCP Address range) the configuration change was not taking effect. We could see the DHCP server configuration file changing on disk, but the server was still serving the same address ranges.

This was due to the fact that, when migrating to the new networking, we preserved the monitors but, when updating DHCP server configurations, we forgot to add the required step to reload the configuration.

You can see that, in the old networking, the step for updating the DHCP server configuration includes a disable call which later relies on the monitors to set the DHCP server back up.

https://github.com/eclipse/kura/blob/aa87f66ab3e31fcf6b681da78ac62673c2ef50d4/kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/dhcp/DhcpServerImpl.java#L231-L250

https://github.com/eclipse/kura/blob/aa87f66ab3e31fcf6b681da78ac62673c2ef50d4/kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/dhcp/DhcpServerImpl.java#L168-L192

This step was missing in the new networking (i.e. org.eclipse.kura.nm). This PR introduces the disable step back but delegates the responsibility to the monitors themselves, since the DHCP server monitor is responsible for the DHCP server service lifecycle.

@mattdibi mattdibi marked this pull request as draft November 23, 2023 11:27
@mattdibi mattdibi marked this pull request as ready for review November 23, 2023 13:06
@mattdibi mattdibi merged commit a626f44 into develop Nov 23, 2023
6 checks passed
@mattdibi mattdibi deleted the fix/dhcp_server_config_load branch November 23, 2023 13:07
github-actions bot pushed a commit that referenced this pull request Nov 23, 2023
* fix(nm): reload dhcp server after configuration change

* fix: make the code build

* docs: fix comment wording

(cherry picked from commit a626f44)
mattdibi added a commit that referenced this pull request Nov 23, 2023
…e-5.4.0] (#5019)

fix(nm): load dhcp server configuration after change (#5018)

* fix(nm): reload dhcp server after configuration change

* fix: make the code build

* docs: fix comment wording

(cherry picked from commit a626f44)

Co-authored-by: Mattia Dal Ben <mattdibi@users.noreply.github.com>
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.

2 participants