Skip to content

Commit

Permalink
build: Drop down to 50 layers for chunked images
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
cgwalters committed Jun 9, 2022
1 parent 22a85ec commit 75b7978
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cmd-build
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,16 @@ else
ostree_tarfile_path="${name}-${buildid}-ostree.${basearch}.ociarchive"
gitsrc=$(jq -r .git.origin < "${PWD}/coreos-assembler-config-git.json")
cmd=(ostree container encapsulate --copymeta="rpmostree.inputhash")

# The ostree-ext default is 64, but this is still too much apparently
# for (older?) versions of podman AKA containers/storage (or maybe)
# a kernel limitation? For example
# `cannot mount layer, mount label "" too large 4168 > page size 4096`
MAX_OSTREECONTAINER_LAYERS=50
case "${ostree_format}" in
oci) ;;
# Note rpm-ostree always copies the rpmostree.inputhash key
oci-chunked) cmd=(rpm-ostree container-encapsulate) ;;
oci-chunked) cmd=(rpm-ostree container-encapsulate --max-layers="$MAX_OSTREECONTAINER_LAYERS") ;;
*) fatal "Unknown ostree-format: ${ostree_format}"
esac
runv "${cmd[@]}" --repo="${tmprepo}" \
Expand Down

0 comments on commit 75b7978

Please sign in to comment.