-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman doesn't report host and null networks in API #16092
Comments
A friendly reminder that this issue had no activity for 30 days. |
This happened to me when I tried to use I tried to run simple services:
base:
image: alpine:latest
command: sh -c "echo ok" When I have $ docker-compose up
network example_default was found but has incorrect label com.docker.compose.network set to "" I believe, the root cause is same as reported by @tkolo. Rendering compose file ( name: example
services:
base:
command:
- sh
- -c
- echo ok
image: alpine:latest
networks:
default: null
networks:
default:
name: example_default env:
|
@Luap99 PTAL |
This does not look related to this bug. Something wrong with labels but that compose file shouldn't use host or none network. Please file a separate bug. |
The problem here is we do not consider host or none real networks. There is nothing to do in the network backend. It is just a simple oci spec setting, no network setup is performed in these cases. While we can fake these networks to be included in the compat api, the problem is there is no way for us to fake an actual ID. If a caller tries to use the ID we have to actually know that we should use none or host and with our current code structure this is not trivial to implement. And also I have no idea what the linked HA code tries to do. You cannot disconnect the host network when the container uses host networking!
I mean I understand that this is some weird workaround for a docker bug but logically doing this makes no sense and would cause an error in the disconnect call within podman as well so I am not sure if HA would fail because of that as well. |
I don't mind submitting an issue on their side as well asking for podman compatibility, or perhaps even attempt to fix the code myself, however a consensus on proper solution from podman's side first would be helpful |
It is reasonable to expect a fix on our side. We try to provide a compatible API but there are of course and we generally try to address them. That one here is just not so trivial and it is hard to find time to fix more complicated bugs. If you could ask them about podman support that would help of course. As this seems to be a specific bug work around simply not calling that code for podman should be good enough I assume. |
Hey, didn't find the ticket you opened for this specific case, but to follow up on this: i had the same issue and it seemingly was caused by the network being still set up from my test environment from before i did the docker-compose test:
Deleting the network (not just env: |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
This bug is about podman<->docker incompatibility.
When inspecting networks, docker lists two additional built-in networks that podman doesn't: host and null. While it's not a problem in tooling, same behavior occurs when querying network list via docker.scok. This poses a problem for certain integrations, currently I'm struggling with setting up home assistant supervisor on podman instead of docker. It crashes when trying to fetch host network
Steps to reproduce the issue:
Start podman service/enable podman.socket
curl --unix-socket /run/podman/podman.sock http://localhost/v1.41/networks/host
Describe the results you received:
Describe the results you expected:
A valid response describing host "network", per docker specs
Additional information you deem important (e.g. issue happens only occasionally):
vs
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
I'm using Arch Linux ARM aarch64 on raspberry pi CM4
The text was updated successfully, but these errors were encountered: