Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Drop down to 50 layers for chunked images #2913

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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