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 <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-04-05 14:28:49 +02:00
parent adbedb1464
commit fcf9327773
2 changed files with 2 additions and 6 deletions

View File

@ -93,9 +93,6 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
storageOpts.ImageStore = cfg.ImageStore storageOpts.ImageStore = cfg.ImageStore
options = append(options, libpod.WithImageStore(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") { if fs.Changed("storage-driver") {
storageSet = true storageSet = true
storageOpts.GraphDriverName = cfg.StorageDriver storageOpts.GraphDriverName = cfg.StorageDriver

View File

@ -17,9 +17,8 @@ function setup_suite() {
IFS=" IFS="
" "
# Can't use $BATS_SUITE_TMPDIR because podman barfs: export PODMAN_LOGIN_WORKDIR="$BATS_SUITE_TMPDIR/podman-bats-registry"
# Error: the specified runroot is longer than 50 characters mkdir "$PODMAN_LOGIN_WORKDIR"
export PODMAN_LOGIN_WORKDIR=$(mktemp -d --tmpdir=${BATS_TMPDIR:-${TMPDIR:-/tmp}} podman-bats-registry.XXXXXX)
export PODMAN_LOGIN_USER="user$(random_string 4)" export PODMAN_LOGIN_USER="user$(random_string 4)"
export PODMAN_LOGIN_PASS="pw$(random_string 15)" export PODMAN_LOGIN_PASS="pw$(random_string 15)"