Public bug reported:

Note: the analysis was done with an AI assistant (Claude). I reviewed this
report, and every claim is backed by the attached logs and package contents.
Happy to answer questions or test fixes.

On a 24.04 system with the installer's encrypted ZFS root (LUKS keystore),
do-release-upgrade to 26.04.1 died: right after a routine daemon-reload,
PID 1 stopped every encrypted ZFS mount and everything depending on them
(all sessions including the upgrader's, journald, gdm). /var/lib/dpkg and
/var/lib/apt are separate datasets and stayed unmounted, so the package
database was lost (recovered from ZFS snapshots).

Cause: noble's Ubuntu shell zfs-mount-generator (2.2.2-0ubuntu9.5) binds
mounts to zfs-load-key-rpool.service. resolute's zfsutils-linux
2.4.1-1ubuntu5.1 ships the upstream C generator (an ELF binary), which binds
them to [email protected], even though debian/changelog lists
ubuntu/0002-Revert-etc-systemd-zfs-mount-generator-rewrite-in-C.patch.
After the first reload following the unpack, 16 of 17 mounts (including /)
have After=+BindsTo= a never-started unit, so systemd stops them.

To verify, run both generators against the same /etc/zfs/zfs-list.cache
(attached: generator-output-diff.txt).

Timeline (CET):
  18:33:53  zfsutils-linux 2.2.2 -> 2.4.1-1ubuntu5.1 unpacked
  18:34:44  tpm-udev postinst: systemctl daemon-reload (the first reload after 
that)
  18:34:45  "-.mount: Failed to enqueue stop job", then every ZFS mount and
            dependent unit is stopped; the journal ends

Affects: in-place upgrades of encrypted ZFS roots (unencrypted pools and
fresh installs are not affected). Note that switching back to the shell
generator in an SRU would hit resolute-installed systems with the reverse
rename, so the fix needs a transition. Untested workaround: mask the
generator (ln -s /dev/null /etc/systemd/system-generators/zfs-mount-generator)
during the upgrade, then remove the mask before rebooting.

Related: LP: #1958142. Attachments are redacted.

** Affects: ubuntu-release-upgrader (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: zfs-linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: dist-upgrade noble2resolute resolute

** Attachment added: "generator-comparison.txt"
   
https://bugs.launchpad.net/bugs/2172540/+attachment/6013461/+files/generator-comparison.txt

** Attachment removed: "generator-comparison.txt"
   
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/2172540/+attachment/6013461/+files/generator-comparison.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2172540

Title:
  noble→resolute upgrade on encrypted ZFS root: renamed zfs-load-key
  unit makes daemon-reload stop all mounts and kill the upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2172540/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to