Set DNS on ctlplane network
This is useful if some of the NIC configs are no-op but we still want DNS available on *all* overcloud nodes. Change-Id: I83017b0598ce2321c99fe1bcc142c9127a932a48
This commit is contained in:
parent
a2668a3277
commit
793a5dcdf4
|
@ -89,27 +89,17 @@ sudo ifup ifcfg-{{ network.device_name }}
|
|||
|
||||
{% endfor %}
|
||||
|
||||
{% elif not network_isolation|bool %}
|
||||
{% endif %}
|
||||
|
||||
## * Set the DNS server in the control plane network
|
||||
## ::
|
||||
|
||||
# Set DNS server for the overcloud nodes
|
||||
neutron subnet-update $(neutron net-list | awk '/ctlplane/{print $(NF-2) }') --dns-nameserver $(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ --dns-nameserver /g')
|
||||
|
||||
{%endif%}
|
||||
|
||||
{% if enable_tls_everywhere|bool and overcloud_dns_servers and release not in ['mitaka', 'newton'] %}
|
||||
|
||||
## * Set the DNS server for the overcloud's ctlplane subnet. This will be used briefly before
|
||||
## os-net-config runs in the overcloud nodes, but for TLS-everywhere, we need it for discovery to
|
||||
## work in the FreeIPA enrollment.
|
||||
## ::
|
||||
|
||||
{% if overcloud_dns_servers|default([]) and release not in ['mitaka', 'newton'] %}
|
||||
CTLPLANE_SUBNET=$(openstack subnet show ctlplane-subnet -f value -c id)
|
||||
neutron subnet-update $CTLPLANE_SUBNET \
|
||||
{% for nameserver in overcloud_dns_servers %} --dns-nameserver "{{ nameserver }}" {% endfor %}
|
||||
|
||||
{% else %}
|
||||
neutron subnet-update $(neutron net-list | awk '/ctlplane/{print $(NF-2) }') --dns-nameserver $(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ --dns-nameserver /g')
|
||||
{% endif %}
|
||||
|
||||
### --stop_docs
|
||||
|
|
Loading…
Reference in New Issue