API: Simple create container call fails for rootless users with invalid configuration error (cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd) #6798
Labels
HTTP API
Bug is in RESTful API
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
Creating a container using API fails with configuration error.
podman create
seems to work with exactly same parameters.I suspect, that there's either an error in validation logic or loading order of configuration differs when running podman as a service.Edit: Could be anything.If podman service is started with sudo, API responds correctly.
Steps to reproduce the issue:
podman pull fedora
podman system service --log-level=debug --time=0 tcp:127.0.0.1:1213
curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:1213/containers/create?name=test' --data '{"name":"test","Image":"fedora"}'
Describe the results you received:
{"cause":"invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd","message":"CreateContainerFromCreateConfig(): invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd","response":500}
Describe the results you expected:
{"Id":"fcae6fc42b1acbb0a2277c76567a13aa9f7ae8df05d60f5f9eb13e9a88612121","Warnings":[]}
Additional information you deem important (e.g. issue happens only occasionally):
Tried following:
Output of
podman version
:Output of
podman info --debug
:Output of service:
The text was updated successfully, but these errors were encountered: