Skip to content

Commit 443b9da

Browse files
nikita-dubrovskiijlebon
authored andcommitted
build: pass roofs size to osbuild
On s390x with secex the `root` labeled partition is not the last on the disk, so we need to explicitly size it.
1 parent 1bbf52a commit 443b9da

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/cmd-buildextend-metal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ image-type: "${image_type}"
243243
ostree-repo: "${ostree_repo}"
244244
metal-image-size: "${metal_image_size_mb}"
245245
cloud-image-size: "${cloud_image_size_mb}"
246+
# Note: this is only used in the secex case; there, the rootfs is
247+
# not the last partition on the disk so we need to explicitly size it
248+
rootfs-size: "${rootfs_size_mb}"
246249
EOF
247250
yaml2json "${image_dynamic_yaml}" "${image_dynamic_json}"
248251
cat "${image_json}" "${image_dynamic_json}" | jq -s add > "${image_for_disk_json}"

src/osbuild-manifests/coreos.osbuild.s390x.mpp.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ mpp-vars:
1717
efi_system_size_mb: 127
1818
se_size_mb: 200
1919
boot_size_mb: 384
20-
root_size_mb: 1800
20+
root_size_mb:
21+
mpp-format-int: $rootfs_size_mb
2122
boot_verity_size_mb: 128
2223
root_verity_size_mb: 256
2324
sector_size: 512

src/runvm-osbuild

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ platform=$(getconfig "image-type")
5555
deploy_via_container=$(getconfig_def "deploy-via-container" "")
5656
metal_image_size_mb=$(getconfig "metal-image-size")
5757
cloud_image_size_mb=$(getconfig "cloud-image-size")
58+
rootfs_size_mb=$(getconfig "rootfs-size")
5859
container_imgref=$(getconfig "container-imgref")
5960
container_repo=$(getconfig_def "container-repo" "")
6061
container_tag=$(getconfig_def "container-tag" "")
@@ -100,6 +101,7 @@ osbuild-mpp \
100101
-D extra_kargs=\""${extra_kargs}"\" \
101102
-D metal_image_size_mb="${metal_image_size_mb}" \
102103
-D cloud_image_size_mb="${cloud_image_size_mb}" \
104+
-D rootfs_size_mb="${rootfs_size_mb}" \
103105
-D qemu_secex=\""${secex}"\" \
104106
"${mppyaml}" "${processed_json}"
105107

0 commit comments

Comments
 (0)