https://bugzilla.redhat.com/show_bug.cgi?id=1128208



--- Comment #8 from Bill C. Riemers <[email protected]> ---
It looks like the problem is there is logic in docker that if the
/etc/resolv.conf file contains 127.0.0.1 it ignores the all the DNS entries and
instead uses the google addresses.  It is a bit tricky to reproduce the exact
tests, because NetworkManager will overwrite changes to /etc/resolv.conf almost
instantly...

So what I had to do:

cp /etc/resolv.conf /etc/resolv.conf.save
vi /etc/resolv.conf.save
chattr +i /etc/resolv.conf.save
mount --bind /etc/resolv.conf.save /etc/resolv.conf
service docker restart
docker run fedora cat /etc/resolv.conf


Here is the really fun part.  The new logic is only evaluated based on what is
in the docker daemon is started or restarted.   So if later I do:

umount /etc/resolv.conf
docker run fedora cat /etc/resolv.conf

I will find docker happily picks up my resolv.conf file with the 127.0.0.1 to
use inside the container...

At boot time, when my docker first starts, my /etc/resolv.conf contains:

domain docbill.info
search docbill.info
nameserver 172.31.252.1
nameserver 172.31.253.1

The docker daemon happily starts in the mode where it will copy
/etc/resolv.conf file.   Later when I connect via VPN and NetworkManage
completely rewrites my /etc/resolv.conf containers continue to pickup my
/etc/resolv.conf file.

In this case though I had done a "yum update -y" after my most recent reboot
while connected to VPN.   So when docker updated, it restarted the daemon.  The
daemon saw my /etc/resolv.conf contained 127.0.0.1 and so it decided to ignore
it.

All of this is pretty long and complicated.  So I'll write up simple reproduce
instructions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
golang mailing list
[email protected]
https://lists.fedoraproject.org/mailman/listinfo/golang

Reply via email to