"optional: true" flag introduces problem it's meant to fix in certain circumstances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Invalid
|
High
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hello!
This bug is in relation to the situation where the "systemd-
---
:~# grep -Ev "^#" /etc/netplan/
network:
version: 2
ethernets:
enp5s0:
dhcp4: true
---
The above config will cause the service hang/failure, and the removal of the flag will resolve the issue. I primarily opened this bug report with the idea that we might update aforementioned documentation to include a caveat that you want to avoid adding this flag to the only configured interface. However, it was also discussed that we might consider having the netplan config parser complain about such a setup and consider it invalid, which it kinda is. I believe in a situation where you may have a server that should have NO network connectivity, you would simply leave netplan unconfigured and/or stop any relevant services, rather than try to configure all interfaces as optional.
My original test was on Jammy, though I tested this also on Focal and Bionic, and neither of those appear to be affected by this - setting the only interface as optional in either of those does not cause the "systemd-
Let me know if you'd like/need any more info from me! Thank you!
Changed in systemd (Ubuntu): | |
status: | Incomplete → Invalid |
I think this is related to a recent change in behavior in systemd.
It is supposed to be fixed, by implementing the "network- online. target" specification. Which defines what should be waited for: https:/ /discourse. ubuntu. com/t/spec- definition- of-an-online- system/ 27838
But we first need to get some of the groundwork landed in upstream systemd-networkd.