[Bug 2098183] Re: Preserve IPv6 configurations when `KeepConfiguration=dhcp-on-stop` is set
Chengen Du
2098183 at bugs.launchpad.net
Wed Mar 19 03:17:32 UTC 2025
[Noble]
Preparation for Network Configuration Serialization/Deserialization
lp2098183-0001: Refactor network code to minimize conflicts during merging.
lp2098183-0002: Introduce new JSON dispatch flags for better logic control.
lp2098183-0003: Add macros for automatically defining a dispatcher.
lp2098183-0004: Introduce new JSON functions (json_dispatch_byte_array_iovec, json_dispatch_in_addr).
lp2098183-0005: Introduce new JSON functions (json_dispatch_int8, json_dispatch_uint8).
lp2098183-0006: Extend JsonDispatch flags to support nullable and refuse-null
lp2098183-0007: Expose existing function json_dispatch_ifindex.
lp2098183-0008: Expose existing function notify_push_fd.
lp2098183-0010: Introduce network_config_source_from_string function.
lp2098183-0011: Expose existing logging functions (log_route_debug, log_address_debug).
Bug Fixes
lp2098183-0009: Fix missing entries in network JSON serialization for routes.
lp2098183-0012: Rewrite serialization/deserialization logic to avoid introducing flow changes.
lp2098183-0013: Implement the actual fix for preserving dynamically acquired configurations.
[Oracular]
Preparation for Network Configuration Serialization/Deserialization
lp2098183-0001: Introduce new JSON dispatch flags for better logic control.
lp2098183-0002: Add macros for handling non-empty byte array pairs in JSON.
lp2098183-0004: Expose existing function json_dispatch_ifindex.
lp2098183-0005: Expose existing function notify_push_fd.
lp2098183-0006: Introduce network_config_source_from_string function.
lp2098183-0007: Expose existing logging functions (log_route_debug, log_address_debug).
Bug Fixes
lp2098183-0003: Fix an additional issue related to processing queued removal requests, improving patch backporting.
lp2098183-0008: Minimal rewrite of serialization/deserialization logic, primarily replacing function names.
lp2098183-0009: Implement the actual fix for preserving dynamically acquired configurations.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2098183
Title:
Preserve IPv6 configurations when `KeepConfiguration=dhcp-on-stop` is
set
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Focal:
New
Status in systemd source package in Jammy:
New
Status in systemd source package in Noble:
Incomplete
Status in systemd source package in Oracular:
Incomplete
Status in systemd source package in Plucky:
Fix Released
Bug description:
[Impact]
The IPv6 configuration is being cleared even though `KeepConfiguration` is set to `yes`, causing the iSCSI backend system to hang during shutdown.
[Fix]
Systemd upstream has addressed this issue.
https://github.com/systemd/systemd/pull/34989
[Test Plan]
<Verify the functionality of KeepConfiguration in preserving IPv6 configurations>
1. Set up a machine with an iSCSI backend in an IPv6-only environment.
2. Configure the `KeepConfiguration` option for each network device individually using drop-in configuration files (e.g., `/etc/systemd/network/*.network.d/*.conf`) or set the `"critical"` option to `true` in the Netplan configuration.
3. Power off the machine and verify that the system does not hang.
<Verify the serialization and deserialization functionality in the systemd-networkd service>
1. Enable debugging for systemd-networkd
mkdir -p /etc/systemd/system/systemd-networkd.service.d/
vim /etc/systemd/system/systemd-networkd.service.d/10-debug.conf
===
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
===
systemctl daemon-reload
2. Restart the systemd-networkd service twice using the `systemctl restart systemd-networkd` command.
3. Confirm that serialization and deserialization are functioning correctly by checking `/var/log/syslog`
2025-03-13T00:35:01.540134+00:00 oracular systemd-networkd[2998]: Serializing...
2025-03-13T00:35:01.540165+00:00 oracular systemd-networkd[2998]: enp0s9: Serializing DHCPv4 address (configured): 10.0.2.100/24 broadcast 10.0.2.255 (valid forever, preferred forever), flags: permanent, scope: global, label: n/a
2025-03-13T00:35:01.540193+00:00 oracular systemd-networkd[2998]: enp0s9: Serializing DHCPv6 address (configured): 2603:c020:4016:8201:48ee:6b22:d3e4:2e8/128 (valid for 1d 56min 49s, preferred for 23h 56min 49s), flags: no-prefixroute, scope: global
2025-03-13T00:35:01.540218+00:00 oracular systemd-networkd[2998]: Serialization completed.
...
2025-03-13T00:35:01.596591+00:00 oracular systemd-networkd[3029]: Deserializing...
2025-03-13T00:35:01.596612+00:00 oracular systemd-networkd[3029]: enp0s9: Deserialized DHCPv4 address (configured): 10.0.2.100/24 broadcast 10.0.2.255 (valid forever, preferred forever), flags: permanent, scope: global, label: n/a
2025-03-13T00:35:01.596635+00:00 oracular systemd-networkd[3029]: enp0s9: Deserialized DHCPv6 address (configured): 2603:c020:4016:8201:48ee:6b22:d3e4:2e8/128 (valid for 1d 56min 49s, preferred for 23h 56min 49s), flags: no-prefixroute, scope: global
2025-03-13T00:35:01.596662+00:00 oracular systemd-networkd[3029]: Deserialization completed.
[Where problems could occur]
The patches introduce network serialization and deserialization behavior, ensuring that DHCPv6 addresses are preserved when `KeepConfiguration=yes` is set. If any regressions occur, error messages may appear when restarting `systemd-networkd`, but they will be ignored. Both IPv4/IPv6 configuration and the IPv6 connection may be affected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2098183/+subscriptions
More information about the foundations-bugs
mailing list