Set DNS nameserver while configuring tenant network

Follow the install-guide more closely by setting the DNS nameserver
in config_tenant_network.

Use the same DNS nameserver (8.8.4.4) as the install-guide.

Don't set dnsmasq_dns_servers in setup_neutron_network anymore.

Change-Id: I626243f0e3f236f064e84921d3ffdcf0eba3aaeb
This commit is contained in:
Roger Luethi
2015-11-21 08:09:23 +01:00
parent 12293b9cf1
commit 577f9aaea6
3 changed files with 5 additions and 9 deletions

View File

@@ -26,10 +26,10 @@ CIRROS_URL="http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img"
# DEMO_NET
: ${TENANT_NETWORK_GATEWAY:=192.168.1.1}
: ${TENANT_NETWORK_CIDR:=192.168.1.0/24}
# Comma-separated list of DNS name servers used by dnsmasq to serve instance
# VMs in neutron subnets with dns_nameservers unset.
# Default is Google Public DNS (8.8.8.8); to disable, set to "".
: ${TENANT_VM_DNS_SERVER:=8.8.8.8}
# DNS name server used by instance VMs.
# Default is Google Public DNS (8.8.4.4).
: ${TENANT_VM_DNS_SERVER:=8.8.4.4}
: ${REGION:=regionOne}

View File

@@ -28,6 +28,7 @@ echo "Creating a subnet on the tenant network."
neutron subnet-create demo-net \
"$TENANT_NETWORK_CIDR" \
--name demo-subnet \
--dns-nameserver "$TENANT_VM_DNS_SERVER" \
--gateway "$TENANT_NETWORK_GATEWAY"
echo "Creating a router on the tenant network."

View File

@@ -116,11 +116,6 @@ iniset_sudo $conf DEFAULT dhcp_delete_namespaces True
iniset_sudo $conf DEFAULT verbose True
iniset_sudo $conf DEFAULT dnsmasq_config_file /etc/neutron/dnsmasq-neutron.conf
# Configure a DNS server to be used by VM instances
if [ -n "${TENANT_VM_DNS_SERVER:-''}" ]; then
iniset_sudo $conf DEFAULT dnsmasq_dns_servers "$TENANT_VM_DNS_SERVER"
fi
cat << DNSMASQ | sudo tee /etc/neutron/dnsmasq-neutron.conf
# Set interface MTU to 1454 (for instance, ssh authentication may fail
# otherwise due to GRE overhead)