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
This commit is contained in:
Alexei Sheplyakov 2015-07-18 10:06:22 +03:00
parent be0bdc68d1
commit 69fc891e27
3 changed files with 5 additions and 0 deletions

View File

@ -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'],

View File

@ -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/',

View File

@ -1,3 +1,6 @@
search <%= @dns_search %>
domain <%= @dns_domain %>
nameserver <%= @cobbler_host %>
<%- @dns_upstream.each do |dns| -%>
nameserver <%= dns %>
<%- end -%>