-
Notifications
You must be signed in to change notification settings - Fork 85
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
Container with network alias containing a space causes aardvark-dns crash #1019
Comments
Such a name is not a valid dns or hostname, thus it would make the most sense for podman to reject it right away. Of course we can improve error handling for aardvark-dns too but this is not a name that is going to work regardless. |
I agree that such a name does not make sense, in my case it is the result of a forgejo actions runner generating a ci job name like I don't know the best way to handle this, but rejecting invalid names before generating the config file sounds reasonable. |
I temporarily fixed the issue on my system using the following patch:
This just filters out any name containing |
Ideally podman would reject this right away when you try to create such a container. But as you mentioned if there is automated tooling that creates names like that today then returning an error would be breaking change. So yes you patch look reasonable if the goal is to drop all invalid names. Although I would say we should drop all invalid dns names not just space and comma |
I skimmed some of the RFCs that specify the DNS and concluded that I am not qualified to properly implement this. I have another patch that filters all names through Another solution would be to do some basic checking here and to proper checking in aardvark-dns. |
When you create a container that has a network alias containing a space, a malformed aardvark-dns config will be created that will cause it to crash.
Steps to reproduce:
podman network create test
to create a network with dns enabledpodman run --rm -it --network test debian
to create a working container. You can see aaardvark-dns
process running inhtop
for example and dns requests in the container are workingpodman run --rm -it --network test --network-alias "test alias" debian
in a second terminal. If you observe theaardvark-dns
process usinghtop
it will disappear when the container is started and dns in both containers is now brokenContents of
/run/user/1000/containers/networks/aardvark-dns/test
:The text was updated successfully, but these errors were encountered: