Soft Reboot: atomically replace rootfs and reboot userspace without kernel restart

Publié le: 13 septembre 2023
sur la chaîne: All Systems Go!
682
13

https://media.ccc.de/v/all-systems-go...



systemd v254 introduced a new reboot type: soft-reboot. It shortcuts the reboot process by not restarting the kernel, and instead shutting down userspace, followed by re-exec'ing systemd from the new rootfs, starting everything up again. Not only this allows to save time by virtue of doing less work, but it also allow select resources (File Descriptor Store) and select services that do not use the rootfs (Portable Services) to survive the reboot and continue uninterrupted. This talk will explore the details of this new feature, how it works, why it's useful, what are the shortcomings and how to make full use of it.

In many environments where image-based Linux is used, service interruption intervals are key metrics that need to be minimized as much as possible. On a traditional package-based distributions, the rootfs can be updated piecemeal and userspace services can be restarted one by one - assuming a perfect running dependency tracking system and perfect reliability (need to restart D-Bus? Good luck!).
On an image-based system this is obviously not possible, so a typical approach is relying on 'kexec', which loads a new kernel + initrd + rootfs, saving some time from a full reboot by avoiding giving back control to the firmware. But it turns out, it's not fast enough.

systemd v254 introduced a new reboot type: soft-reboot. This follows in the kexec footsteps by shortcutting the reboot process, and brings it ever further: the kernel is not restarted at all, and instead userspace is shut down and then systemd is re-exec'ed from the new rootfs, starting up again. Not only this allows to save time by virtue of doing less work, but it also allow resources (File Descriptor Store) and select services that do not use the rootfs (Portable Services) to survive the reboot and continue uninterrupted.

This talk will explore the details of this new feature, how it works, why it's useful, what are the shortcomings and how to make full use of it.

Luca Boccassi

https://cfp.all-systems-go.io/all-sys...

#asg2023


Sur cette page du site, vous pouvez voir la vidéo en ligne Soft Reboot: atomically replace rootfs and reboot userspace without kernel restart durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur All Systems Go! 13 septembre 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 682 fois et il a aimé 13 téléspectateurs. Bon visionnage!