install w/ ZFS + encryption: `cryptsetup luksFormat /dev/zvol/rpool/keystore` failure

Bug #2057661 reported by Béné
64
This bug affects 7 people
Affects Status Importance Assigned to Milestone
subiquity
Fix Released
High
Dan Bungert
ubuntu-desktop-provision
Fix Released
Undecided
Unassigned
subiquity (Ubuntu)
Fix Released
Undecided
Dan Bungert

Bug Description

When installing ZFS with Encryption, curtin may fail to create the keystore.
The symptom for this is the following in curtin-install.log

        Unexpected error while running command.
        Command: ['cryptsetup', 'luksFormat', '/dev/zvol/rpool/keystore', ...
        Exit code: 4

Original Description below

---

Today's daily image, install in a VM via quickemu. I chose ZFS with encryption and the install fails with this error. The installer is still open but it says "install failed" in red at the bottom. (Or something like that, in German that's what it says."

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: subiquity (unknown)
ProcVersionSignature: Ubuntu 6.8.0-11.11-generic 6.8.0-rc4
Uname: Linux 6.8.0-11-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.494
CloudArchitecture: x86_64
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSubPlatform: seed-dir (/var/lib/cloud/seed/nocloud)
CurtinAptConfig: /var/log/installer/curtin-install/subiquity-curtin-apt.conf
Date: Tue Mar 12 14:01:15 2024
ExecutablePath: /snap/ubuntu-desktop-bootstrap/29/bin/subiquity/subiquity/cmd/server.py
InterpreterPath: /snap/ubuntu-desktop-bootstrap/29/usr/bin/python3.10
LiveMediaBuild: Ubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240311)
MachineType: QEMU Standard PC (Q35 + ICH9, 2009)
ProcAttrCurrent: snap.hostname-desktop-bootstrap.subiquity-server (complain)
ProcCmdline: /snap/hostname-desktop-bootstrap/29/usr/bin/python3.10 -m subiquity.cmd.server --use-os-prober --storage-version=2 --postinst-hooks-dir=/snap/hostname-desktop-bootstrap/29/etc/subiquity/postinst.d
ProcEnviron:
 LANG=C.UTF-8
 LD_LIBRARY_PATH=<set>
 PATH=(custom, no user)
ProcKernelCmdLine: BOOT_IMAGE=/casper/vmlinuz --- quiet splash
Python3Details: /usr/bin/python3.12, Python 3.12.2, python3-minimal, 3.12.1-0ubuntu2
PythonDetails: N/A
SnapChannel:

SnapRevision: 29
SnapUpdated: False
SnapVersion: 0+git.ea537ca1
SourcePackage: subiquity
Title: partitioning crashed with CurtinInstallError
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/06/2015
dmi.bios.release: 0.0
dmi.bios.vendor: EFI Development Kit II / OVMF
dmi.bios.version: 0.0.0
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-q35-7.0
dmi.modalias: dmi:bvnEFIDevelopmentKitII/OVMF:bvr0.0.0:bd02/06/2015:br0.0:svnQEMU:pnStandardPC(Q35+ICH9,2009):pvrpc-q35-7.0:cvnQEMU:ct1:cvrpc-q35-7.0:sku:
dmi.product.name: Standard PC (Q35 + ICH9, 2009)
dmi.product.version: pc-q35-7.0
dmi.sys.vendor: QEMU

Related branches

Revision history for this message
Béné (bene-d) wrote :
information type: Private → Public
Revision history for this message
Dan Bungert (dbungert) wrote :

Thanks for the bug report.

Is this repeatable for you? I suspect a timing glitch (and will pursue that angle).

Changed in subiquity:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Béné (bene-d) wrote :

Thank for looking into this! I can't reproduce this with today's daily... I'll keep trying and let you know if I hit it again.

Let me know if I can do anything else to assist.

Revision history for this message
Dan Bungert (dbungert) wrote :

Thanks for re-testing. That somewhat confirms my timing bug assumption. Let's leave this bug open and we will see if we can address the flakiness.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/2057661

tags: added: iso-testing
Dan Bungert (dbungert)
Changed in subiquity:
status: Triaged → In Progress
Dan Bungert (dbungert)
Changed in subiquity:
status: In Progress → Fix Released
Revision history for this message
Dan Bungert (dbungert) wrote :

Actually, while a fix was done here, I think it's incomplete, as there are now at least 2 duplicates of this report. Moving back to Triaged.

Changed in subiquity:
assignee: nobody → Dan Bungert (dbungert)
status: Fix Released → Triaged
Revision history for this message
Dan Bungert (dbungert) wrote (last edit ):
Download full text (7.5 KiB)

One user on a private bug provided the following information about steps to reproduce:

vm setup: virt-manager
host system: jammy
cpus: 2
ram: 3G

config:
<domain type="kvm">
  <name>ubuntu24.04-3</name>
  <uuid>3b5e351d-d8a7-441a-a5cb-db21aa5cd307</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://ubuntu.com/ubuntu/24.04"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">3145728</memory>
  <currentMemory unit="KiB">3145728</currentMemory>
  <vcpu placement="static">2</vcpu>
  <os>
    <type arch="x86_64" machine="pc-q35-6.2">hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state="off"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on"/>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" discard="unmap"/>
      <source file="/var/lib/libvirt/images/ubuntu24.04-3.qcow2"/>
      <target dev="vda" bus="virtio"/>
      <boot order="2"/>
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/ubuntu/Downloads/noble-desktop-amd64.iso"/>
      <target dev="sda" bus="sata"/>
      <readonly/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain...

Read more...

Dan Bungert (dbungert)
summary: - Daily install w/ ZFS + encryption: partitioning crashed with
- CurtinInstallError
+ install w/ ZFS + encryption: `cryptsetup luksFormat
+ /dev/zvol/rpool/keystore` failure
Dan Bungert (dbungert)
Changed in subiquity:
status: Triaged → In Progress
Dan Bungert (dbungert)
Changed in subiquity (Ubuntu):
status: New → In Progress
milestone: none → ubuntu-24.04
assignee: nobody → Dan Bungert (dbungert)
Dan Bungert (dbungert)
Changed in subiquity:
status: In Progress → Fix Committed
Changed in subiquity (Ubuntu):
status: In Progress → Fix Committed
Dan Bungert (dbungert)
description: updated
Dan Bungert (dbungert)
Changed in ubuntu-desktop-provision:
status: New → Fix Committed
Revision history for this message
Dan Bungert (dbungert) wrote :

Server version of this fix available now as snap refresh, or in the 20240416 ISO.
Desktop version on the candidate channel, which requires promotion before it will be on the Desktop ISOs.

Changed in subiquity:
status: Fix Committed → Fix Released
Changed in subiquity (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dan Bungert (dbungert) wrote :

Marked fix released for ubuntu-desktop-provision as this fix can be found in current dailies.

Changed in ubuntu-desktop-provision:
status: Fix Committed → Fix Released
Revision history for this message
Kirt Runolfson (kirtr) wrote : Re: [Bug 2057661] Re: install w/ ZFS + encryption: `cryptsetup luksFormat /dev/zvol/rpool/keystore` failure

Tested with success!

On Fri, Apr 19, 2024 at 3:11 PM Dan Bungert <email address hidden>
wrote:

> Marked fix released for ubuntu-desktop-provision as this fix can be
> found in current dailies.
>
> ** Changed in: ubuntu-desktop-provision
> Status: Fix Committed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/2057661
>
> Title:
> install w/ ZFS + encryption: `cryptsetup luksFormat
> /dev/zvol/rpool/keystore` failure
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/subiquity/+bug/2057661/+subscriptions
>
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.