From fcf932777372e8b8bc13eb8b4067d1bcee7ba896 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 5 Apr 2024 14:28:49 +0200 Subject: [PATCH] podman --runroot: remove 50 char length restriction This was added ages ago in commit c65b3599cc, however in the meantime both podman and conmon can support longer socket paths as they use a workaround to open the path via /proc/self/fd, see openUnixSocket() in libpod/oci_conmon_attach_linux.go Thus this restriction is not needed anymore and we can drop a workaround in the tests. Fixes #22272 Signed-off-by: Paul Holzinger --- pkg/domain/infra/runtime_libpod.go | 3 --- test/system/setup_suite.bash | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go index 6c4d4494de..f6fc05af33 100644 --- a/pkg/domain/infra/runtime_libpod.go +++ b/pkg/domain/infra/runtime_libpod.go @@ -93,9 +93,6 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo storageOpts.ImageStore = cfg.ImageStore options = append(options, libpod.WithImageStore(cfg.ImageStore)) } - if len(storageOpts.RunRoot) > 50 { - return nil, errors.New("the specified runroot is longer than 50 characters") - } if fs.Changed("storage-driver") { storageSet = true storageOpts.GraphDriverName = cfg.StorageDriver diff --git a/test/system/setup_suite.bash b/test/system/setup_suite.bash index ab3791cb2b..97ff0fa107 100644 --- a/test/system/setup_suite.bash +++ b/test/system/setup_suite.bash @@ -17,9 +17,8 @@ function setup_suite() { IFS=" " - # Can't use $BATS_SUITE_TMPDIR because podman barfs: - # Error: the specified runroot is longer than 50 characters - export PODMAN_LOGIN_WORKDIR=$(mktemp -d --tmpdir=${BATS_TMPDIR:-${TMPDIR:-/tmp}} podman-bats-registry.XXXXXX) + export PODMAN_LOGIN_WORKDIR="$BATS_SUITE_TMPDIR/podman-bats-registry" + mkdir "$PODMAN_LOGIN_WORKDIR" export PODMAN_LOGIN_USER="user$(random_string 4)" export PODMAN_LOGIN_PASS="pw$(random_string 15)"