From 9ea48518fe7526dd068f7e5c668f221ef5969c53 Mon Sep 17 00:00:00 2001 From: Garrett Allen <98648590+Gerrrt@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:50:53 +0000 Subject: [PATCH 1/2] docs(sensor): keep fenrir's capture NIC silent while it boots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A capture on tap190i1 across a reboot found the nine frames ens19 sends at every boot: a DHCPv4 Discover with the MAC and hostname, IPv6 DAD and MLD reports from dracut's zzzz-dracut-default.network in the initramfs, and three more MLD reports after switch-root before netplan's link-local: [] applies. Runbook §3 now omits networking from the initramfs (dracut's own no-network line) and sets disable_ipv6 on ens19 through sysctl.d, with the capture and tx_packets at 0 as the proof. The changelog entry corrects the 2026-10-01 account of those packets. Co-Authored-By: Claude Opus 5.5 --- docs/changelog.md | 22 ++++++++++ docs/runbooks/build-the-sensor-guest.md | 58 +++++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index cacec6c4..08ecb96b 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,28 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-17 +- **`fenrir`'s capture NIC speaks while it boots, and its runbook now + silences it.** This corrects "`fenrir`'s 8% capture loss was GRO + reordering", filed under 2026-10-01. That entry put the nine packets + `ens19` had sent down to an IPv6 link-local address in the initramfs. A + capture on `tap190i1` from `Saruman`, across a reboot, found more than that: + - **In the initramfs**, dracut's catch-all `zzzz-dracut-default.network` + sent a DHCPv4 Discover from `ens19`, carrying its MAC and the hostname + `fenrir`, plus IPv6 duplicate-address detection and multicast listener + reports. The same file took a lease for `ens18`, `10.0.30.116`, from the + lab pool, before the static `.90` applied. + - **Just after switch-root**, networkd brought `ens19` up and it gained an + IPv6 link-local address for a moment, sending three more listener + reports before netplan's `link-local: []` removed it. + + Nine frames in all, the same count the NIC showed before this reboot. They + reach nothing, because `vmbr1` has no other port and no address. + `build-the-sensor-guest.md` §3 now leaves networking out of the initramfs + and sets `disable_ipv6` on `ens19` through `sysctl.d`, and proves it with + the same capture and `tx_packets` at 0. Not yet applied on `fenrir`. The + `ens18` lease probably happens on every 26.04 guest built from the ISO, + which has not been checked. + - **`fenrir` never reported its patch state, and its runbook now installs the collector.** `build-the-sensor-guest.md` §4 installed only the archive prune, so `apt-patch-state.prom` was never written there. The lab's diff --git a/docs/runbooks/build-the-sensor-guest.md b/docs/runbooks/build-the-sensor-guest.md index 01b5d2b3..60315795 100644 --- a/docs/runbooks/build-the-sensor-guest.md +++ b/docs/runbooks/build-the-sensor-guest.md @@ -216,6 +216,64 @@ It hangs off `multi-user.target`, not the device. Ubuntu 26.04's dracut initramfs brings `ens19` up before the real system starts, so a unit wanted by the device never fires. Reboot once and check `ethtool` again. +**Keep `ens19` silent while it boots, too.** The netplan file takes effect only +once the real system is up. Before that, `ens19` speaks twice: + +- **In the initramfs.** Ubuntu 26.04's dracut carries systemd-networkd and a + catch-all, `zzzz-dracut-default.network`, that runs DHCP on every interface. + `ens19` sends a DHCPv4 Discover with its MAC and the hostname, and IPv6 + duplicate-address detection and multicast listener reports. `ens18` takes a + lease from the lab pool before the static `.90` applies. +- **Just after switch-root.** networkd brings `ens19` up, and the kernel gives + it an IPv6 link-local address. netplan's `link-local: []` then removes it, + but not before more multicast listener reports have gone out. + +A capture on `tap190i1` from `Saruman` found nine such frames at the reboot of +2026-11-17. Nothing receives them, because `vmbr1` has no other port and no +address, but a sensor that announces itself is not one that only listens. +The root disk is local, so the initramfs needs no network at all. Leave it +out, the way dracut's own `no-network` profile does, and turn IPv6 off on +`ens19` before anything can bring it up. udev applies a sysctl for an +interface as the interface appears, so this one lands before networkd starts: + +```bash +sudo tee /etc/dracut.conf.d/10-homelab-no-network.conf >/dev/null <<'CONF' +# fenrir: no networking in the initramfs (build-the-sensor-guest.md §3). +# The root disk is local. With systemd-networkd in the image, its catch-all +# DHCPs every interface, the capture NIC included, before netplan applies. +# Same line as dracut's own dracut.conf.d/no-network profile. +omit_dracutmodules+=" net-lib systemd-networkd " +CONF +sudo tee /etc/sysctl.d/60-capture-nic.conf >/dev/null <<'CONF' +# fenrir: the capture NIC never speaks IPv6 (build-the-sensor-guest.md §3). +# Applied by udev as ens19 appears, before networkd brings the link up. +net.ipv6.conf.ens19.disable_ipv6 = 1 +CONF +sudo update-initramfs -u +sudo lsinitrd -m | grep -E 'net-lib|systemd-networkd' # nothing +``` + +On 26.04, `update-initramfs` is dracut's wrapper. `-u` alone rebuilds only the +newest kernel's image, which leaves the previous kernel's as it was. If the new +image does not boot, `qm terminal 190` or the console on `Saruman` is the way +back: choose the previous kernel under *Advanced options* in GRUB, then remove +the dracut file and run `update-initramfs -u` again. Later kernels are built +with the file in place. To prove the result, reboot with a capture +running on `Saruman` that sees only frames `ens19` sends: + +```bash +tcpdump -ni tap190i1 -Q in ether src "$(qm config 190 | sed -n 's/^net1: virtio=\([^,]*\).*/\1/p')" +``` + +Then, back on `fenrir`: + +```bash +cat /sys/class/net/ens19/statistics/tx_packets # 0 +sysctl net.ipv6.conf.ens19.disable_ipv6 # 1 +``` + +The capture must stay empty, and `tx_packets` must read 0. + Install `qemu-guest-agent` as `odin`'s §1 says. `qm guest exec 190 -- uptime` from `Saruman` is the check. The agent is also what lets this guest's disks page (ADR-0070): `qm guest cmd 190 get-fsinfo` should list `/` and From e6234e97d7292661e4b89b4b436b485c70d1b21e Mon Sep 17 00:00:00 2001 From: Garrett Allen <98648590+Gerrrt@users.noreply.github.com> Date: Tue, 17 Nov 2026 22:21:39 +0000 Subject: [PATCH 2/2] docs(sensor): pin the ens19 initramfs rebuild to one kernel and a copy Review on #1553. Rebuild and inspect the running kernel's image by version, after a pending reboot, so the image checked is the one that boots. Copy that image first and boot the copy from GRUB if the new one fails, which needs no second kernel. Recovery goes through VM 190's web console: the VM has no serial port, so qm terminal cannot reach GRUB. The sshd step's fallback said qm terminal too, and now says the same. Co-Authored-By: Claude Opus 5.5 --- docs/runbooks/build-the-sensor-guest.md | 31 +++++++++++++++++-------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/docs/runbooks/build-the-sensor-guest.md b/docs/runbooks/build-the-sensor-guest.md index 60315795..d06b9a06 100644 --- a/docs/runbooks/build-the-sensor-guest.md +++ b/docs/runbooks/build-the-sensor-guest.md @@ -249,16 +249,27 @@ sudo tee /etc/sysctl.d/60-capture-nic.conf >/dev/null <<'CONF' # Applied by udev as ens19 appears, before networkd brings the link up. net.ipv6.conf.ens19.disable_ipv6 = 1 CONF -sudo update-initramfs -u -sudo lsinitrd -m | grep -E 'net-lib|systemd-networkd' # nothing +ls /var/run/reboot-required 2>/dev/null && echo 'reboot first' +k="$(uname -r)" +sudo cp -p "/boot/initrd.img-$k" "/boot/initrd.img-$k.pre-no-network" +sudo update-initramfs -u -k "$k" +sudo lsinitrd -m "/boot/initrd.img-$k" | grep -E 'net-lib|systemd-networkd' # nothing ``` -On 26.04, `update-initramfs` is dracut's wrapper. `-u` alone rebuilds only the -newest kernel's image, which leaves the previous kernel's as it was. If the new -image does not boot, `qm terminal 190` or the console on `Saruman` is the way -back: choose the previous kernel under *Advanced options* in GRUB, then remove -the dracut file and run `update-initramfs -u` again. Later kernels are built -with the file in place. To prove the result, reboot with a capture +If `reboot first` prints, the running kernel may not be the one the next boot +uses. Reboot, then run the last four lines, so that the image rebuilt and checked is +the one the next boot uses. On 26.04, `update-initramfs` is dracut's wrapper, +and every later kernel is built with the file in place. + +The copy is the way back, and it does not depend on a second kernel being +installed. If the new image does not boot, open VM 190's console in the +Proxmox web UI (*Saruman → 190 → Console*; the VM has no serial port, so +`qm terminal` cannot reach GRUB). Reset the VM and hold Esc to show GRUB's +menu, which Ubuntu hides by default. Press `e` on the first entry, add +`.pre-no-network` to the end of the file name on the `initrd` line, and boot +with Ctrl-X. Then remove the dracut file and run +`sudo update-initramfs -u -k "$(uname -r)"` again. Once the proof below has +passed, delete the copy. To prove the result, reboot with a capture running on `Saruman` that sees only frames `ens19` sends: ```bash @@ -305,8 +316,8 @@ sudo sshd -T | grep -E '^(passwordauthentication|kbdinteractiveauthentication|pe All five must read `no`, apart from `allowusers atreus`. **Keep the session you ran this from open**, and log in from a second terminal before you close -it. If that login fails, `qm terminal 190` or the console on `Saruman` is the -way back in. +it. If that login fails, VM 190's console in the Proxmox web UI is the way +back in. The VM has no serial port, so `qm terminal 190` is not. **Keep `authorized_keys` to the machines that administer this guest.** Do not fill it with `ssh-import-id gh:`. That installs every key on the GitHub