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 2c3a15a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd-build
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ else
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
6 changes: 6 additions & 0 deletions src/cmdlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export basearch
arch=$(uname -m)
export arch

# 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 $arch in
"x86_64") DEFAULT_TERMINAL="ttyS0" ;;
"ppc64le") DEFAULT_TERMINAL="hvc0" ;;
Expand Down

0 comments on commit 2c3a15a

Please sign in to comment.