| 30 Jun 2025 |
emily | there is also IfState | 15:10:57 |
emily | we have no integration for that but if you don't like networkd maybe it might be an interesting migration target | 15:11:10 |
Molly Miller | if networkd can handle online interface renaming then it's probably doable | 15:11:26 |
hexa | no, that's a udev skill | 15:11:38 |
hexa | still requires rebooting | 15:11:41 |
emily | and RFC 42 style integration for that seems like something we'd accept in NixOS | 15:11:43 |
emily | networkd can rename interfaces | 15:11:56 |
emily | but maybe I misunderstand | 15:12:21 |
hexa | .links files where interface renaming happens are handled by udev | 15:12:37 |
hexa | you would possibly need to retrigger udev to cause the rename to happen | 15:12:50 |
hexa | there are more interesting ways to shoot yourself in the foot | 15:13:06 |
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 |