luo-agent provides the userspace components required to drive the Linux
Kernel Live Update Orchestrator (LUO) subsystem. It consists of the system
daemon (luod) and the administrative control utility (luoctl).
LUO allows a running Linux system to transition to a new kernel version via
kexec while preserving the state of specific applications (such as VMMs,
databases, or container runtimes) in RAM.
luo-agent acts as the broker for this process. It implements a Delegation Architecture:
- luod creates kernel sessions via
/dev/liveupdate. - luod delegates Session File Descriptors (FDs) to clients via Unix Domain Sockets.
- Clients preserve their specific resources (memfds, VFIO state) into those sessions.
- luod orchestrates the final kexec transition.
The singleton system daemon that:
- Enforces exclusive ownership of
/dev/liveupdate. - Manages the lifecycle of LUO sessions.
- Loads and verifies the target kernel image.
- Coordinates the synchronization barrier before reboot.
- Acts as the custodian of preserved sessions during the reboot transition.
The administrative command-line interface used to:
- Load the next kernel image.
- Trigger the Live Update workflow.
- Inspect active sessions and subscriptions.
- Linux Kernel: 6.19+ with
CONFIG_LIVEUPDATEenabled. - Build Tools:
meson,ninja,gcc(orclang). - Libraries:
libjson-c.
# 1. Install dependencies (Debian/Ubuntu)
sudo apt-get install meson ninja-build libjson-c-dev
# 2. Configure build
meson setup build
# 3. Compile
ninja -C build
# 4. Install (Default: /usr/sbin/luod, /usr/bin/luoctl)
sudo ninja -C build installluod is designed to run as a systemd service. It requires specific
configuration to survive the shutdown sequence.
sudo systemctl enable --now luodBefore an update can occur, the new kernel image must be loaded into memory.
# Load kernel using the current system's command line
sudo luoctl load /boot/vmlinuz --initrd /boot/initrd.img --reuse-cmdline
# OR specify a custom command line
sudo luoctl load /boot/vmlinuz --cmdline "console=ttyS0 root=/dev/sda1"Clients (e.g., QEMU) must connect to /run/luod/liveupdate.sock and issue a
SUBSCRIBE command.
Check connected clients:
sudo luoctl listThis command signals luod to create sessions, push FDs to clients, wait for
clients to become READY, and finally execute the kexec reboot.
sudo luoctl kexecClients communicate with luod via a Unix Domain Socket at
/run/luod/liveupdate.sock.
The protocol uses newline-delimited JSON. File Descriptors are transferred using
SCM_RIGHTS.
- Connect: Open socket
SOCK_STREAM. - Subscribe: Send
{"cmd": "SUBSCRIBE", "id": "unique-id"}. - Wait: Block on read until
PRESERVATION_REQUESTis received. - Preserve:
- Receive
{"event": "START_PRESERVATION"}+ Session FD (ancillary data). - Use
ioctl(SessionFD, LIVEUPDATE_SESSION_PRESERVE_FD, ...)to save resources.
- Receive
- Signal Ready: Send
{"cmd": "READY"}. - Reboot Happens...
- Reconnect: Connect to socket.
- Claim: Send
{"cmd": "CLAIM", "id": "unique-id"}. - Restore:
- Receive Session FD (ancillary data).
- Use
ioctl(SessionFD, LIVEUPDATE_SESSION_RETRIEVE_FD, ...)to restore resources. - Call
ioctl(SessionFD, LIVEUPDATE_SESSION_FINISH).