-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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-3.3.0 - Changes to default /etc/hosts handling are breaking container workloads #11282
Comments
Can you provide a reproducer, podman always bind mounts a custom /etc/hosts by default. This is not new. |
@srcshelton Are you still seeing this issue? |
This is also an issue in I'm working on a reproducer, but something has definitely changed since |
Hmm - so this is weird... The general problem is:
… but I now see that even with
However, there's a process to update
… whereas the exact same thing under
But previously both used to work! So there appears to be some regression that I didn't spot at the time which causes the |
Ah - I've done some digging, and the code causing the |
… although having said this, something has changed as with Observations: When containers are started with
… whereas this entry does not exist for the identical invocation with Even if run with Example cases: (… with
(I'm not sure how this impacts on the |
OK, this one was intended - see #10319 I listed this as a bugfix and not a change in the release notes given it was unintended behavior. |
I wonder if we need a flag or option to add these entries back. |
I've also just realised that across various rebuilds of the physical host itself, I somehow ended up with a generic Restoring these entries actually seems to have fixed the problem, including (for reasons still not entirely clear to me…) the |
That is a separate issue, please open a new GH issue with full details. |
There's already the But if feels desirable to me to provide an option to add the container name to |
Can you use |
The change from #10319 / #11118 also breaks rootless containers. Consider the following use-case where we set the hostname for a rootless pod and an IP address for a rootless container with With podman-3.2.3-1.fc34.x86_64 I get:
Not the best result, my However, with podman-3.3.1-1.fc34.x86_64, that is now completely broken:
I'd really appreciate it if podman stopped changing the automagic logic and just gave users tools to configure exactly what they want. |
Can you open a new bug about this? This seems like a different issue (adding duplicate hosts entries under some circumstances). If you really want to manage |
Thanks, I've filed #11596 now. The problem with |
A friendly reminder that this issue had no activity for 30 days. |
This is what we have currently. In the main branch, doe this fix the original issue?
The name of the container and id are configured to the containers address. The host.containers.internal, will point at the default (first) ip of the host machine, if it can figure it out. |
A friendly reminder that this issue had no activity for 30 days. |
Since I never heard back, I am going to consider this issue fixed. Reopen if I am mistaken. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
With
podman-3.2.3
and prior,podman
could (optionally) write hosts entries to the container/etc/hosts
file.With the
podman-3.3.0
release-candidates, this behaviour has changed and/etc/hosts
within the container is now bind-mounted by default. This is causing failures with a wide-spread and unpredictable blast-radius as a variety of services are revealed to write a new temporary file and then move this over/etc/hosts
, which is now failing.There's the
--no-hosts
option which prevents and/etc/host
being written at all, but there doesn't appear to be any option to revert to the pre-3.3.0 functionality.I've only tested very briefly, but new failures are with containers performing software builds/deployments (which legitimately try to deploy a new
/etc/hosts
file) and - randomly - thespampd
service which it turns out tries to replace/etc/hosts
on startup and fails otherwise with a message readingsed: can't move '/etc/hostsCGNQu3' to '/etc/hosts': Device or resource busy
.In general, I'd hope any potentially-breaking change such as this would be opt-in rather than opt-out, especially when first introduced.
Output of
podman version
:Output of
podman info --debug
: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)
Yes
The text was updated successfully, but these errors were encountered: