APIv2: running containers fails when "NetworkMode" is "default" (which is the default value docker-py uses) #8544
Labels
In Progress
This issue is actively being worked by the assignee, please do not work on this at this time.
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.
/kind bug
Description
Trying to find regressions from Podman 2.1.1 by exercising the APIv2 trough docker-py's test suite (see #5386) I came across a regressions in the
CreateContainerTest.test_group_id_ints
test.A container is incidentally created with
"NetworkMode": "default"
. Trying to start it later fails with "no net configurations found in /etc/cni/net.d"."NetworkMode"
is set to"default"
as a default/fallback value by docker-py and has been for at least 4 years. Although neither documented in the CLI nor in the API docs (under HostConfig->NetworkMode)"default"
seems to get special treatment within the Docker engine (but I'm not sure how far it goes).Steps to reproduce the issue:
# inside the podman repo ./bin/podman system service -t 0
In another shell
Describe the results you received:
The API call to start the container fails and returns this:
It creates/leaves a weird container:
Describe the results you expected:
When the container runs successfully the logs would have the output from the
id
command:Additional information you deem important (e.g. issue happens only occasionally):
This worked on Podman 2.1.1 and fails on 3.0-dev (currently: b2cd6e0). FWIW using
"private"
instead of"default"
makes it work.Grepping through the test logs the "no net configurations found in /etc/cni/net.d" error message is the (superficial?) cause of failure for 50 of the API tests ATM. 😐
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: