Skip to content

Commit 75b7978

Browse files
committed
build: Drop down to 50 layers for chunked images
It seems that (at least older?) containers/storage barfs on this, so let's drop down a good bit. (We could also change the ostree upstream default, but...mmm, perhaps later)
1 parent 22a85ec commit 75b7978

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cmd-build

+7-1
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,16 @@ else
383383
ostree_tarfile_path="${name}-${buildid}-ostree.${basearch}.ociarchive"
384384
gitsrc=$(jq -r .git.origin < "${PWD}/coreos-assembler-config-git.json")
385385
cmd=(ostree container encapsulate --copymeta="rpmostree.inputhash")
386+
387+
# The ostree-ext default is 64, but this is still too much apparently
388+
# for (older?) versions of podman AKA containers/storage (or maybe)
389+
# a kernel limitation? For example
390+
# `cannot mount layer, mount label "" too large 4168 > page size 4096`
391+
MAX_OSTREECONTAINER_LAYERS=50
386392
case "${ostree_format}" in
387393
oci) ;;
388394
# Note rpm-ostree always copies the rpmostree.inputhash key
389-
oci-chunked) cmd=(rpm-ostree container-encapsulate) ;;
395+
oci-chunked) cmd=(rpm-ostree container-encapsulate --max-layers="$MAX_OSTREECONTAINER_LAYERS") ;;
390396
*) fatal "Unknown ostree-format: ${ostree_format}"
391397
esac
392398
runv "${cmd[@]}" --repo="${tmprepo}" \

0 commit comments

Comments
 (0)