fix(console): switch conman from ser2net-telnet to direct serial access

The ser2net layer between conman and the serial devices was causing
stair-stepping in terminal output. conman's dev="host:port" uses telnet
protocol, but ser2net's accepter was raw TCP (no telnet mode). The telnet
NVT state machine in conman was stripping bare CR characters from device
output — particularly from Dell switches that use old-style \n\r (LF+CR)
line endings instead of standard \r\n. In telnet, a bare \r not followed
by \n or NUL is non-compliant and gets dropped, leaving bare \n that
causes stair-stepping in the raw-mode terminal.

Fix: conman now opens serial devices directly via the stable udev
symlinks (/dev/consoles/<name>) with seropts, eliminating the telnet
layer entirely. ser2net is stopped and disabled but remains installed
for emergency TCP access (documented workflow: stop conmand, start
ser2net, use telnet, then reverse).

Architecture change:
  Before: device → serial → ser2net (raw TCP) → conman (telnet NVT) → terminal
  After:  device → serial → conman (direct) → terminal

Verified: 7/7 serial devices held by conmand, 7/7 log files capturing,
all \r bytes preserved in terminal output (confirmed via PTY capture).

💘 Generated with Crush

Assisted-by: Crush:glm-5.2
This commit is contained in:
2026-07-29 18:29:31 -05:00
parent 80693e4f8e
commit fa0c77fb58
6 changed files with 98 additions and 85 deletions
+9 -8
View File
@@ -68,18 +68,19 @@ infrastructure, Proxmox cluster ops, and k8s control plane.
- [x] Validated: outlet 10 cycled off → on (8/8 test checks passed)
- [ ] Rename outlets to match physical devices (Friday onsite)
### Console Management (ser2net + conman on pfv-tsys4 — LIVE)
- [x] 7 network switch/router consoles managed via ser2net + conman
### Console Management (conman direct-serial on pfv-tsys4 — LIVE)
- [x] 7 network switch/router consoles managed via conman
- [x] **USB enumeration problem SOLVED:** udev rules pin each adapter by
ID_PATH (physical USB port topology) to stable `/dev/consoles/<name>`
symlinks that survive reboot regardless of enumeration order
- [x] ser2net exposes all 7 consoles on TCP ports (2001-2007) bound to
**Tailscale IP only** (`100.70.77.93`)
- [x] conman connects to TCP ports for logging + multiplexing (7 log
files active in `/var/log/conman/`)
- [x] Both ser2net + conmand enabled via systemd (survive reboot)
- [x] conman owns serial devices directly (no ser2net/telnet in data path)
- [x] 7 log files active in `/var/log/conman/`
- [x] conmand enabled via systemd (survives reboot)
- [x] conmand systemd unit created (Debian package doesn't ship one)
- [x] ser2net installed but DISABLED (emergency TCP access only)
- [x] Old `/root/conmap` + manual `screen` workflow replaced
- [x] **Stair-stepping fix:** switched from ser2net→telnet→conman to
conman direct-serial to eliminate telnet NVT CR stripping
### Repo Merge
- [x] KNELServerBuild merged into PFVCluster (history preserved)
@@ -141,5 +142,5 @@ infrastructure, Proxmox cluster ops, and k8s control plane.
| Backup | Proxmox Backup Server (PBS) |
| **k8s control plane** | **3-node k3s HA (cnode1/2/3), all traffic over Tailscale** |
| **PDU** | **Cyclades PM10i via powerman on pfv-tsys1 (port 10101)** |
| **Console** | **7 switch consoles via ser2net+conman on pfv-tsys4 (TCP 2001-2007 on Tailscale)** |
| **Console** | **7 switch consoles via conman direct-serial on pfv-tsys4 (conmand:7890 on Tailscale)** |
| Production | Cloudron VPS, Reston VA (this cluster is R&D only) |