30 Jun 2025 |
Molly Miller | the last time i looked at this 12-18 months ago, retriggering udev wouldn't rename the interfaces, that codepath was only triggered when they get added to the system for the first time | 15:13:34 |
Molly Miller | the reasoning behind all of this is that our servers all have 4+ network interface each, so we name interfaces by function, and sometimes the interface assignment does change | 15:14:48 |
K900 | That sounds like you should just use networkd link names for? | 15:15:41 |
emily | links = {
"10-sfp-lan" = {
matchConfig.Property = [ "OF_FULLNAME=/soc/ethernet@15100000/mac@1" ];
linkConfig.Name = "sfp-lan";
};
"10-sfp-wan" = {
matchConfig.Property = [ "OF_FULLNAME=/soc/ethernet@15100000/mac@2" ];
linkConfig.Name = "sfp-wan";
};
};
| 15:16:00 |
emily | I don't know if you can change this config and have stuff get re-assigned on the fly though which I guess is the question | 15:16:11 |
Molly Miller | does that set the interface name properties or does that rename the kernel device? | 15:16:14 |
K900 | Neither | 15:16:20 |
K900 | It just lets you do networkctl up foo | 15:16:28 |
K900 | Or whatever | 15:16:29 |
K900 | Which is presumably what you use those for? | 15:16:36 |
emily | well it also changes their name in ip etc. | 15:17:05 |
emily | so I assume it does actually reconfigure something | 15:17:16 |
K900 | Well yes the linkConfig.Name stuff does | 15:17:20 |
K900 | Wait | 15:17:38 |
K900 | Am I crazy | 15:17:41 |
K900 | Yes I am sorry | 15:18:28 |
emily | it seems like this kind of thing wouldn't be hard to test with networkd anyway? | 15:18:54 |
emily | to see if you need to have things poke udev or whatever | 15:19:01 |
Molly Miller | i'll carve out some time at some point (TM) to go and take a look | 15:19:27 |
Molly Miller | the assumption of scripted networking is baked pretty deeply into our codebase, so we'd need to refactor out all the explicit dependencies on network-addresses-ethXXX.service | 15:19:57 |
emily | you may want to look at ^ too if networkd is really not working out for whatever reason | 15:20:08 |
Molly Miller | reference for ifstate? | 15:20:25 |
emily | https://ifstate.net/ | 15:20:34 |
Molly Miller | oh this reminds me of ifupdown2 | 15:20:49 |
Molly Miller | (society if ifupdown2 was usable outside of cumulus linux) | 15:21:09 |
hexa | yeah, ifupdown2 had ifreload for gradual changes | 15:22:23 |
hexa | but the maintenance situation was wild | 15:22:28 |
hexa | at least ifstate is still hackable, if you need that | 15:22:47 |
hexa | it is used at DD-IX I hear | 15:23:23 |
Molly Miller | ah, interesting | 15:23:56 |