Project

General

Profile

Actions

Bug #6847

closed

[Crunch] Move Docker DNS configuration to Docker daemon

Added by Brett Smith over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Crunch
Target version:
Story points:
0.5

Description

crunch-job has this code to build its docker run command:

     # Dynamically configure the container to use the host system as its
      # DNS server.  Get the host's global addresses from the ip command,
      # and turn them into docker --dns options using gawk.
      $command .=
          q{$(ip -o address show scope global |
              gawk 'match($4, /^([0-9\.:]+)\//, x){print "--dns", x[1]}') };

We have this code because our own deployments run dnsmasq to resolve internal network names for the API and Keep servers; and when Docker detects that the host uses 127.0.0.1 for DNS, it starts the container using Google DNS in resolv.conf.

However, this requires compute nodes to run a DNS server, which seems like a deployment complication we don't need. docker daemon accepts one or more --dns flags to let you set default DNS servers for containers instead of Google DNS. On Debian, it's easy to set this in /etc/default/docker.io. I expect most distributions have a similar mechanism.

Let's get this configuration out of code and into deployment. Steps to complete this story:

  • Remove the code above from crunch-job.
  • In the compute node installation documentation, add a section to note that the Docker daemon uses Google DNS by default, and whatever DNS server it uses must be able to resolve the cluster's API and Keep servers. The default can be changed by using the Docker daemon's --dns flags. Link to the Docker daemon docs for more information. I don't think we can document the best way to do this for every distribution, but any suggestions or guidance you can add are worth bonus points.

Subtasks 1 (0 open1 closed)

Task #6853: Review 6847-docker-dns-wipResolvedWard Vandewege08/02/2015Actions
Actions #1

Updated by Brett Smith over 8 years ago

  • Status changed from New to In Progress
  • Assigned To set to Brett Smith
Actions #2

Updated by Brett Smith over 8 years ago

  • Target version changed from 2015-08-19 sprint to 2015-08-05 sprint
Actions #3

Updated by Ward Vandewege over 8 years ago

6847-docker-dns-wip LGTM

Actions #4

Updated by Brett Smith over 8 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados|commit:bb58564d632498a394ee75b07d17f41b724ef824.

Actions

Also available in: Atom PDF