From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id D28C41FF0DF for ; Thu, 05 Nov 2026 15:50:11 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E24FE2159C; Thu, 05 Nov 2026 15:50:08 +0100 (CET) From: Filip Schauer To: pve-devel@lists.proxmox.com Subject: [RFC pve-container/pve-lxc-console v2 0/2] add container console scrollback buffer Date: Thu, 5 Nov 2026 15:49:42 +0100 Message-ID: <20261105144947.124148-1-f.schauer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793890192428 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.301 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: QHNQGFT5YUH4TJKLEPMBQJ2INJLEKUGX X-Message-ID-Hash: QHNQGFT5YUH4TJKLEPMBQJ2INJLEKUGX X-MailFrom: f.schauer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Replace dtach and lxc-console for container consoles with a new pve-lxc-console binary, which keeps a scrollback buffer and replays it to clients on attach. No console output is lost before the first client attaches, whatever the cmode: * console: we additionally enable the LXC console ring buffer, which records the console output since the container started. pve-lxc-console reads its data from there, so users who open the console too late still see what the container printed earlier, even if no console was open at that time. * tty: the kernel buffers the output of the tty internally until it is read, so nothing is lost before pve-lxc-console picks it up. * shell: the shell is only started when the console is opened for the first time, so there is no earlier output that could be missed. This also allows us to remove dtach as a dependency from pve-manager. pve-lxc-console: Filip Schauer (1): initial commit .cargo/config.toml | 5 + .gitignore | 12 ++ Cargo.toml | 14 ++ Makefile | 77 +++++++++ build.rs | 49 ++++++ debian/changelog | 5 + debian/control | 31 ++++ debian/copyright | 16 ++ debian/rules | 29 ++++ debian/source/format | 1 + src/client.rs | 97 +++++++++++ src/lxc.rs | 85 +++++++++ src/main.rs | 91 ++++++++++ src/master.rs | 402 +++++++++++++++++++++++++++++++++++++++++++ src/packet.rs | 85 +++++++++ 15 files changed, 999 insertions(+) create mode 100644 .cargo/config.toml create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 Makefile create mode 100644 build.rs create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/rules create mode 100644 debian/source/format create mode 100644 src/client.rs create mode 100644 src/lxc.rs create mode 100644 src/main.rs create mode 100644 src/master.rs create mode 100644 src/packet.rs pve-container: Filip Schauer (1): add container console scrollback buffer debian/control | 1 + src/PVE/API2/LXC.pm | 36 +++--------------------------------- src/PVE/LXC.pm | 11 +++++++++++ 3 files changed, 15 insertions(+), 33 deletions(-) Summary over all repositories: 18 files changed, 1014 insertions(+), 33 deletions(-) -- Generated by murpp 0.12.1