Merge "Changes required for custom resolv conf file in contrail 4.x"
diff --git a/opencontrail/compute.sls b/opencontrail/compute.sls
index 6e4e179..f339d52 100644
--- a/opencontrail/compute.sls
+++ b/opencontrail/compute.sls
@@ -58,8 +58,9 @@
- template: jinja
- require:
- pkg: opencontrail_compute_packages
+{%- endif %}
-{%- if compute.version == 3.0 and compute.get('dns', {}).get('forwarders', False) %}
+{%- if compute.get('dns', {}).get('forwarders', False) %}
contrail_compute_resolv:
file.managed:
- name: /etc/contrail/resolv.conf
@@ -69,7 +70,6 @@
dns: {{ compute.get('dns', {})|yaml }}
- require:
- file: /etc/contrail
-{%- endif %}
{%- endif %}
diff --git a/opencontrail/files/4.0/contrail-vrouter-agent.conf b/opencontrail/files/4.0/contrail-vrouter-agent.conf
index 7bc2fd8..b5bca55 100644
--- a/opencontrail/files/4.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/4.0/contrail-vrouter-agent.conf
@@ -149,6 +149,13 @@
# Maximum retries for DNS server queries
# dns_max_retries=
+# Absolute path for custom nameserver file for default-dns method
+# If none specified, /etc/resolv.conf will be used instead
+# resolv_conf_file =
+{%- if compute.get('dns', {}).get('forwarders', False) %}
+resolv_conf_file=/etc/contrail/resolv.conf
+{%- endif %}
+
[HYPERVISOR]
# Everything in this section is optional