Skip to content

systemd/network: Fix dummy interface exclusion rule in default networkd unit#90

Merged
pothos merged 1 commit intoflatcar-masterfrom
kai/fix-default-network-rule
Feb 21, 2023
Merged

systemd/network: Fix dummy interface exclusion rule in default networkd unit#90
pothos merged 1 commit intoflatcar-masterfrom
kai/fix-default-network-rule

Conversation

@pothos
Copy link
Copy Markdown
Member

@pothos pothos commented Feb 20, 2023

The default networkd unit should not apply to all devices, e.g., not to bridges, tunnels, dummy interfaces etc. However, for dummy interfaces the rule was wrong.
Fix the exclusion rule for dummy interfaces, which are not a type but a certain driver.

How to use

Testing done

Was tested by copying it to /etc/systemd/network/ and doing ip link add dummy0 type dummy to create such an interface and networkctl reload to apply the unit change and see that the interface becomes unmanaged.

The default networkd unit should not apply to all devices, e.g., not
to bridges, tunnels, dummy interfaces etc. However, for dummy
interfaces the rule was wrong.
Fix the exclusion rule for dummy interfaces, which are not a type but
a certain driver.
@krnowak
Copy link
Copy Markdown
Member

krnowak commented Feb 20, 2023

I don't know how to verify this PR. I was looking for a list of possible values for the Driver and Type fields and the closest thing I found was in systemd.netdev(5), but it has a single table that contains values that you can find in both Type and Driver fields.

@pothos
Copy link
Copy Markdown
Member Author

pothos commented Feb 20, 2023

Observing behavior like in natural science, not following rules on paper like in math or engineering ;)

Actually it would be nice to submit our default network unit file as example in the systemd docs to spare others running into the same problems.

@krnowak
Copy link
Copy Markdown
Member

krnowak commented Feb 20, 2023

Observing behavior like in natural science, not following rules on paper like in math or engineering ;)

Yeah, I was being lazy. :) Repeated the steps in a VM, seems to be doing the trick.

Actually it would be nice to submit our default network unit file as example in the systemd docs to spare others running into the same problems.

Right, there seem to be no example for configuring links as unmanaged.

@pothos pothos merged commit bb97f96 into flatcar-master Feb 21, 2023
@pothos pothos deleted the kai/fix-default-network-rule branch February 21, 2023 12:52
@pothos pothos changed the title systemd/network: Fix dummy if exclusion rule in default networkd unit systemd/network: Fix dummy in exclusion rule in default networkd unit Feb 21, 2023
@pothos pothos changed the title systemd/network: Fix dummy in exclusion rule in default networkd unit systemd/network: Fix dummy interface exclusion rule in default networkd unit Feb 21, 2023
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 21, 2023
This pulls in
flatcar/init#90
to fix the dummy interface exclusion rule in the default networkd unit.
It was supposed to work before but didn't. With it we wouldn't have
needed the special exclusions for Kubernetes interfaces.
t-lo pushed a commit to flatcar/scripts that referenced this pull request Apr 17, 2023
This pulls in
flatcar/init#90
to fix the dummy interface exclusion rule in the default networkd unit.
It was supposed to work before but didn't. With it we wouldn't have
needed the special exclusions for Kubernetes interfaces.
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.

2 participants