-
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
Fix systemd-resolved detection. #10734
Fix systemd-resolved detection. #10734
Conversation
28f539e
to
58d6a6d
Compare
You need to add a test to make this work, or add a [NO TESTS NEEDED] to your commit message. What value gets into the conainers resolv.conf when this happens? |
Previously podman failed when run in an environment where 127.0.0.53 is the only nameserver but systemd-resolved is not used directly. In practice this happened when podman was run within an alpine container that used the host's network and the host was running systemd-resolved. This fix makes podman ignore a file not found error when reading /run/systemd/resolve/resolv.conf. Closes containers#10733 [NO TESTS NEEDED] Signed-off-by: Max Goltzsche <[email protected]>
58d6a6d
to
0fb165e
Compare
I've added the
I am afraid the podman code responsible for the bug cannot be covered by a unit test nicely since it would need to be able to write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Test failures look like flakes. LGTM
…On Sun, Jun 20, 2021 at 11:43 openshift-ci[bot] ***@***.***> wrote:
[APPROVALNOTIFIER] This PR is *APPROVED*
This pull-request has been approved by: *Luap99
<#10734 (review)>*,
*mgoltzsche <#10734#>*
The full list of commands accepted by this bot can be found here
<https://go.k8s.io/bot-commands?repo=containers%2Fpodman>.
The pull request process is described here
<https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process>
Needs approval from an approver in each of these files:
- OWNERS <https://github.com/containers/podman/blob/master/OWNERS>
[Luap99]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCAP7PI2N6NXCIPSQKLTTYECJANCNFSM467NYSXQ>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, mgoltzsche, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Previously podman failed when run in an environment where 127.0.0.53 is
the only nameserver but systemd-resolved is not used directly.
In practice this happened when podman was run within an alpine container
that used the host's network and the host was running systemd-resolved.
This fix makes podman ignore a file not found error when reading /run/systemd/resolve/resolv.conf.
Closes #10733
Follow-up of #10598
Relates to mgoltzsche/podman-static#10
To verify that this change really fixes the problem I created a Dockerfile that uses this patch here.