fix: keel network confirm accepts the console of an LXC container #51

Merged
marcos-mendez merged 1 commit from fix/lxc-console-confirm into main 2026-09-30 06:51:21 -03:00
marcos-mendez commented 2026-09-30 06:37:38 -03:00 (Migrated from github.com)

Summary

  • keel network confirm treats /dev/lxc/ttyN and /dev/lxc/console as a console. In an LXC container (plain LXC and Proxmox) /dev/tty1 is a link to lxc/tty1, so the first boot on the console and a lxc-console or pct console login hold /dev/lxc/tty1, which keel refused as "neither an SSH session nor a console".
  • Found while verifying the first boot role screen (handbook decision 0020) on Template B2 in LXC: the overlay change it offers to confirm from the console reverted. With this, the same run printed confirmed from the console /dev/lxc/tty1.
  • Only the host reaches those terminals, which is as good as a console, as a process attached from the host already was. Other names under /dev/lxc are refused.
  • Version 0.11.2; docs/apply.md names the terminals.

Needed by Keel-Linux/confconsole (first boot role screens), which recommends keel (>= 0.11.2).

Test plan

  • tests/test_network_session.py: /dev/lxc/tty1, /dev/lxc/tty4, /dev/lxc/console are a console; /dev/lxc/pts/1, /dev/lxc/ttyX, /dev/lxctty1 are not
  • Full suite under coverage: 1657 passed, 99 percent
  • Live: built deb in two LXC containers from the Template B2 image, overlay confirmed from the first boot console on both
  • CI green
## Summary - `keel network confirm` treats `/dev/lxc/ttyN` and `/dev/lxc/console` as a console. In an LXC container (plain LXC and Proxmox) `/dev/tty1` is a link to `lxc/tty1`, so the first boot on the console and a `lxc-console` or `pct console` login hold `/dev/lxc/tty1`, which keel refused as "neither an SSH session nor a console". - Found while verifying the first boot role screen (handbook decision 0020) on Template B2 in LXC: the overlay change it offers to confirm from the console reverted. With this, the same run printed `confirmed from the console /dev/lxc/tty1`. - Only the host reaches those terminals, which is as good as a console, as a process attached from the host already was. Other names under `/dev/lxc` are refused. - Version 0.11.2; docs/apply.md names the terminals. Needed by Keel-Linux/confconsole (first boot role screens), which recommends `keel (>= 0.11.2)`. ## Test plan - [x] `tests/test_network_session.py`: `/dev/lxc/tty1`, `/dev/lxc/tty4`, `/dev/lxc/console` are a console; `/dev/lxc/pts/1`, `/dev/lxc/ttyX`, `/dev/lxctty1` are not - [x] Full suite under coverage: 1657 passed, 99 percent - [x] Live: built deb in two LXC containers from the Template B2 image, overlay confirmed from the first boot console on both - [x] CI green
Sign in to join this conversation.
No description provided.