https://bugzilla.redhat.com/show_bug.cgi?id=1118234
Bug ID: 1118234 Summary: Docker doesn't update DNS IP when it's changed on system Product: Fedora EPEL Version: epel7 Component: docker-io Severity: medium Assignee: lsm5@switzerlandmail.ch Reporter: maxime.carron@fedoraproject.org QA Contact: extras-qa@fedoraproject.org CC: admiller@redhat.com, golang@lists.fedoraproject.org, hushan.jia@gmail.com, lsm5@switzerlandmail.ch, mattdm@redhat.com, mgoldman@redhat.com, s@shk.io, vbatts@redhat.com
Description of problem: When the DNS server is changed on the system, docker keep using the one used at its startup.
Version-Release number of selected component (if applicable): EL 7.0 docker : 1.0.0-1
How reproducible: Always.
Steps to Reproduce: 1. Start docker (systemctl start docker) 2. Do any operation which needs DNS resolution (docker pull fedora:latest) => System DNS is used 3. Change system DNS to 8.8.8.8 or any different DNS 4. Do some other operation which needs DNS resolution (docker pull fedora:rawhide) 5. You should see that first is still used
Actual results: No DNS update
Expected results: Docker should use the current system DNS
Additional info: This is especially disturbing on a laptop, because a docker restart is needed everytime I change network (when first DNS is not reachable anymore, usually when DNS has a private IP)
https://bugzilla.redhat.com/show_bug.cgi?id=1118234
Lokesh Mandvekar lsm5@switzerlandmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Component|docker-io |docker-io Version|epel7 |rawhide Product|Fedora EPEL |Fedora
--- Comment #1 from Lokesh Mandvekar lsm5@switzerlandmail.ch --- Hmm, don't have a fix yet, but it seems:
Case 1: change DNS from reachable to unreachable address, DNS settings take effect right away
Case 2: change DNS from unreachable to reachable address, the very first docker operation fails, but subsequent ones work without a restart.
Sample run follows (on a rawhide instance):
lsm5 @ nagato : /home/lsm5 $ docker pull fedora:latest Pulling repository fedora 3f2fed40e4b0: Download complete 511136ea3c5a: Download complete fd241224e9cf: Download complete lsm5 @ nagato : /home/lsm5 $ cat /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 lsm5 @ nagato : /home/lsm5 $ sudo mv /etc/resolv.conf /etc/resolv.conf.safe lsm5 @ nagato : /home/lsm5 $ sudo vim /etc/resolv.conf lsm5 @ nagato : /home/lsm5 $ cat /etc/resolv.conf nameserver 1.1.1.1 lsm5 @ nagato : /home/lsm5 $ docker pull fedora:rawhide Pulling repository fedora 2014/07/11 11:43:36 Get https://cdn-registry-1.docker.io/v1/repositories/library/fedora/tags: dial tcp: lookup cdn-registry-1.docker.io on 1.1.1.1:53: no answer from server lsm5 @ nagato : /home/lsm5 $ sudo mv /etc/resolv.conf.safe /etc/resolv.conf lsm5 @ nagato : /home/lsm5 $ cat /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 lsm5 @ nagato : /home/lsm5 $ docker pull fedora:rawhide Pulling repository fedora 2014/07/11 11:46:07 Get https://index.docker.io/v1/repositories/fedora/images: dial tcp: lookup index.docker.io on 1.1.1.1:53: no answer from server lsm5 @ nagato : /home/lsm5 $ docker pull fedora:rawhide Pulling repository fedora 64fd7993bcaf: Download complete 64fd7993bcaf: Pulling image (rawhide) from fedora 511136ea3c5a: Download complete
---/var/log/messages---
Jul 11 11:40:14 nagato docker: [584bdf56] -job pull(fedora, latest) = OK (0) Jul 11 11:42:45 nagato docker: 2014/07/11 11:42:45 POST /images/create?fromImage=fedora&tag=rawhide Jul 11 11:42:45 nagato docker: [584bdf56] +job pull(fedora, rawhide) Jul 11 11:43:36 nagato docker: [error] server.go:1185 Get https://cdn-registry-1.docker.io/v1/repositories/library/fedora/tags: dial tcp: lookup cdn-registry-1.docker.io on 1.1.1.1:53: no answer from server Jul 11 11:43:36 nagato docker: Get https://cdn-registry-1.docker.io/v1/repositories/library/fedora/tags: dial tcp: lookup cdn-registry-1.docker.io on 1.1.1.1:53: no answer from server Jul 11 11:43:36 nagato docker: [584bdf56] -job pull(fedora, rawhide) = ERR (1) Jul 11 11:45:47 nagato docker: 2014/07/11 11:45:47 POST /images/create?fromImage=fedora&tag=rawhide Jul 11 11:45:47 nagato docker: [584bdf56] +job pull(fedora, rawhide) Jul 11 11:46:07 nagato docker: Get https://index.docker.io/v1/repositories/fedora/images: dial tcp: lookup index.docker.io on 1.1.1.1:53: no answer from server Jul 11 11:46:07 nagato docker: [584bdf56] -job pull(fedora, rawhide) = ERR (1) Jul 11 11:46:11 nagato docker: 2014/07/11 11:46:11 POST /images/create?fromImage=fedora&tag=rawhide Jul 11 11:46:11 nagato docker: [584bdf56] +job pull(fedora, rawhide) Jul 11 11:46:16 nagato kernel: [37692.370612] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard Jul 11 11:46:16 nagato kernel: EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard Jul 11 11:47:07 nagato kernel: [37743.712593] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard Jul 11 11:47:07 nagato kernel: EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard Jul 11 11:47:16 nagato docker: [584bdf56] -job pull(fedora, rawhide) = OK (0)
---/var/log/messages---
Btw, the epel7 branch has been removed as docker is available by default on RHEL7. Though not sure if docker 1.0.0 (and later) have made it into RHEL7 proper yet.
Changing bug Product and Version to Fedora and rawhide.
https://bugzilla.redhat.com/show_bug.cgi?id=1118234
Daniel Walsh dwalsh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dwalsh@redhat.com
--- Comment #2 from Daniel Walsh dwalsh@redhat.com --- docker-1.3 should pick up the /etc/resolv.conf file on docker run time not at the time the daemon starts.
I think this fixes most of your problem.
https://bugzilla.redhat.com/show_bug.cgi?id=1118234
Lokesh Mandvekar lsm5@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|lsm5@fedoraproject.org | Assignee|lsm5@fedoraproject.org |lsm5@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1118234
Daniel Walsh dwalsh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
--- Comment #3 from Daniel Walsh dwalsh@redhat.com --- Not likely to change the rest.
Fixed in docker-1.3.1
https://bugzilla.redhat.com/show_bug.cgi?id=1118234
Lokesh Mandvekar lsm5@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |CURRENTRELEASE Last Closed| |2015-01-26 22:26:17
golang@lists.fedoraproject.org