Skip to content

Comments

network: Restore KeepConfiguration=dhcp-on-stop#10

Merged
pothos merged 1 commit intoflatcar-masterfrom
kai/keep-address-on-networkd-stop
Nov 12, 2020
Merged

network: Restore KeepConfiguration=dhcp-on-stop#10
pothos merged 1 commit intoflatcar-masterfrom
kai/keep-address-on-networkd-stop

Conversation

@pothos
Copy link
Member

@pothos pothos commented Nov 9, 2020

The default behavior in systemd-networkd was changed in v244 from
keeping the IP addresses and routes on service stop to deconfiguring
them:
systemd/systemd@8006035
Deconfiguring means that on system shutdown the DHCP address is
properly released but also has the side effect that orphaned processes
not part of a systemd unit don't have network connectivity when they
get the broadcasted SIGTERM.
Restore the previous behavior and hope that DHCP servers recognize
the system again on reboot and hand out the same address don't have to
rely on the address release (which, anyway, is not sent for a crashing
system either).

Fixes flatcar/Flatcar#213

How to use

Configure, e.g., a VMware instance with the guestinfo network variables to use DHCP.
Then check

systemctl stop systemd-networkd
ip a

to report the interface as configured with an IP address.

Testing done

Ran kola tests on all platforms.

The default behavior in systemd-networkd was changed in v244 from
keeping the IP addresses and routes on service stop to deconfiguring
them:
systemd/systemd@8006035
Deconfiguring means that on system shutdown the DHCP address is
properly released but also has the side effect that orphaned processes
not part of a systemd unit don't have network connectivity when they
get the broadcasted SIGTERM.
Restore the previous behavior and hope that DHCP servers recognize
the system again on reboot and hand out the same address don't have to
rely on the address release (which, anyway, is not sent for a crashing
system either).

Fixes flatcar/Flatcar#213
@pothos pothos requested a review from a team November 9, 2020 11:12
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Nov 10, 2020
Pulls in
flatcar/coreos-cloudinit#10
flatcar/init#30
to restore the systemd-networkd 243 behavior with
KeepConfiguration=dhcp-on-stop to prevent the network from going down
before the SIGTERM is broadcasted to orphaned processes not part of a
systemd unit.
Copy link
Member

@vbatts vbatts left a comment

Choose a reason for hiding this comment

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

LGTM

@pothos pothos merged commit cfcc441 into flatcar-master Nov 12, 2020
@pothos pothos deleted the kai/keep-address-on-networkd-stop branch November 12, 2020 12:17
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Nov 12, 2020
Pulls in
flatcar/coreos-cloudinit#10
flatcar/init#30
to restore the systemd-networkd 243 behavior with
KeepConfiguration=dhcp-on-stop to prevent the network from going down
before the SIGTERM is broadcasted to orphaned processes not part of a
systemd unit.
dongsupark pushed a commit to flatcar-archive/coreos-overlay that referenced this pull request Nov 13, 2020
Pulls in
flatcar/coreos-cloudinit#10
flatcar/init#30
to restore the systemd-networkd 243 behavior with
KeepConfiguration=dhcp-on-stop to prevent the network from going down
before the SIGTERM is broadcasted to orphaned processes not part of a
systemd unit.
dongsupark pushed a commit to flatcar-archive/coreos-overlay that referenced this pull request Nov 13, 2020
Pulls in
flatcar/coreos-cloudinit#10
flatcar/init#30
to restore the systemd-networkd 243 behavior with
KeepConfiguration=dhcp-on-stop to prevent the network from going down
before the SIGTERM is broadcasted to orphaned processes not part of a
systemd unit.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Dec 3, 2020
Pulls in
flatcar/coreos-cloudinit#10
flatcar/init#30
to restore the systemd-networkd 243 behavior with
KeepConfiguration=dhcp-on-stop to prevent the network from going down
before the SIGTERM is broadcasted to orphaned processes not part of a
systemd unit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stable 2605.6.0 shutdown order prevents closing of TCP connections

2 participants