fix(network-legacy): write fallback teamd config to /etc/teamd - #2605
fix(network-legacy): write fallback teamd config to /etc/teamd#2605prabhakarpujeri wants to merge 1 commit into
Conversation
|
CC @aafeijoo-suse @Nowa-Ammerlaan - can you please help with the maintenance of network-legacy and help to review this PR ? Thanks ! |
|
You're right — that paragraph was leftover from our internal review notes, removed from the description. Thanks for the review. |
f0d1d68 to
21ad78a
Compare
Commit e4483e5 ("Configure the runner for team interfaces") made parse-team.sh write the fallback teamd configuration for a kernel cmdline "team=" specification to /tmp/<teammaster>.conf, but ifup.sh launches teamd -d -U -n -N -t <teammaster> -f /etc/teamd/<teammaster>.conf so for any team= boot that relies on the fallback config (no host ifcfg TEAM_CONFIG installed into the initramfs) teamd exits with Failed to get absolute path of "/etc/teamd/<teammaster>.conf": No such file or directory and the team master never comes up, breaking network boot over team. Restore writing the fallback config to /etc/teamd/<teammaster>.conf, matching the consumer in ifup.sh and the pre-e4483e59 behavior. Host TEAM_CONFIG-based setups are unaffected, and the /tmp/team.<master>.info and /tmp/team.<master>.up state files still live in /tmp as intended. Verified by running the real parse-team.sh + real teamd in private mount/network namespaces: - before: teamd dies with the error above, team0 is never created - after: teamd parses the config, starts, and reports 'setup: runner: activebackup' via teamdctl; ip -d link shows team0 Note: this path has no CI coverage since the network-legacy team test (BONDBRIDGEVLAN) was removed in 88406ce.
I have no knowledge of teamd, sorry. |
Ditto. Ask @trumbaut why he changed it before assuming the LLM is right. |
|
Fair point — @trumbaut, since e4483e5 moved the fallback path from For context, the regression evidence posted above is empirical, not just reading code: running the real |
|
CC @dracut-ng/gentoo-maint @dracut-ng/opensuse-maint |
|
openSUSE doesn't support teamd any more. |
Perhaps we should be removing this code than instead of fixing it ? I also do not think we have |
I was just talking about openSUSE. I can't speak for other distros. But it seems that the libteam project has been inactive for some time. |
Thanks @mwilck . Somehow we need to make a decision on this for the purpose of what is maintained upstream. Many distributions already gave up on network-legacy dracut module completely. Non-systemd distributions (including Gentoo) and and openSUSE are the top use-cases left as far as I can tell. Many non-systemd distributions do not package teamd (Alpine, Void). Would be good to hear from Gentoo on this (CC @ConiKost) |
|
Gentoo still has a package for it. It doesn't have a dedicated maintainer, but there's probably little to do on it. I'm not sure if the reporter is actually using it or just fishing for issues with AI. Not that the fix is unwelcome. It's straightforward enough, although I wonder if it should be fixed the other way, with ifup.sh updated to use /tmp instead. Or maybe /run would be better if teamd continues to run after switching root. I don't know anything about teamd either. |
Problem
Booting with
team=<master>:<slaves>[:<runner>]on the kernel command line and no host ifcfgTEAM_CONFIGrelies on the fallback configuration thatmodules.d/35network-legacy/parse-team.shgenerates. Commit e4483e5 ("Configure the runner for team interfaces") changed the output path of that generated config from/etc/teamd/<master>.confto/tmp/<master>.conf— but the consumer was never updated:ifup.sh:380still launchesSo the fallback config is written to a location nobody reads. With a real
teamdthis fails as:→
teamdexits, the team master is never created, and network boot over a team is broken for the cmdline-only (no host config) case. Setups whose hostTEAM_CONFIGwas installed into/etc/teamd/at image build time (module-setup.sh) are unaffected — which is presumably why this went unnoticed since 2020.Fix
Restore writing the fallback config to
/etc/teamd/<master>.conf, matching the consumer inifup.shand the pre-e4483e59 behavior. One line changed. The/tmp/team.<master>.info//tmp/team.<master>.upstate files correctly stay in/tmp(they are consumed byifup.shdirectly).Verification
No CI coverage for this path (the network-legacy BOND/BRIDGE/VLAN tests covering team were removed in 88406ce as always-skipped), so verified manually end-to-end with the real
parse-team.shand the realteamd1.32 on Fedora 44 in private mount/network namespaces:(team0 is
DOWNonly because no ports are enslaved in this minimal test —ifup.shenslaves the working slaves right after starting teamd. The failing part — loading the config and creating the device with the right runner — works.)The generated JSON
{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}is identical in both runs; only its location changes.