CI: Change 4k block device job to use LVM
An interesting, and frustrating aspect of 4k block devices is that the math begins to be impacted across the whole of the useage of the device. Specifically the LVM block spacing also begins to be thrown "out of alignment" which changes user calculations. Most users doing smaller allocations likely won't matter, but users doing thin volumes or filling the percentage of the remaining usable volume, also then break. So realistically, the best path to ensure we have appropriate 4k device testing, and our dependent tooling in diskimage-builder is also getting tested, is to run the more complex case in our CI job. This change is dependent upon two other changes which are under review. Change-Id: I5b23403c783fa84b4158708741524c3dc9a92722
This commit is contained in:
parent
0d7fd73919
commit
fde2cd608e
73
devstack/files/ci-block-device-for-lvm.yaml
Normal file
73
devstack/files/ci-block-device-for-lvm.yaml
Normal file
@ -0,0 +1,73 @@
|
||||
- local_loop:
|
||||
name: image0
|
||||
|
||||
- partitioning:
|
||||
base: image0
|
||||
label: gpt
|
||||
partitions:
|
||||
- name: ESP
|
||||
type: 'EF00'
|
||||
size: 350MiB
|
||||
mkfs:
|
||||
type: vfat
|
||||
mount:
|
||||
mount_point: /boot/efi
|
||||
fstab:
|
||||
options: "defaults"
|
||||
fsck-passno: 2
|
||||
- name: BSP
|
||||
type: 'EF02'
|
||||
size: 8MiB
|
||||
- name: root
|
||||
flags: [ boot ]
|
||||
size: 6G
|
||||
- lvm:
|
||||
name: lvm
|
||||
base: [ root ]
|
||||
pvs:
|
||||
- name: pv
|
||||
base: root
|
||||
options: [ "--force" ]
|
||||
vgs:
|
||||
- name: vg
|
||||
base: [ "pv" ]
|
||||
options: [ "--force" ]
|
||||
lvs:
|
||||
- name: lv_root
|
||||
base: vg
|
||||
extents: 50%VG
|
||||
- name: lv_var
|
||||
base: vg
|
||||
extents: 15%VG
|
||||
- name: lv_home
|
||||
base: vg
|
||||
extents: 10%VG
|
||||
- mkfs:
|
||||
name: fs_root
|
||||
base: lv_root
|
||||
type: xfs
|
||||
label: "img-rootfs"
|
||||
mount:
|
||||
mount_point: /
|
||||
fstab:
|
||||
options: "rw,relatime"
|
||||
fsck-passno: 1
|
||||
- mkfs:
|
||||
name: fs_var
|
||||
base: lv_var
|
||||
type: ext4
|
||||
mount:
|
||||
mount_point: /var
|
||||
fstab:
|
||||
options: "rw,relatime"
|
||||
fsck-passno: 2
|
||||
- mkfs:
|
||||
name: fs_home
|
||||
base: lv_home
|
||||
type: ext4
|
||||
mount:
|
||||
mount_point: /home
|
||||
fstab:
|
||||
options: "rw,nodev,relatime"
|
||||
fsck-passno: 2
|
||||
|
@ -401,7 +401,7 @@ IRONIC_DIB_IMAGE_OPTIONS=${IRONIC_DIB_IMAGE_OPTIONS:-}
|
||||
IRONIC_DIB_IMAGE_OS=${IRONIC_DIB_IMAGE_OS:-centos}
|
||||
IRONIC_DIB_IMAGE_RELEASE=${IRONIC_DIB_IMAGE_RELEASE:-9-stream}
|
||||
if [[ -z "$IRONIC_DIB_IMAGE_OPTIONS" ]]; then
|
||||
IRONIC_DIB_IMAGE_OPTIONS="$IRONIC_DIB_IMAGE_OS bootloader block-device-efi"
|
||||
IRONIC_DIB_IMAGE_OPTIONS="$IRONIC_DIB_IMAGE_OS bootloader block-device-efi-lvm growvols dracut-regenerate"
|
||||
fi
|
||||
|
||||
# Some drivers in Ironic require deploy ramdisk in bootable ISO format.
|
||||
@ -3085,12 +3085,13 @@ function build_dib_image {
|
||||
if ! $(type -P disk-image-create > /dev/null); then
|
||||
install_diskimage_builder
|
||||
fi
|
||||
# NOTE(TheJulia): Explicitly setting an release is likely not
|
||||
# needed, but just in case!
|
||||
DIB_GROWVOLS_TRIGGER=systemd \
|
||||
DIB_GROWVOLS_ARGS="img-rootfs=60%" \
|
||||
DIB_BLOCK_SIZE=$IRONIC_VM_BLOCK_SIZE \
|
||||
DIB_RELEASE=$IRONIC_DIB_IMAGE_RELEASE \
|
||||
DIB_BLOCK_DEVICE_CONFIG=file://$IRONIC_DEVSTACK_FILES_DIR/ci-block-device-for-lvm.yaml \
|
||||
disk-image-create "$IRONIC_DIB_IMAGE_OPTIONS" \
|
||||
-x -t qcow2 -o "$tempdir/target-os-image"
|
||||
-x -t qcow2 -o "$tempdir/target-os-image" --image-size 7
|
||||
chmod -R +r $tempdir
|
||||
mv "$tempdir/target-os-image.qcow2" "$target_path"
|
||||
rm -rf $tempdir
|
||||
|
@ -1023,9 +1023,15 @@
|
||||
description: "Build 4k disk artifacts with 4k VMs"
|
||||
parent: ironic-tempest-uefi-redfish-vmedia
|
||||
vars:
|
||||
tempest_test_timeout: 2800
|
||||
devstack_localrc:
|
||||
# NOTE(TheJulia): This job takes a while because it is blending
|
||||
# vmedia *and* 4k block device layouts which requires mastering and
|
||||
# streaming a real image as opposed to cirros.
|
||||
BUILD_TIMEOUT: 2400
|
||||
IRONIC_AUTOMATED_CLEAN_ENABLED: False
|
||||
IRONIC_VM_COUNT: 1
|
||||
IRONIC_VM_SPECS_DISK: 20
|
||||
IRONIC_VM_BLOCK_SIZE: 4096
|
||||
IRONIC_BUILD_DIB_IMAGE: True
|
||||
SWIFT_ENABLE_TEMPURLS: False
|
||||
|
Loading…
Reference in New Issue
Block a user