Skip to content

Design considerations

Karim Vergnes edited this page Oct 22, 2024 · 4 revisions

Reliability

There are challenges that come with allowing live composition of the operating system image, and below are how ostree-sysext addresses them:

Extensions do not have dependency checking

Under ostree-sysext, each extension should be built directly atop the base image, duplicating dependencies as required. Thanks to OSTree's inherent deduplication, this carries a minimal storage space impact.

Extensions may overwrite package versions

The plugin system is provided as a means for a package manager, which is aware of potential conflicts, to object to system extensions being layered.

The requested combination is audited as a full set of the base image deployment, and all system extension deployments to be layered on top, ensuring full compatibility.

Extensions may fall out of sync

This responsibility is again offloaded to the plugin system. When updating the base image, or the set of extensions being layered on top, all installed plugins are summoned to audit the combination and give their approval.

The intent being that distro-agnostic system extensions can be distributed, such as software that installs into /opt, and those may not need to be checked for conflicts.

Stuff happens

One advantage of ostree-sysext over rpm-ostree for instance, is that extensions being layered at run time, in the event that boot fails, ostree-sysext can fall back to not loading extensions, leaving the user with a pristine base image.

Boot persistence

UAPI system extensions can be applied on boot, but given that ostree-sysext uses the volatile /run/extensions deployment space, the set of system extensions that it defines does not exist on boot.

To this end, an OSTree commit representing the combination of system extensions, as well as the resulting state files, is stored in /ostree/deploy/<osname>/extensions/deploy, and loaded by the initramfs on boot.

Additionally, the extension set to be loaded on boot is bound to a specific OSTree deployment via a symbolic link in /ostree/deploy/<osname>/deploy/<hash>.<0 or 1>.extensions