-
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
generated systemd unit files need to pull in network-online.target #10655
Comments
This sounds good to me. |
@vrothberg FYI |
Sounds good to me. Indeed the man pages suggest that Wants= would address the issue. |
@vrothberg would this be as simple as changing |
@cdoern Yes |
@cdoern, the unit tests will require some massaging as well. You can run them in the project root with |
Require the network to be online in all (generated) systemd units to make sure that containers and Podman run only after the network has been fully configured. Fixes: containers#10655 Signed-off-by: Valentin Rothberg <[email protected]>
It's worth noting that depending on |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Generated systemd unit files need to pull in
network-online.target
; at the moment they haveAfter=network-online.target
, but as per the systemd documentation, they should haveWants=network-online.target
as well.In my particular case, I've seen podman starting containers before the host has finished using DHCP to configure the main interface, which in turns means the host resolv.conf has not been correctly populated and is therefore not correctly configured in the containers either.
Steps to reproduce the issue:
(my particular instance of this problem is a race condition so hard to create a simple / scriptable reproducer; hopefully examination of systemd docs and podman generated unit files make this "obvious to inspection.")
Describe the results you received:
Started containers cannot always access DNS.
Describe the results you expected:
Started containers should reliably be able to access the network.
Additional information you deem important (e.g. issue happens only occasionally):
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)
3.2 is not yet in the apt repos it seems; inspection of the source on github suggests the relevant code has not recently changed.
Additional environment details (AWS, VirtualBox, physical, etc.):
podman containers are nested within a systemd container environment (probably best not to ask!)
The text was updated successfully, but these errors were encountered: