-
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
Container IP in /etc/hosts is wrong with docker-compose #12533
Comments
To add more information, this happens only with
|
Can you share the compose file so we can reproduce? |
Sorry, I forgot all the attachments that I promised ;) |
Even more simplistic example:
|
A friendly reminder that this issue had no activity for 30 days. |
@Luap99 Did you get a chance to look at this? |
A friendly reminder that this issue had no activity for 30 days. |
@mheon Did you ever get anywhere with this one? |
No, I think this needs to be looked at as a part of a larger restructuring
of hosts handling
…On Mon, Mar 7, 2022 at 15:51 Daniel J Walsh ***@***.***> wrote:
@mheon <https://github.com/mheon> Did you ever get anywhere with this one?
—
Reply to this email directly, view it on GitHub
<#12533 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCHMR5562NXYFCXBONDU6ZT3LANCNFSM5JSASFVQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
A friendly reminder that this issue had no activity for 30 days. |
@Luap99 is this something you are working on? |
Yes |
When we connect or disconnect from a network we also have to update /etc/hosts to ensure we only have valid entries in there. This also fixes problems with docker-compose since this makes use of network connect/disconnect. Fixes containers#12533 Signed-off-by: Paul Holzinger <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
On Fedora 35 with stock podman and docker-compose:
When running containers with docker-compose, the container's own IP address in /etc/hosts doesn't match it's network interface address. The address in the network's dnsmasq matches the interface address, however.
Hence, containers can not connect to themselves by hostname, but they can connect to other containers.
If I do virtually the same with podman alone (i.e. create a network, start a container, check the IPs) everything is fine.
So it is some docker-compose effect..
Steps to reproduce the issue:
I created a small reproducer.
Start podman.socket (if not active)
Here is what I get from
cat /etc/hosts; ifconfig
per container:Describe the results you expected:
The IPs of the same container in
match.
Additional information you deem important (e.g. issue happens only occasionally):
Issue happens every time, but only with docker-compose.
I attach the journal output of podman.service. Note that, there are two instances of dnsmasq started for that network and containers are added two times, which looks strange to me.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: