Nova validation checks checks reject working UEFI image
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
| oslo.utils |
New
|
Undecided
|
Unassigned | ||
Bug Description
This relates specifically to this image:
https:/
However, the problem should be easy enough to understand just from the description here without downloading it.
When attempting to boot the image in 2024.2 devstack we see the following failure:
Dec 04 11:01:53 capo-e2e-
There is an associated stack trace and the server enters the ERROR state.
This is a QCOW2 image. After downloading it I can manually convert it to raw to inspect its partition table:
> qemu-img convert -f qcow2 flatcar-
> fdisk -l flatcar-
Disk flatcar-
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D814FAF6-
Device Start End Sectors Size Type
flatcar-
flatcar-
flatcar-
flatcar-
flatcar-
flatcar-
flatcar-
We apparently have Nova configured to convert qcow2 images to raw before booting them, which we can also see in the logs:
Dec 04 11:01:37 capo-e2e-
Using a patch to oslo.utils from Stephen Finucane and adding some extra print statements of my own, it's clear that we're failing here:
> ./venv/bin/python ./oslo_
inspecting file: /tmp/flatcar-
detected file format: gpt
running safety checks...
i: 0, ostype: 12
i: 1, ostype: 238
i: 2, ostype: 0
i: 3, ostype: 0
valid_partions: [0, 1]
Safety check mbr on gpt failed because GPT MBR defines invalid extra partitions
FAILED! Safety checks failed: mbr
1/1 failed
This code expects there to be exactly one partition with a non-zero partition type, and that this partition must be the first one. In this image, both of the first 2 partitions have a non-zero partition type.
| summary: |
- Nova validation checks checks reject valid UEFI image + Nova validation checks checks reject working UEFI image |

notes for latter
the partion table layonut within the image is not very standard
Model: (file) format- inspector- test/flatcar- stable- 4081.2. 0-kube- v1.30.1. img.raw: 21.5GB
Disk /home/smooney/
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: pmbr_boot
Number Start End Size File system Name Flags
1 2097kB 136MB 134MB fat32 EFI-SYSTEM boot, legacy_boot, esp
2 136MB 138MB 2097kB BIOS-BOOT bios_grub
3 138MB 1212MB 1074MB btrfs USR-A
4 1212MB 2286MB 1074MB USR-B
6 2286MB 2420MB 134MB btrfs OEM
7 2420MB 2487MB 67.1MB OEM-CONFIG
9 2487MB 21.5GB 19.0GB ext4 ROOT
it appear that this image is trying to support both uefi and legacy biors boot mode but the presence of both a bios_grub and legacy_boot seams odd
i don't think it typeical to have both set especially on different portions.