networkd: make s-n-wait-online wait for at least one routable interface#482
networkd: make s-n-wait-online wait for at least one routable interface#482slyon merged 6 commits intocanonical:mainfrom
Conversation
1f5c78d to
ebb14e4
Compare
Generally, we should be waiting on "routable" state (instead of "degraded") when we have static IP/dhcp4/dhcp6/RA. Our spec defines "at least one interface MUST be up on the link layer and have received layer 3 (IP) configuration" (ignoring link-local). We now start two separate "systemd-networkd-wait-online" processes. One waiting for "carrier" & "degraded" interfaces, not using "--any". Another one waiting just for "routable" interfaces, combined with "--any". Both blocking "network-online.target".
a119c15 to
ba03349
Compare
ba03349 to
56b149c
Compare
daniloegea
left a comment
There was a problem hiding this comment.
It seems to be working as intended.
I just left one thought about bonds. I'm not sure if we should wait for carrier on all the members by default. The system doesn't need to have carrier on all the bond members to be online.
But to have it waiting for any member we'd need to create groups of members for each bond and have one call to wait-online --any for each group... maybe we could consider that in the future. Maybe we should recommend that bond members should be optional.
Right, I think this edge cases was not considered in the spec. But issuing a log message about it is probably a good first step. Further improvements can then be done as follow-up PRs. PTAL, I added two new isolated commits on top of the current branch (the 2nd begin some small, unrelated refactoring). |
daniloegea
left a comment
There was a problem hiding this comment.
Looks good. I just left a suggestion to make the log message a bit more informative.
Description
wait-online: wait for 'routable' state, if corresponding IPs are defined
Generally, we should be waiting on "routable" state (instead of "degraded") when we have static IP/dhcp4/dhcp6/RA.
Our spec defines "at least one interface MUST be up on the link layer and have received layer 3 (IP) configuration" (ignoring link-local).
We now start two separate
systemd-networkd-wait-onlineprocesses. One waiting for "carrier" & "degraded" interfaces (including the "routable" ones), not using "--any". Another one waiting just for "routable" interfaces, combined with "--any". Both blocking "network-online.target".This is an extension of #456
FR-7838
Checklist
make checksuccessfully.make check-coverage).