Starting a container via compat API with with StorageOpt
crashes the server
#12766
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Starting a container via compat API with with
StorageOpt
crashes the server with the following error:runtime error: index out of range [1] with length 1
(see below).Doing a little digging it seems like decoding the options (by splitting on "=") in libpod/container_internal.go:454 fails because they have already been decoded in pkg/specgenutil/specgen.go:397.
It seems like the relevant code was added in #11991.
Steps to reproduce the issue:
curl -sS --unix-socket /run/user/1000/podman/podman.sock -XPOST 'http://localhost/v1.40/containers/create' -H "Content-Type: application/tar" -d '{"Tty": false, "OpenStdin": false, "StdinOnce": false, "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "Cmd": ["echo", "test"], "Image": "alpine:3.10", "NetworkDisabled": false, "HostConfig": {"NetworkMode": "default", "StorageOpt": {"size": "120G"}}}'
Describe the results you received:
Server response:
Server logs:
Output of
podman version
:The text was updated successfully, but these errors were encountered: