Skip to content
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

[wip] libpod: propogate custom DNS server to /etc/resolv.conf only when dns_enabled for network #16175

Closed
wants to merge 1 commit into from

Conversation

flouthoc
Copy link
Collaborator

Podman populates container's /etc/resolv.conf with custom DNS servers ( specified via --dns or dns_server in containers.conf ) even when container is connected to a network where dns_enabled is true.

Current behavior does not matches with docker, hence following commit ensures that podman only populates custom DNS server when container is not connected to any network where DNS is enabled and for the cases where dns_enabled is true
the resolution for custom DNS server will happen via ( aardvark-dns or dnsname ).

Reference: https://docs.docker.com/config/containers/container-networking/#dns-services
Closes: #16172

container: `--dns` and `dns_server` behavior for containers connected to network matches with docker now 

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 14, 2022
@flouthoc flouthoc force-pushed the docker-parity-resolv-conf branch from aeb2e05 to 1eba972 Compare October 14, 2022 07:50
@flouthoc flouthoc force-pushed the docker-parity-resolv-conf branch 3 times, most recently from 1dab847 to 91f2ab3 Compare October 14, 2022 08:30
@Luap99
Copy link
Member

Luap99 commented Oct 14, 2022

Since aardvark has no support for custom dns right now we should not change this. Only when this feature is implemented we can switch this

@flouthoc flouthoc force-pushed the docker-parity-resolv-conf branch from 91f2ab3 to 4de1323 Compare October 14, 2022 09:39
@flouthoc
Copy link
Collaborator Author

Since aardvark has no support for custom dns right now we should not change this. Only when this feature is implemented we can switch this

That's fair we can get this in at last when entire feature is implemented.

@flouthoc flouthoc force-pushed the docker-parity-resolv-conf branch from 4de1323 to 54d79e2 Compare October 14, 2022 10:51
…_enabled

Podman populates container's `/etc/resolv.conf` with custom DNS servers ( specified via `--dns` or `dns_server` in containers.conf ) even when container is connected to a network where `dns_enabled` is `true`.

Current behavior does not matches with docker, hence following commit ensures that podman only populates custom DNS server when container is not connected to any network where DNS is enabled and for the cases where `dns_enabled` is `true`
the resolution for custom DNS server will happen via ( `aardvark-dns` or `dnsname` ).

Reference: https://docs.docker.com/config/containers/container-networking/#dns-services
Closes: containers#16172

```release-note
container: `--dns` and `dns_server` behavior for containers connected to network matches with docker now
```

Signed-off-by: Aditya R <[email protected]>
@flouthoc flouthoc force-pushed the docker-parity-resolv-conf branch from 54d79e2 to 01915ad Compare October 14, 2022 11:50
@rhatdan rhatdan changed the title libpod: propogate custom DNS server to /etc/resolv.conf only when dns_enabled for network [wip] libpod: propogate custom DNS server to /etc/resolv.conf only when dns_enabled for network Oct 14, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 14, 2022
@rhatdan
Copy link
Member

rhatdan commented Oct 14, 2022

Moving to WIP until the aardvark fix is in place.

@flouthoc
Copy link
Collaborator Author

Can be merged if all of the dependencies for #16197 is merged and #16197 itself is merged.

@flouthoc
Copy link
Collaborator Author

Closing in favor of: #16297

@flouthoc flouthoc closed this Oct 26, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman's --dns + --network is different than docker's --dns + --network
3 participants