Autoinstall with storage-version 2 should guess unspecified offsets

Bug #1991413 reported by Olivier Gayot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity (Ubuntu)
Fix Committed
Medium
Olivier Gayot

Bug Description

When storage-version is 2, the following autoinstall excerpt produces an exception and the install fails.

```
        - type: disk
          ptable: gpt
          wipe: superblock-recursive
          path: /dev/sda
          grub_device: true
          id: disk-1

        - type: partition
          number: 1
          flag: boot
          device: disk-1
          size: 1G
          wipe: superblock
          id: partition-boot

        - type: partition
          number: 2
          device: disk-1
          size: -1
          wipe: superblock
          id: partition-root

```

TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'

Full traceback: https://pastebin.canonical.com/p/Gf5D2wVWhN/

Revision history for this message
Olivier Gayot (ogayot) wrote :

After doing more tests, it seems that the error only occurs when there is a size: -1 somewhere. Somehow, find_disk_parts_v2 never gets called if all partitions have a size specified, so it reduces the impact.

description: updated
description: updated
Steve Langasek (vorlon)
Changed in subiquity (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Olivier Gayot (ogayot)
Changed in subiquity (Ubuntu):
assignee: nobody → Olivier Gayot (ogayot)
status: Triaged → In Progress
Olivier Gayot (ogayot)
description: updated
Revision history for this message
Olivier Gayot (ogayot) wrote :
Olivier Gayot (ogayot)
Changed in subiquity (Ubuntu):
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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