From 69fc891e2701c92cfdd268417edb1889bafda58a Mon Sep 17 00:00:00 2001 From: Alexei Sheplyakov Date: Sat, 18 Jul 2015 10:06:22 +0300 Subject: [PATCH] Make DNS on the master node work even when cobbler is not running Currently resolv.conf on the master node sets the master node itself as the only DNS server. The requests are served by dnsmasq running in the cobbler container. Thus name resolution does not work when cobbler is not running (not ready yet, the container is being updated, docker is being updated, etc). This breaks updates and other actions (such as building bootstrap images) which need a working DNS. To solve the issue add the upstream DNS servers to resolv.conf. blueprint fuel-bootstrap-on-ubuntu Change-Id: I16261d2eaf37c3f59f28a494d38ee72c6d3aa2d2 --- deployment/puppet/nailgun/examples/host-only.pp | 1 + deployment/puppet/nailgun/manifests/host.pp | 1 + deployment/puppet/nailgun/templates/resolv.conf.erb | 3 +++ 3 files changed, 5 insertions(+) diff --git a/deployment/puppet/nailgun/examples/host-only.pp b/deployment/puppet/nailgun/examples/host-only.pp index ea81c0f578..976070b765 100644 --- a/deployment/puppet/nailgun/examples/host-only.pp +++ b/deployment/puppet/nailgun/examples/host-only.pp @@ -35,6 +35,7 @@ class { 'nailgun::host': nailgun_user => $nailgun_user, dns_domain => $::fuel_settings['DNS_DOMAIN'], dns_search => $::fuel_settings['DNS_SEARCH'], + dns_upstream => split($::fuel_settings['DNS_UPSTREAM'], ','), repo_root => "/var/www/nailgun/${::fuel_version['VERSION']['openstack_version']}", monitord_user => $::fuel_settings['keystone']['monitord_user'], monitord_password => $::fuel_settings['keystone']['monitord_password'], diff --git a/deployment/puppet/nailgun/manifests/host.pp b/deployment/puppet/nailgun/manifests/host.pp index 667fe7e866..fb2c823131 100644 --- a/deployment/puppet/nailgun/manifests/host.pp +++ b/deployment/puppet/nailgun/manifests/host.pp @@ -3,6 +3,7 @@ $production, $cobbler_host = '127.0.0.1', $dns_search = 'domain.tld', $dns_domain = 'domain.tld', +$dns_upstream = [], $nailgun_group = 'nailgun', $nailgun_user = 'nailgun', $gem_source = 'http://localhost/gems/', diff --git a/deployment/puppet/nailgun/templates/resolv.conf.erb b/deployment/puppet/nailgun/templates/resolv.conf.erb index 4e9541fd8c..d24b1ce1f9 100644 --- a/deployment/puppet/nailgun/templates/resolv.conf.erb +++ b/deployment/puppet/nailgun/templates/resolv.conf.erb @@ -1,3 +1,6 @@ search <%= @dns_search %> domain <%= @dns_domain %> nameserver <%= @cobbler_host %> +<%- @dns_upstream.each do |dns| -%> +nameserver <%= dns %> +<%- end -%>