feat: Anaconda syslog logging, serial console forwarding, protocol types

- Add UDP syslog listener (port 5514) for receiving Anaconda install logs
  via native `logging --host` kickstart directive — no background processes
- Add rsyslog serial console forwarding in %post (AWS EC2 compatible ttyS0@115200n8)
- Add ProvisionStackType ("dhcpproxy" | "iso" | "cloud-init") to shared types
- Add bastion-install-log WebSocket protocol message for bastion→labd log sync
- Add syslogPort to BastionConfig (default 5514)
- Wire syslog listener into bastion startup/shutdown lifecycle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michal
2026-03-28 23:14:10 +00:00
parent cac7514014
commit 3dc1317301
10 changed files with 142 additions and 6 deletions

View File

@@ -100,6 +100,7 @@ export type BastionMessage =
| { type: "bastion-heartbeat"; bastionId: string; uptime: number; machineCount: number }
| { type: "bastion-state-sync"; bastionId: string; state: import("../types/state.js").BastionState }
| { type: "bastion-progress"; bastionId: string; mac: string; stage: string; detail: string; timestamp: string }
| { type: "bastion-install-log"; bastionId: string; mac: string; hostname: string; provisionerType: import("../types/state.js").ProvisionStackType; sessionId: string; lines: string[]; timestamp: string }
| { type: "command-response"; requestId: string; status: "ok" | "error"; data?: unknown; error?: string };
// --- labd -> Bastion messages ---
@@ -119,7 +120,7 @@ export type LabdBastionMessageType = LabdBastionMessage["type"];
const BASTION_MESSAGE_TYPES = new Set<string>([
"bastion-enroll", "bastion-heartbeat", "bastion-state-sync",
"bastion-progress", "command-response",
"bastion-progress", "bastion-install-log", "command-response",
]);
const LABD_BASTION_MESSAGE_TYPES = new Set<string>([

View File

@@ -14,6 +14,8 @@ export interface BastionConfig {
// Ubuntu support
ubuntuVersion: string;
ubuntuMirror: string;
// Syslog listener for install logs (Anaconda logging --host)
syslogPort: number;
// Flags
skipDnsmasq?: boolean | undefined;
skipArtifacts?: boolean | undefined;

View File

@@ -1,5 +1,7 @@
// State types for discovered machines, install queue, and installed machines.
export type ProvisionStackType = "dhcpproxy" | "iso" | "cloud-init";
export type OsId = "fedora-43" | "ubuntu-26.04";
export type Arch = "x86_64" | "aarch64";