Upgrade to Pro — share decks privately, control downloads, hide ads and more …

State of transactional-update

State of transactional-update

You may have heard about transactional updates already - that thing that will force you to reboot your system just like on Windows. Well, it still does, but it also provides a huge benefit compared to your regular updates: It won't break your currently running system.

transactional-update is the default update mechanism on openSUSE Kubic and when using the "Transactional Server" role in openSUSE Leap or Tumbleweed. This talk is intended for both existing users and newcomers and will feature the following contents:

- Give an overview of the design
- Highlight the most important changes since last year, including the all-new _/etc_ handling
- Give a general overview of the file system layout

Ignaz Forster

May 25, 2019
Tweet

More Decks by Ignaz Forster

Other Decks in Technology

Transcript

  1. “Regular” Updates current / Backup / (pre) 1. 2. Backup

    / (post) 3. Active system 1. snapper creates “pre” snapshot 2. zypper updates the current system 3. snapper create “post” snapshot Update is modifying the currently active file system Restarts services immediately
  2. Definition A transactional update is an update that • is

    atomic – Either fully applied, or not applied at all – Update does not influence the running system • can be rolled back – A failed or incompatible update can be quickly discarded to restore the previous system condition
  3. Update with transactional-update current / next / 1. 2. Active

    system 1. snapper creates new target snapshot 2. zypper updates system in snapshot, makes it read-only and sets it as default for next boot • Current root file system is not modified • No backup snapshots required • Discard snapshot in case of errors ➔ Reboot activates new system
  4. Changelog: /var handling • /var is (and continues to be)

    not mounted in the update environment – Fixed more packages modifying /var ➔ Most tickets are resolved now. • Transactional-update now prints a list of modified files if it detects changes in directories outside the root file system. • Did we miss something? Please open a bug report!
  5. Changelog: /etc handling • On read-only systems /etc has to

    be writable – Mounted as an overlay file system – Overlays stored in /var/lib/overlays • Each snapshot has one corresponding /etc overlay – Overlay will be mounted during the update – Before: Only one overlay for all snapshots • /etc overlays are stacked – Changes accumulated before the next boot will be visible both in the current and the next snapshot (if not changed in both overlays) – On rollback only the layers up to that snapshot will be mounted
  6. overlay /etc overlay defaults,upperdir=/sysroot/var/lib/overlay/18/etc,lowerdir=/sysroot/var/lib/ overlay/16/etc:/sysroot/var/lib/overlay/12/etc:/sysroot/var/lib/overlay/10/ etc:/sysroot/var/lib/overlay/8/etc:/sysroot/var/lib/overlay/7/etc:/sysroot/ var/lib/overlay/6/etc:/sysroot/etc,workdir=/sysroot/var/lib/overlay/work- etc,x-systemd.requires-mounts-for=/var,x-systemd.requires-mounts-for=/var/lib/ overlay,x-systemd.requires-mounts-for=/sysroot/var,x-systemd.requires-mounts- for=/sysroot/var/lib/overlay,x-initrd.mount

    0 0 Changelog: /etc fstab entry • To prevent the overlayfs stack from growing infinitely the /etc state of the oldest available snapshot is synchronized into the new snapshot – The /etc directory in a snapshot (/.snapshots/<num>/snapshot/etc) alone does not represent a consistent system state! – Do not mess with the files in /var/lib/overlays (though you can use them as a backup source if you want)
  7. Changelog: Misc • Add support for kexec (okurz) and kured

    as reboot methods • Support for Intel’s Telemetrics telemetry tool • Documentation: The Transactional Update Guide • Run zypper in --interactive / --non-interactive mode • Rollback to last known good snapshot: transactional-update rollback last • needs-restart support
  8. Conclusion • Use transactional-update to update from openSUSE Leap 15.0

    to 15.1 • Recommended talk: Tomorrow, 10:00 am / Atomic Updates - and /etc? (Thorsten Kukuk) • Further talks – Richard Brown (openSUSE MicroOS, openSUSE MicroOS Desktop), – Kimlin Why you should choose openSUSE Kubic?
  9. Next steps Your PC ran into a problem and needs

    to restart. We’re just checking if we can do something, and then we will restart for you. Hint: It’s called health-checker