| 23 Jun 2021 |
hexa | in theory there is IFALIAS | 15:20:48 |
hexa | * in theory there is IFALIAS: ip link set alias somethinglongerthanfiveteencharacters dev lo | 15:21:17 |
Linux Hackerman | you can also patch your kernel, but YMMV :> | 15:21:41 |
hexa | yeah, should be pretty straightforward with nixos, and I would really like to know where this breaks :D | 15:22:12 |
Linux Hackerman | hm, since it's part of uapi, it also won't help much, you'll also need to rebuild the world against patched kernel headers :> | 15:22:54 |
kraftnix | guess hacking the names down to 15 characters then setting an alias is the sanest solution? might need to add some assertions to ensure i don't get conflicting interface names after trimming the names | 15:24:49 |
hexa | ❯ rg "IFNAMSIZ" include/uapi/linux/if.h
32:#if __UAPI_DEF_IF_IFNAMSIZ
33:#define IFNAMSIZ 16
| 15:24:51 |
hexa | tbh, I don't know how to use aliases | 15:25:07 |
hexa | and whether any client software allows you to reference them | 15:25:22 |
Andreas Schrägle | In reply to @kraftnix:matrix.org guess hacking the names down to 15 characters then setting an alias is the sanest solution? might need to add some assertions to ensure i don't get conflicting interface names after trimming the names you could calculate a crc or some hash with 15 characters output, to reduce collisions. | 15:25:49 |
Linux Hackerman | ifname = s: builtins.substr 0 14 (builtins.hashString "sha256" s) | 15:26:31 |
Andreas Schrägle | you could also just use the interface index instead of the name. I'm sure that's equally convenient. | 15:26:48 |
Linux Hackerman | although that's using hexadecimal so there's a lot of room for improvements | 15:27:06 |
kraftnix | It seems that when you let systemd-nspawn create network zones for you, it auto trims + adds an alias/altname, not sure how other things interact with the altname though
5: vb-wc-interpEGa@if2: mtu 1500 qdisc noqueue master vz-test-wc-priv state UP group default qlen 1000
link/ether 8a:df:07:8f:76:e5 brd ff:ff:ff:ff:ff:ff link-netnsid 1
altname vb-wc-internal-zone1
inet6 fe80::88df:7ff:fe8f:76e5/64 scope link
valid_lft forever preferred_lft forever
| 15:27:07 |
hexa | 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
alias somethinglongerthanfiveteencharacters
❯ ip link show alias somethinglongerthanfiveteencharacters
Error: either "dev" is duplicate, or "somethinglongerthanfiveteencharacters" is a garbage.
❯ ip link show dev somethinglongerthanfiveteencharacters
Device "somethinglongerthanfiveteencharacters" does not exist.
| 15:28:09 |
hexa | not sure how to use that as a selector, too lazy to read the man page | 15:28:30 |
kraftnix | still seems like a PIA :/ | 15:28:46 |
kraftnix | heres me wishing for a magic solution that perfectly fits my usecase | 15:29:11 |
kraftnix | does systemd-networkd ever clean up networks that have been removed from systemd.network.networks without rebooting the entire machine? can you make it do a full reconfiguration without reboot or cleanup old networks manually? | 23:56:40 |
| 24 Jun 2021 |
| tadfisher joined the room. | 03:42:30 |
Mic92 (Old) | In reply to @kraftnix:matrix.org does systemd-networkd ever clean up networks that have been removed from systemd.network.networks without rebooting the entire machine? can you make it do a full reconfiguration without reboot or cleanup old networks manually? No it only adds stuff. | 16:02:33 |
Mic92 (Old) | I have mixed feelings about that. Sometimes I prefer it this way. | 16:02:58 |
kraftnix | Would be nice if you could manually "flush" old devices/networks but oh well, I guess I'll just need to be careful not to change network names but maintain the same ipspace/subnet, i've had some weirdness with that (and noticed the old netdevs/works were not cleaned up). | 17:50:51 |
| 25 Jun 2021 |
Mic92 (Old) | I wonder if netplan solves any of these issues. But I guess not because than they would need to reimplement a lot of what networkd does. | 07:04:34 |
| 26 Jun 2021 |
| @grahamc:nixos.orgchanged room power levels. | 01:30:07 |
| @grahamc:nixos.org invited mjolnir. | 01:51:11 |
| mjolnir joined the room. | 01:51:12 |
antifuchs | it's been my experience that netplan doesn't really solve any issues, only creates new ways to experience the same issues but with less documentation | 03:35:44 |
antifuchs | * it's been my experience that netplan doesn't really solve anything exciting, it only creates new ways to experience the same issues but with less documentation | 03:38:57 |
dash | yaml 😬 | 03:45:17 |