+ All Categories
Home > Documents > Beyond Init: systemd - Desktop Summit...Beyond Init: systemd Linux Plumbers Conference 2010 Kay...

Beyond Init: systemd - Desktop Summit...Beyond Init: systemd Linux Plumbers Conference 2010 Kay...

Date post: 28-Jan-2021
Category:
Upload: others
View: 10 times
Download: 0 times
Share this document with a friend
79
Beyond Init: systemd Linux Plumbers Conference 2010 Kay Sievers Lennart Poettering November 2010 Kay Sievers, Lennart Poettering Beyond Init: systemd
Transcript
  • Beyond Init: systemd

    Linux Plumbers Conference 2010

    Kay SieversLennart Poettering

    November 2010

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Triggers: Boot, Socket, Bus, Device, Path, Timers, More

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth, shutdown, kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks,

    including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth, shutdown, kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,

    mount, quota, hwclock, readahead, tmpfiles, random-seed, console,static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount,

    quota, hwclock, readahead, tmpfiles, random-seed, console,static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota,

    hwclock, readahead, tmpfiles, random-seed, console,static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock,

    readahead, tmpfiles, random-seed, console,static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead,

    tmpfiles, random-seed, console,static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles,

    random-seed, console,static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed,

    console,static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth, shutdown, kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading,

    early syslog, plymouth, shutdown, kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog,

    plymouth, shutdown, kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth,

    shutdown, kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth, shutdown,

    kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth, shutdown, kexec,

    SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth, shutdown, kexec,SELinux,

    initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: almost made Fedora 14.

    Substantial coverage of basic OS boot-up tasks, including fsck,mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

    static module loading, early syslog, plymouth, shutdown, kexec,SELinux, initrd+initrd-less boots.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: 7s on openSUSE. Less than 18s on full-featured Fedora.(SSD)

    Lots of room for improvement.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Status: 7s on openSUSE. Less than 18s on full-featured Fedora.(SSD)

    Lots of room for improvement.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Adoption: Fedora, openSUSE, Debian, Gentoo, ArchLinux, . . .

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Next: Fedora 15. cryptsetup,

    read-only root, session manager,automatic initrd fallback.

    Storage Assembly Daemon?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Next: Fedora 15. cryptsetup, read-only root,

    session manager,automatic initrd fallback.

    Storage Assembly Daemon?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Next: Fedora 15. cryptsetup, read-only root, session manager,

    automatic initrd fallback.

    Storage Assembly Daemon?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Next: Fedora 15. cryptsetup, read-only root, session manager,automatic initrd fallback.

    Storage Assembly Daemon?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Next: Fedora 15. cryptsetup, read-only root, session manager,automatic initrd fallback.

    Storage Assembly Daemon?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • As session manager:

    Redefine D-Bus session bus:

    Be honest, give up on multiple graphical logins per user, permachine. Don’t claim D-Bus was attached to Display. To reallow

    multiple session per home dir, per machine, attach multipledisplays to bus, differentiate by bus name suffix. Redefine session

    as time from first login to last logout.

    Analogous XDG RUNTIME DIR.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • As session manager:

    Redefine D-Bus session bus:

    Be honest, give up on multiple graphical logins per user, permachine. Don’t claim D-Bus was attached to Display. To reallow

    multiple session per home dir, per machine, attach multipledisplays to bus, differentiate by bus name suffix. Redefine session

    as time from first login to last logout.

    Analogous XDG RUNTIME DIR.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Or, introduce additional user bus?

    Relation to gnome-session?

    Handling of KDE style dlopen()-exec()?

    Handling of gdm/kiosk problem?

    Handling of user services when nobody is logged in?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Or, introduce additional user bus?

    Relation to gnome-session?

    Handling of KDE style dlopen()-exec()?

    Handling of gdm/kiosk problem?

    Handling of user services when nobody is logged in?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Or, introduce additional user bus?

    Relation to gnome-session?

    Handling of KDE style dlopen()-exec()?

    Handling of gdm/kiosk problem?

    Handling of user services when nobody is logged in?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Or, introduce additional user bus?

    Relation to gnome-session?

    Handling of KDE style dlopen()-exec()?

    Handling of gdm/kiosk problem?

    Handling of user services when nobody is logged in?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Or, introduce additional user bus?

    Relation to gnome-session?

    Handling of KDE style dlopen()-exec()?

    Handling of gdm/kiosk problem?

    Handling of user services when nobody is logged in?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux,

    compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

    points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

    replacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts.

    systemd provides aggressiveparallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

    points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

    replacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities,

    uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

    points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

    replacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services,

    offers on-demand starting of daemons, keepstrack of processes using Linux cgroups, supports snapshotting and

    restoring of the system state, maintains mount and automountpoints and implements an elaborate transactional

    dependency-based service control logic. It can work as a drop-inreplacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons,

    keepstrack of processes using Linux cgroups, supports snapshotting and

    restoring of the system state, maintains mount and automountpoints and implements an elaborate transactional

    dependency-based service control logic. It can work as a drop-inreplacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups,

    supports snapshotting andrestoring of the system state, maintains mount and automount

    points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

    replacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups, supports snapshotting andrestoring of the system state,

    maintains mount and automountpoints and implements an elaborate transactional

    dependency-based service control logic. It can work as a drop-inreplacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

    points

    and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

    replacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

    points and implements an elaborate transactionaldependency-based service control logic.

    It can work as a drop-inreplacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • “systemd is a system and session manager for Linux, compatiblewith SysV and LSB init scripts. systemd provides aggressive

    parallelization capabilities, uses socket and D-Bus activation forstarting services, offers on-demand starting of daemons, keeps

    track of processes using Linux cgroups, supports snapshotting andrestoring of the system state, maintains mount and automount

    points and implements an elaborate transactionaldependency-based service control logic. It can work as a drop-in

    replacement for sysvinit.”

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • init(8)

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Parallelization

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Socket-Based Activation

    The kernel orders and buffers requests for us!

    Implicit dependencies!

    Patching daemons

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Socket-Based Activation

    The kernel orders and buffers requests for us!

    Implicit dependencies!

    Patching daemons

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Socket-Based Activation

    The kernel orders and buffers requests for us!

    Implicit dependencies!

    Patching daemons

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Socket-Based Activation

    The kernel orders and buffers requests for us!

    Implicit dependencies!

    Patching daemons

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Bus-Based Activation

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Starting Less: On-Demand Loading

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Parallelizing File System Jobs

    autofs!

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Parallelizing File System Jobs

    autofs!

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Shell is evil

    Move to systemd, daemons, kernel, udev, . . .

    Provide proper debugging facilities

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Shell is evil

    Move to systemd, daemons, kernel, udev, . . .

    Provide proper debugging facilities

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Shell is evil

    Move to systemd, daemons, kernel, udev, . . .

    Provide proper debugging facilities

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • The best babysitter.

    Control Groups!

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • The best babysitter.

    Control Groups!

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • The best babysitter II

    Environment, resource limits, working directory, chroot(), umask,OOM adjustment, nice level, IO priority and class, CPU schedulerpriority and policy/reset-on-fork, CPU affinity, timer slack, stdio tosyslog/tty/null/kmsg, uid, gid, supplementary groups, file system

    namespacing (r/o file systems, inaccessible systems, mountpropagation, private /tmp), capabilities (inherited set, bounding

    set, secure bits), . . .

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • The best babysitter II

    Environment, resource limits, working directory, chroot(), umask,OOM adjustment, nice level, IO priority and class, CPU schedulerpriority and policy/reset-on-fork, CPU affinity, timer slack, stdio tosyslog/tty/null/kmsg, uid, gid, supplementary groups, file system

    namespacing (r/o file systems, inaccessible systems, mountpropagation, private /tmp), capabilities (inherited set, bounding

    set, secure bits), . . .

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Unit types: service, socket, device, mount, automount, target,snapshot, timer, swap, path

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Don’t reinvent the wheel:

    Read SysV/LSB init script headers, read /etc/fstab, supporttraditional inetd modes, support /dev/initctl, utmp, wtmp,

    support double-fork()ing daemons.

    .desktop files.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Don’t reinvent the wheel:

    Read SysV/LSB init script headers, read /etc/fstab, supporttraditional inetd modes, support /dev/initctl, utmp, wtmp,

    support double-fork()ing daemons.

    .desktop files.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Don’t reinvent the wheel:

    Read SysV/LSB init script headers, read /etc/fstab, supporttraditional inetd modes, support /dev/initctl, utmp, wtmp,

    support double-fork()ing daemons.

    .desktop files.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Snapshots

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Transaction System

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • D-Bus!

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • systemadm

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • systemd as basic OS building block

    systemd for cross-distribution standardization

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • systemd as basic OS building block

    systemd for cross-distribution standardization

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • systemd in the distributions

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Future: managing sessions

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • Say No! to Copyright Assignment.

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • That’s all, folks.

    Any questions?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • That’s all, folks.

    Any questions?

    Kay Sievers, Lennart Poettering Beyond Init: systemd

  • systemd

    http://www.freedesktop.org/wiki/Software/systemd

    http://0pointer.de/blog/projects/systemd

    git://anongit.freedesktop.org/systemd

    #systemd on irc.freenode.org

    Kay Sievers, Lennart Poettering Beyond Init: systemd

    http://www.freedesktop.org/wiki/Software/systemdhttp://0pointer.de/blog/projects/systemdgit://anongit.freedesktop.org/systemd

Recommended