Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

podman --subuidname does not set resolv.conf #9

Open
ibotty opened this issue Oct 11, 2019 · 10 comments
Open

podman --subuidname does not set resolv.conf #9

ibotty opened this issue Oct 11, 2019 · 10 comments

Comments

@ibotty
Copy link

ibotty commented Oct 11, 2019

I am running the latest podman from the projectatomic ppa repository

  • podman 1.6.1-1~ubuntu18.04~ppa3,
  • containernetworking-plugins 0.8.2-1~ubuntu18.04~ppa3 and
  • dnsname f5af33d.

When running a podman container with --subuidname, it does not correctly modify resolv.conf but uses the host's resolv.conf instead:

$ # correct:
$ sudo podman run alpine cat /etc/resolv.conf
search my-hosts.search
nameserver 10.88.0.1
$ # incorrect
$ sudo podman run --subuidname alpine cat /etc/resolv.conf
search my-hosts.search
nameserver my-hosts-nameserver1
nameserver my-hosts-nameserver1

I don't know whether that's a ticket for podman or dnsname. Please delegate if I am wrong.

@mheon
Copy link
Member

mheon commented Oct 11, 2019

I'm not familiar with any Podman flag named setuidname - is this a separate program being used to run Podman?

@ibotty
Copy link
Author

ibotty commented Oct 11, 2019

Argh. I forgot to copy paste correctly! I meant --subuidname.
Sorry for the mistake.

@ibotty ibotty changed the title podman --setuidname does not set resolv.conf podman --subuidname does not set resolv.conf Oct 11, 2019
@mheon
Copy link
Member

mheon commented Oct 11, 2019

Ah, a container in a user namespace. Hm.

@ibotty
Copy link
Author

ibotty commented Oct 11, 2019

Right, but in the host's net namespace.

@rhatdan
Copy link
Member

rhatdan commented Oct 11, 2019

I see no difference?

sh-5.0# sudo podman run --subuidname dwalsh alpine cat /etc/resolv.conf
search redhat.com
nameserver 10.11.5.19
nameserver 10.5.30.160
nameserver 192.168.1.1
sh-5.0# sudo podman run alpine cat /etc/resolv.conf
search redhat.com
nameserver 10.11.5.19
nameserver 10.5.30.160
nameserver 192.168.1.1

@ibotty
Copy link
Author

ibotty commented Oct 11, 2019

Are you using the dnsname plugin? Because AFAICT the dnsname plugin sets the nameserver to the bridge's gateway address (because that's where it instructs dnsmasq to listen).

@baude
Copy link
Member

baude commented Oct 11, 2019

i dont follow what should happen. can anyone elaborate ?

@ibotty
Copy link
Author

ibotty commented Oct 11, 2019

Dnsname configures a dnsmasq server to listen on the bridge gateway address (on the host). It correctly configures resolv.conf to point to that nameserver when used without using user namespaces. When using user namespaces it does not.

@baude
Copy link
Member

baude commented Oct 11, 2019

@ibotty interesting, thanks for the clarification. Do we all feel that is in error?

@rhatdan
Copy link
Member

rhatdan commented Oct 11, 2019

Sounds like an error to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants