debian-forge/test/data/manifests/fedora-boot.mpp.yaml
Michael Vogt f4f0c8f004 tests: remove lvm2 from the fedora-boot test manifest
With lvm2 the generated fedora fc38 boot image boots in degraded
mode with the following error:
```
[root@localhost ~]# journalctl -u lvm2-monitor.service|more
Nov 13 12:52:04 localhost.localdomain lvm[431]:   Failed to create /etc/lvm/devi
ces 2
Nov 13 12:52:04 localhost.localdomain lvm[431]:   Failed to set up devices.
Nov 13 12:52:04 localhost.localdomain systemd[1]: lvm2-monitor.service: Main pro
cess exited, code=exited, status=5/NOTINSTALLED
Nov 13 12:52:04 localhost.localdomain systemd[1]: lvm2-monitor.service: Failed w
ith result 'exit-code'.
Nov 13 12:52:04 localhost.localdomain systemd[1]: Failed to start lvm2-monitor.s
ervice - Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress p
olling.
```
This breaks the `test_boot.py` which expects the system after booting
in `running` state  (from `systemd is-system-running`).

It looks like this is some sort of race with our generated image,
potentially related to selinux, see
https://github.com/lvmteam/lvm2/blob/v2_03_18/lib/device/dev-cache.c#L1842
and note the lines around dm_prepare_selinux_context(). Note
also that `lvm2-monitor.service` runs with `DefaultDependencies=no`
(c.f.
https://github.com/lvmteam/lvm2/blob/v2_03_18/scripts/lvm2_monitoring_systemd_red_hat.service.in#L7)

Given that the official fc38 cloud image does not use lvm2 and that
it's not needed for the boot test this commit simply removes it
from the fedora-boot manifest. This fixes the test.
2023-11-14 10:45:44 -08:00

235 lines
7 KiB
YAML

# Taken from osbuild/images 3314f4c9fc
# Noticed the org.osbuild.test that was added.
version: '2'
pipelines:
- mpp-import-pipelines:
path: fedora-vars.ipp.yaml
- mpp-import-pipeline:
path: fedora-build-v2.ipp.yaml
id: build
runner:
mpp-format-string: org.osbuild.fedora{release}
- name: os
build: name:build
stages:
- type: org.osbuild.kernel-cmdline
options:
root_fs_uuid: 6e4ff95f-f662-45ee-a82a-bdf44a2d0b75
kernel_opts: ro no_timer_check console=ttyS0,115200n8 biosdevname=0 net.ifnames=0
- type: org.osbuild.rpm
inputs:
packages:
type: org.osbuild.files
origin: org.osbuild.source
mpp-depsolve:
architecture: $arch
module-platform-id: $module_platform_id
repos:
mpp-eval: repos
packages:
- "@Fedora Cloud Server"
- chrony
- langpacks-en
- qemu-guest-agent
- kernel-core
excludes:
- dracut-config-rescue
- firewalld
- geolite2-city
- geolite2-country
- plymouth
# excluded because not part of the official fc38 cloud image
# and causing boot errors
- lvm2
- lvm2-libs
options:
gpgkeys:
mpp-eval: gpgkeys
exclude:
docs: true
install_langs:
- en_US
- type: org.osbuild.fix-bls
options:
prefix: ''
- type: org.osbuild.locale
options:
language: en_US
- type: org.osbuild.hostname
options:
hostname: localhost.localdomain
- type: org.osbuild.timezone
options:
zone: UTC
- type: org.osbuild.fstab
options:
filesystems:
- uuid: 6e4ff95f-f662-45ee-a82a-bdf44a2d0b75
vfs_type: ext4
path: /
options: defaults
- uuid: 0194fdc2-fa2f-4cc0-81d3-ff12045b73c8
vfs_type: ext4
path: /boot
options: defaults
- uuid: 7B77-95E7
vfs_type: vfat
path: /boot/efi
options: defaults,uid=0,gid=0,umask=077,shortname=winnt
passno: 2
- type: org.osbuild.grub2
options:
root_fs_uuid: 6e4ff95f-f662-45ee-a82a-bdf44a2d0b75
boot_fs_uuid: 0194fdc2-fa2f-4cc0-81d3-ff12045b73c8
kernel_opts: ro no_timer_check console=ttyS0,115200n8 biosdevname=0 net.ifnames=0
legacy: i386-pc
uefi:
vendor: fedora
unified: true
saved_entry:
mpp-format-string: 'ffffffffffffffffffffffffffffffff-{rpms[''os''][''kernel-core''].evra}'
write_cmdline: false
config:
default: saved
- type: org.osbuild.systemd
options:
enabled_services:
- cloud-init.service
- cloud-config.service
- cloud-final.service
- cloud-init-local.service
default_target: multi-user.target
- type: org.osbuild.test
options:
script: /usr/bin/systemctl is-system-running --wait
- type: org.osbuild.selinux
options:
file_contexts: etc/selinux/targeted/contexts/files/file_contexts
- name: image
build: name:build
stages:
- type: org.osbuild.truncate
options:
filename: disk.img
size: '5368709120'
- type: org.osbuild.sfdisk
options:
label: gpt
uuid: D209C89E-EA5E-4FBD-B161-B461CCE297E0
partitions:
- bootable: true
size: 2048
start: 2048
type: 21686148-6449-6E6F-744E-656564454649
uuid: FAC7F1FB-3E8D-4137-A512-961DE09A5549
- size: 409600
start: 4096
type: C12A7328-F81F-11D2-BA4B-00A0C93EC93B
uuid: 68B2905B-DF3E-4FB3-80FA-49D1E773AA33
- size: 1024000
start: 413696
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
uuid: CB07C243-BC44-4717-853E-28852021225B
- size: 9048031
start: 1437696
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
uuid: 6264D520-3FB9-423F-8AB8-7A0A8E3D3562
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
lock: true
- type: org.osbuild.mkfs.fat
options:
volid: 7B7795E7
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
start: 4096
size: 409600
lock: true
- type: org.osbuild.mkfs.ext4
options:
uuid: 0194fdc2-fa2f-4cc0-81d3-ff12045b73c8
label: boot
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
start: 413696
size: 1024000
lock: true
- type: org.osbuild.mkfs.ext4
options:
uuid: 6e4ff95f-f662-45ee-a82a-bdf44a2d0b75
label: root
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
start: 1437696
size: 9048031
lock: true
- type: org.osbuild.copy
inputs:
root-tree:
type: org.osbuild.tree
origin: org.osbuild.pipeline
references:
- name:os
options:
paths:
- from: input://root-tree/
to: mount://root/
devices:
boot:
type: org.osbuild.loopback
options:
filename: disk.img
start: 413696
size: 1024000
boot.efi:
type: org.osbuild.loopback
options:
filename: disk.img
start: 4096
size: 409600
root:
type: org.osbuild.loopback
options:
filename: disk.img
start: 1437696
size: 9048031
mounts:
- name: root
type: org.osbuild.ext4
source: root
target: /
- name: boot
type: org.osbuild.ext4
source: boot
target: /boot
- name: boot.efi
type: org.osbuild.fat
source: boot.efi
target: /boot/efi
- type: org.osbuild.grub2.inst
options:
filename: disk.img
platform: i386-pc
location: 2048
core:
type: mkimage
partlabel: gpt
filesystem: ext4
prefix:
type: partition
partlabel: gpt
number: 2
path: /grub2