From 9a694265089fe8c964d9e38e0577c42d88d3efd1 Mon Sep 17 00:00:00 2001
From: Ben Nemec <bnemec@redhat.com>
Date: Fri, 28 Sep 2018 13:53:56 -0500
Subject: [PATCH] Don't configure BIND to listen on localhost

It isn't useful for much of anything in a production deployment
and it conflicts with the local DNS server in CI.

Change-Id: Ied3ecdc71bfdf9bb6439e2c9464aa01346e69226
Closes-Bug: 1795043
---
 ci/environments/scenario003-multinode-containers.yaml | 9 ++++++---
 environments/enable-designate.yaml                    | 8 ++++----
 puppet/services/designate-worker.yaml                 | 2 +-
 sample-env-generator/enable-services.yaml             | 8 ++++----
 4 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/ci/environments/scenario003-multinode-containers.yaml b/ci/environments/scenario003-multinode-containers.yaml
index b70e3a9a3f..bfed22701b 100644
--- a/ci/environments/scenario003-multinode-containers.yaml
+++ b/ci/environments/scenario003-multinode-containers.yaml
@@ -79,6 +79,9 @@ parameter_defaults:
   ControllerExtraConfig:
     nova::compute::libvirt::services::libvirt_virt_type: qemu
     nova::compute::libvirt::libvirt_virt_type: qemu
+  ControllerIPs:
+    ctlplane:
+    - 192.168.24.251
   Debug: true
   DockerPuppetDebug: True
   # we don't deploy Swift so we switch to file backend.
@@ -108,7 +111,7 @@ parameter_defaults:
       # List out the nameservers for this pool. These are the actual BIND servers.
       # We use these to verify changes have propagated to all nameservers.
       nameservers:
-        - host: 127.0.0.1
+        - host: 192.168.24.251
           port: 53
 
       # List out the targets for this pool. For BIND there will be one
@@ -128,8 +131,8 @@ parameter_defaults:
 
           # BIND Configuration options
           options:
-            host: 127.0.0.1
+            host: 192.168.24.251
             port: 53
-            rndc_host: 127.0.0.1
+            rndc_host: 192.168.24.251
             rndc_port: 953
             rndc_key_file: /etc/rndc.key
diff --git a/environments/enable-designate.yaml b/environments/enable-designate.yaml
index c5db29e1a7..f001153c3a 100644
--- a/environments/enable-designate.yaml
+++ b/environments/enable-designate.yaml
@@ -35,7 +35,7 @@ parameter_defaults:
       # List out the nameservers for this pool. These are the actual BIND servers.
       # We use these to verify changes have propagated to all nameservers.
       nameservers:
-        - host: 127.0.0.1
+        - host: 10.0.0.51
           port: 53
 
       # List out the targets for this pool. For BIND there will be one
@@ -50,14 +50,14 @@ parameter_defaults:
           # If you have multiple controllers you can add multiple masters
           # by running designate-mdns on them, and adding them here.
           masters:
-            - host: 127.0.0.1
+            - host: 10.0.0.51
               port: 5354
 
           # BIND Configuration options
           options:
-            host: 127.0.0.1
+            host: 10.0.0.51
             port: 53
-            rndc_host: 127.0.0.1
+            rndc_host: 172.17.0.251
             rndc_port: 953
             rndc_key_file: /etc/rndc.key
 
diff --git a/puppet/services/designate-worker.yaml b/puppet/services/designate-worker.yaml
index 7aa7d554b5..48103bc3e4 100644
--- a/puppet/services/designate-worker.yaml
+++ b/puppet/services/designate-worker.yaml
@@ -85,7 +85,7 @@ outputs:
             listen-on:
               str_replace:
                 template:
-                  "{ 127.0.0.1; %{hiera('$NETWORK')}; }"
+                  "{ %{hiera('$NETWORK')}; }"
                 params:
                   $NETWORK: {get_param: [ServiceNetMap, BINDNetwork]}
           tripleo::profile::base::designate::rndc_host:
diff --git a/sample-env-generator/enable-services.yaml b/sample-env-generator/enable-services.yaml
index 9201aaee8d..6ed92d5413 100644
--- a/sample-env-generator/enable-services.yaml
+++ b/sample-env-generator/enable-services.yaml
@@ -48,7 +48,7 @@ environments:
               # List out the nameservers for this pool. These are the actual BIND servers.
               # We use these to verify changes have propagated to all nameservers.
               nameservers:
-                - host: 127.0.0.1
+                - host: 10.0.0.51
                   port: 53
 
               # List out the targets for this pool. For BIND there will be one
@@ -63,13 +63,13 @@ environments:
                   # If you have multiple controllers you can add multiple masters
                   # by running designate-mdns on them, and adding them here.
                   masters:
-                    - host: 127.0.0.1
+                    - host: 10.0.0.51
                       port: 5354
 
                   # BIND Configuration options
                   options:
-                    host: 127.0.0.1
+                    host: 10.0.0.51
                     port: 53
-                    rndc_host: 127.0.0.1
+                    rndc_host: 172.17.0.251
                     rndc_port: 953
                     rndc_key_file: /etc/rndc.key