[Bug 2073772] Re: rpool fails to import on first boot after automated install (failed PRE_SHUTDOWN?)

Olivier Gayot 2073772 at bugs.launchpad.net
Tue Aug 20 15:28:28 UTC 2024


Hello Richard,

I've been trying to reproduce this bug today; so far without success. I
used the following cloud-config:

```
#cloud-config
users:
    - default
    - name: root
      ssh_authorized_keys:
        - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMM/qhS3hS3+IjpJBYXZWCqPKPH9Zag8QYbS548iEjoZ olivier at camelair
autoinstall:
  version: 1
  storage:
    layout:
      name: zfs
  identity:
    username: ubuntu
    password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
    realname: ''
    hostname: ubuntest
```

I used the `users` section to give me SSH access to the installer
environment. (so I could run journalctl -f). Below is what the journal
captured before the machine starting rebooting; which seems to show that
the installer did the right thing for me:

```
Aug 20 15:26:50 ubuntu-server systemd[1]: Started run-u70.service - /usr/sbin/zpool export -a.
Aug 20 15:26:50 ubuntu-server zed[21057]: eid=131 class=pool_export pool='bpool' pool_state=EXPORTED

Broadcast message from root at ubuntu-server (Tue 2024-08-20 15:26:50 UTC):

The system will reboot now!

Aug 20 15:26:50 ubuntu-server zed[21059]: eid=132 class=config_sync pool='bpool' pool_state=UNINITIALIZED
Aug 20 15:26:50 ubuntu-server zed[21061]: eid=133 class=pool_export pool='rpool' pool_state=EXPORTED
Aug 20 15:26:50 ubuntu-server zed[21063]: eid=134 class=config_sync pool='rpool' pool_state=UNINITIALIZED
Aug 20 15:26:50 ubuntu-server systemd[1]: run-u70.service: Deactivated successfully.
Aug 20 15:26:50 ubuntu-server systemd-logind[1250]: The system will reboot now!
Aug 20 15:26:50 ubuntu-server subiquity_event.1510[1510]: subiquity/Shutdown/shutdown: mode=REBOOT
```

Are you comfortable sharing the contents of your cloud-config /
autoinstall file so I can try locally?

Thank you,
Olivier

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

Title:
  rpool fails to import on first boot after automated install (failed
  PRE_SHUTDOWN?)

Status in subiquity package in Ubuntu:
  Triaged

Bug description:
  After installing 24.04 with a zfs root, the system fails on first boot
  with an error that the rpool belongs to another system. This suggests
  that the installer is failing to export the pools after the install is
  complete. The zpool import must be manually forced for the boot to
  proceed, as in attached screenshot.

  For greater context: I work with an infrastructure in which we network
  boot machines from the ubuntu server ISO with a preseed to automate
  the OS installation on our bare metal. The intended result is that we
  can flag a server to be reinstalled, reboot it, and then wait until it
  comes back up with a clean install, no user intervention required or
  desired. For the 22.04 images this works fine and the server will
  install and reboot cleanly. For the 24.04 installer, it doesn't,
  because of the above error with the zpool after reboot. The same
  preseed that produces a booting system from the 22.04(.4) ISO results
  in failure for the 24.04 version.

  This seems to be the same ultimate failure mode as in
  https://bugs.launchpad.net/subiquity/+bug/2049761, albeit in that
  issue the reporting user used the desktop installer and it appears
  they may have rebooted the system before the installer was completely
  finished. That can't be the case for us as we're using the installer
  fully automated and it is choosing if and when it restarts.

  I will attach the installer-journal.txt log from the host, though
  obviously that only extends as far as the moment the installer copies
  its logfiles into the target. As the installation is done via
  netbooting the ISO the installer environment itself is entirely
  ephemeral so the complete logs from installation media are not
  available.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/2073772/+subscriptions




More information about the foundations-bugs mailing list