Same failure here, twice, on a fresh 24.04.5 desktop install ("ZFS with
encryption", ubuntu-desktop-bootstrap 24.04.5.1) upgraded with the
Software Updater: zfsutils-linux 2.2.2-0ubuntu9.5 -> 2.4.1-1ubuntu5.1,
HWE kernel (zfs-kmod 2.4.1), pid 1 systemd 259.9-0ubuntu0.1 at the stop.
The same sequence as in the description: a daemon-reload some minutes
after the unpack, the rpool mounts stopped, the busy ones failing with
status 32, the session gone, dpkg half configured.
Three additions to the description and to LP: #2172540:
1. Why the revert is dead in 2.4.1 (the ELF that comment #3 mentions).
ubuntu/0002-Revert-etc-systemd-zfs-mount-generator-rewrite-in-C.patch
restores zfs-mount-generator.in and adds a per-directory
etc/systemd/system-generators/Makefile.am with
"systemdgenerator_SCRIPTS = zfs-mount-generator". But the tree builds
non-recursively: the top Makefile.am:25 includes etc/Makefile.am, and
nothing includes the new file (no include of it anywhere, and
configure.ac does not list it), while etc/Makefile.am:82-91 still
builds zfs-mount-generator as a program from zfs-mount-generator.c.
24.04's revert (ubuntu/0003-..., in 2.2.2-0ubuntu9.5) edited
etc/Makefile.am itself (systemdgenerator_PROGRAMS becomes
systemdgenerator_SCRIPTS), which is why 24.04 ships the script. The
generator hunk of ubuntu/4000-zsys-support.patch, which only edits
the .in, is dead with it.
2. Not fixed in the development series: zfs-linux 2.4.4-1ubuntu4
(stonking, tenacious) carries the same two patches
(debian/patches/series:13-14) and still builds the C program
(etc/Makefile.am:77-88).
3. A reproducer without an upgrade or a real disk, usable as a test
plan (attached: repro-zfs-linux.sh and its output on a 26.04 VM). On
a throwaway 26.04 system with no other pool in zfs-list.cache, it
makes a file pool under /dev/shm laid out like rpool (an encryption
root and three children mounted through zfs-list.cache), puts 24.04's
shell generator (zfsutils-linux_2.2.2-0ubuntu9.5_amd64.deb,
lib/systemd/system-generators/zfs-mount-generator) in
/etc/systemd/system-generators so that it shadows 2.4.1's, starts the
key unit and the mounts, then removes the shadow and runs one
daemon-reload. With systemd 259.9-0ubuntu0.1 and zfsutils-linux
2.4.1-1ubuntu5.1:
dev-shm-rzl-mnt-c.mount: Unit is stopped because bound to inactive
unit [email protected].
Unmounted dev-shm-rzl-mnt-a.mount - /dev/shm/rzl/mnt/a.
Unmounted dev-shm-rzl-mnt-c.mount - /dev/shm/rzl/mnt/c.
dev-shm-rzl-mnt-b.mount: Mount process exited, code=exited,
status=32/n/a
It refuses to run when another pool has a zfs-list.cache file: the
same reload would stop that pool's mounts too.
Why a reload, not only a boot, stops them (systemd 259.9): the reload's
coldplug restores each mount unit's state through mount_coldplug() ->
mount_set_state() -> unit_notify() (src/core/mount.c:710-735, :707), and
unit_notify() puts every unit that is active after the transition on the
stop-when-bound queue (src/core/unit.c:2856-2866), outside the
!MANAGER_IS_RELOADING block. manager_dispatch_stop_when_bound_queue()
(src/core/manager.c:1563-1599) then stops each one whose BindsTo= unit
is inactive with no job (unit_is_bound_by_inactive(),
src/core/unit.c:2230-2255).
On a fix: as LP: #2172540 notes, reviving the shell generator in an SRU
renames the unit the other way on systems installed with 26.04, so
either way the transition has to keep the mounts' BindsTo= satisfied
between the unpack and the next boot.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2168897
Title:
24.04 to 26.04 upgrade on encrypted ZFS root: first daemon-reload
after zfsutils-linux 2.4.1 is unpacked unmounts all datasets and kills
the session
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/2168897/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs