diff --git a/ci/common/net-config-multinode-os-net-config.yaml b/ci/common/net-config-multinode-os-net-config.yaml index 09cee756f3..986a7dc97f 100644 --- a/ci/common/net-config-multinode-os-net-config.yaml +++ b/ci/common/net-config-multinode-os-net-config.yaml @@ -52,6 +52,13 @@ parameters: default: 1300 description: The mtu of the OvS bridge type: number + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list EC2MetadataIp: default: '' description: The IP address of the EC2 metadata server. (The parameter diff --git a/ci/common/net-config-multinode.yaml b/ci/common/net-config-multinode.yaml index 226ea43062..5ade5b1047 100644 --- a/ci/common/net-config-multinode.yaml +++ b/ci/common/net-config-multinode.yaml @@ -48,6 +48,13 @@ parameters: description: The default route of the control plane network. (The parameter is automatically resolved from the ctlplane subnet's gateway_ip attribute.) type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list EC2MetadataIp: default: '' description: The IP address of the EC2 metadata server. (The parameter diff --git a/ci/common/net-config-simple-bridge.yaml b/ci/common/net-config-simple-bridge.yaml index 0d6617eb26..62cb973290 100644 --- a/ci/common/net-config-simple-bridge.yaml +++ b/ci/common/net-config-simple-bridge.yaml @@ -41,6 +41,13 @@ parameters: default: '' description: IP address/subnet on the management network type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list EC2MetadataIp: default: '' description: The IP address of the EC2 metadata server. (The parameter diff --git a/ci/environments/network/multiple-nics-ipv6/network-environment.yaml b/ci/environments/network/multiple-nics-ipv6/network-environment.yaml index bfc2ab0579..b429bf5000 100644 --- a/ci/environments/network/multiple-nics-ipv6/network-environment.yaml +++ b/ci/environments/network/multiple-nics-ipv6/network-environment.yaml @@ -18,4 +18,3 @@ parameter_defaults: StorageMgmtAllocationPools: [{"start": "fd00:fd00:fd00:4000::10", "end": "fd00:fd00:fd00:4000:ffff:ffff:ffff:fffe"}] TenantNetCidr: 172.16.0.0/24 TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}] - DnsServers: ["8.8.8.8", "8.8.4.4"] diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml index 3c72fef5ae..ece799aa33 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml index 853ab6fc96..4e44cf31ec 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml index 2aceec6bdc..6893c4e642 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml index 700f24a36a..4a96dddbad 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml index 853ab6fc96..4e44cf31ec 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics/network-environment.yaml b/ci/environments/network/multiple-nics/network-environment.yaml index 1d544d1b27..4ecaf3a3eb 100644 --- a/ci/environments/network/multiple-nics/network-environment.yaml +++ b/ci/environments/network/multiple-nics/network-environment.yaml @@ -19,4 +19,3 @@ parameter_defaults: StorageMgmtAllocationPools: [{"start": "172.19.0.10", "end": "172.19.0.250"}] TenantNetCidr: 172.16.0.0/24 TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}] - DnsServers: ["8.8.8.8", "8.8.4.4"] diff --git a/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml b/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml index 47c18a109a..8e5755865f 100644 --- a/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml b/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml index 9ed88118a9..ad8e651554 100644 --- a/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics/nic-configs/compute.yaml b/ci/environments/network/multiple-nics/nic-configs/compute.yaml index 7c00aeab3a..9f4f4c7e18 100644 --- a/ci/environments/network/multiple-nics/nic-configs/compute.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/compute.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics/nic-configs/controller.yaml b/ci/environments/network/multiple-nics/nic-configs/controller.yaml index 9294fa6220..36d83f314a 100644 --- a/ci/environments/network/multiple-nics/nic-configs/controller.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/controller.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml b/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml index 9ed88118a9..ad8e651554 100644 --- a/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/public-bond/network-environment.yaml b/ci/environments/network/public-bond/network-environment.yaml index 4924b5b9a0..48b6acf487 100644 --- a/ci/environments/network/public-bond/network-environment.yaml +++ b/ci/environments/network/public-bond/network-environment.yaml @@ -18,5 +18,4 @@ parameter_defaults: StorageMgmtAllocationPools: [{"start": "172.19.0.10", "end": "172.19.0.250"}] TenantNetCidr: 172.16.0.0/24 TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}] - DnsServers: ["8.8.8.8", "8.8.4.4"] BondInterfaceOvsOptions: bond_mode=balance-slb diff --git a/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml b/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml index bf6eb79ef4..fddc89298e 100644 --- a/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml +++ b/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml b/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml index e7326565c4..d276e67eb7 100644 --- a/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml +++ b/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/public-bond/nic-configs/compute.yaml b/ci/environments/network/public-bond/nic-configs/compute.yaml index 61b1ded96a..a6a54fe435 100644 --- a/ci/environments/network/public-bond/nic-configs/compute.yaml +++ b/ci/environments/network/public-bond/nic-configs/compute.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/public-bond/nic-configs/controller.yaml b/ci/environments/network/public-bond/nic-configs/controller.yaml index 79dbc4e2a8..9faf6aa8f5 100644 --- a/ci/environments/network/public-bond/nic-configs/controller.yaml +++ b/ci/environments/network/public-bond/nic-configs/controller.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/ci/environments/network/public-bond/nic-configs/swift-storage.yaml b/ci/environments/network/public-bond/nic-configs/swift-storage.yaml index e7326565c4..d276e67eb7 100644 --- a/ci/environments/network/public-bond/nic-configs/swift-storage.yaml +++ b/ci/environments/network/public-bond/nic-configs/swift-storage.yaml @@ -75,7 +75,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/environments/composable-roles/monolithic-ha.yaml b/environments/composable-roles/monolithic-ha.yaml index a1dcd7bfcd..bb8a532a62 100644 --- a/environments/composable-roles/monolithic-ha.yaml +++ b/environments/composable-roles/monolithic-ha.yaml @@ -37,9 +37,9 @@ parameter_defaults: # Type: string ControllerHostnameFormat: '%stackname%-controller-%index%' - # DNS servers to use for the Overcloud + # DNS servers to use for the Overcloud (2 max for some implementations). If not set the nameservers configured in the ctlplane subnet(s) on the undercloud will be used. # Type: comma_delimited_list - DnsServers: ['8.8.8.8', '8,8.4.4'] + DnsServers: [] # NTP servers list. Defaulted to pool.ntp.org in order to have a sane default for Pacemaker deployments when not configuring this parameter by default. # Type: comma_delimited_list diff --git a/environments/composable-roles/monolithic-nonha.yaml b/environments/composable-roles/monolithic-nonha.yaml index f49ddf2aaa..17700820d9 100644 --- a/environments/composable-roles/monolithic-nonha.yaml +++ b/environments/composable-roles/monolithic-nonha.yaml @@ -37,9 +37,9 @@ parameter_defaults: # Type: string ControllerHostnameFormat: '%stackname%-controller-%index%' - # DNS servers to use for the Overcloud + # DNS servers to use for the Overcloud (2 max for some implementations). If not set the nameservers configured in the ctlplane subnet(s) on the undercloud will be used. # Type: comma_delimited_list - DnsServers: ['8.8.8.8', '8,8.4.4'] + DnsServers: [] # NTP servers list. Defaulted to pool.ntp.org in order to have a sane default for Pacemaker deployments when not configuring this parameter by default. # Type: comma_delimited_list diff --git a/environments/composable-roles/standalone.yaml b/environments/composable-roles/standalone.yaml index c12d72dead..1fdb711f73 100644 --- a/environments/composable-roles/standalone.yaml +++ b/environments/composable-roles/standalone.yaml @@ -42,9 +42,9 @@ parameter_defaults: # Type: number DatabaseCount: 3 - # DNS servers to use for the Overcloud + # DNS servers to use for the Overcloud (2 max for some implementations). If not set the nameservers configured in the ctlplane subnet(s) on the undercloud will be used. # Type: comma_delimited_list - DnsServers: ['8.8.8.8', '8,8.4.4'] + DnsServers: [] # Number of Messaging nodes # Type: number diff --git a/environments/network-environment-v6.j2.yaml b/environments/network-environment-v6.j2.yaml index a2f38518c8..8937b562f2 100644 --- a/environments/network-environment-v6.j2.yaml +++ b/environments/network-environment-v6.j2.yaml @@ -55,7 +55,9 @@ parameter_defaults: {% endfor %} {#- FIXME: These global parameters should be defined in a YAML file, e.g. network_data.yaml. #} # Define the DNS servers (maximum 2) for the overcloud nodes - DnsServers: ["8.8.8.8","8.8.4.4"] + # When the list is not set (empty) the nameservers on the ctlplane subnet(s) will be used. + # (ctlplane subnet(s) nameservers are confgured by the ``undercloud_nameservers`` option in ``undercloud.conf``) + DnsServers: [] # List of Neutron network types for tenant networks (will be used in order) NeutronNetworkType: 'vxlan,vlan' # The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling. diff --git a/environments/network-environment.j2.yaml b/environments/network-environment.j2.yaml index 25b64745e2..7cceeefa3c 100644 --- a/environments/network-environment.j2.yaml +++ b/environments/network-environment.j2.yaml @@ -53,7 +53,9 @@ parameter_defaults: {% endfor %} {#- FIXME: These global parameters should be defined in a YAML file, e.g. network_data.yaml. #} # Define the DNS servers (maximum 2) for the overcloud nodes - DnsServers: ["8.8.8.8","8.8.4.4"] + # When the list is no set or empty, the nameservers on the ctlplane subnets will be used. + # (ctlplane subnets nameservers are controlled by the ``undercloud_nameservers`` option in ``undercloud.conf``) + DnsServers: [] # List of Neutron network types for tenant networks (will be used in order) NeutronNetworkType: 'vxlan,vlan' # The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling. diff --git a/extraconfig/post_deploy/undercloud_post.yaml b/extraconfig/post_deploy/undercloud_post.yaml index 2c55b6b562..fc7337fbb8 100644 --- a/extraconfig/post_deploy/undercloud_post.yaml +++ b/extraconfig/post_deploy/undercloud_post.yaml @@ -42,9 +42,12 @@ parameters: description: > Whether the TripleO validations are enabled. type: boolean - DnsServers: # Override this via parameter_defaults + DnsServers: default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list CtlplaneLocalPhysicalNetwork: default: ctlplane diff --git a/net-config-bond.j2.yaml b/net-config-bond.j2.yaml index 4e67c8095e..642058fdde 100644 --- a/net-config-bond.j2.yaml +++ b/net-config-bond.j2.yaml @@ -27,6 +27,13 @@ parameters: description: The default route of the control plane network. (The parameter is automatically resolved from the ctlplane subnet's gateway_ip attribute.) type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list EC2MetadataIp: # Here for compatability, not used. default: '' description: The IP address of the EC2 metadata server. (The parameter diff --git a/net-config-bridge.j2.yaml b/net-config-bridge.j2.yaml index 0f9b83cbfd..99b5fa9c39 100644 --- a/net-config-bridge.j2.yaml +++ b/net-config-bridge.j2.yaml @@ -17,6 +17,13 @@ parameters: description: The default route of the control plane network. (The parameter is automatically resolved from the ctlplane subnet's gateway_ip attribute.) type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list EC2MetadataIp: # Here for compatability, not used. default: '' description: The IP address of the EC2 metadata server. (The parameter diff --git a/net-config-linux-bridge.j2.yaml b/net-config-linux-bridge.j2.yaml index 5c5c5491fd..7cb435555a 100644 --- a/net-config-linux-bridge.j2.yaml +++ b/net-config-linux-bridge.j2.yaml @@ -23,6 +23,13 @@ parameters: The subnet CIDR of the control plane network. (The parameter is automatically resolved from the ctlplane subnet's cidr attribute.) type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list EC2MetadataIp: default: '' description: The IP address of the EC2 metadata server. (The parameter diff --git a/net-config-noop.j2.yaml b/net-config-noop.j2.yaml index 14cd711607..a14f90969c 100644 --- a/net-config-noop.j2.yaml +++ b/net-config-noop.j2.yaml @@ -20,6 +20,13 @@ parameters: description: The default route of the control plane network. (The parameter is automatically resolved from the ctlplane subnet's gateway_ip attribute.) type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list EC2MetadataIp: # Here for compatability, not used. default: '' description: The IP address of the EC2 metadata server. (The parameter diff --git a/net-config-standalone.j2.yaml b/net-config-standalone.j2.yaml index 8ae2bb8dc8..12b6d51ff6 100644 --- a/net-config-standalone.j2.yaml +++ b/net-config-standalone.j2.yaml @@ -30,7 +30,10 @@ parameters: type: json DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list InterfaceLocalMtu: # Override this via parameter_defaults default: 1500 diff --git a/net-config-static-bridge-with-external-dhcp.j2.yaml b/net-config-static-bridge-with-external-dhcp.j2.yaml index 4a2c08ddcd..6e262ba494 100644 --- a/net-config-static-bridge-with-external-dhcp.j2.yaml +++ b/net-config-static-bridge-with-external-dhcp.j2.yaml @@ -26,7 +26,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/net-config-static-bridge.j2.yaml b/net-config-static-bridge.j2.yaml index ab32b55f8c..3d94ca3e8e 100644 --- a/net-config-static-bridge.j2.yaml +++ b/net-config-static-bridge.j2.yaml @@ -26,7 +26,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/net-config-static.j2.yaml b/net-config-static.j2.yaml index 34509d1325..734abe9c4b 100644 --- a/net-config-static.j2.yaml +++ b/net-config-static.j2.yaml @@ -25,7 +25,10 @@ parameters: type: string DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/net-config-undercloud.j2.yaml b/net-config-undercloud.j2.yaml index 1dfc2e884c..8b1ca649d0 100644 --- a/net-config-undercloud.j2.yaml +++ b/net-config-undercloud.j2.yaml @@ -30,7 +30,10 @@ parameters: type: json DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list UndercloudLocalMtu: # Override this via parameter_defaults default: 1500 diff --git a/network/config/bond-with-vlans/controller-no-external.j2.yaml b/network/config/bond-with-vlans/controller-no-external.j2.yaml index e6efbfbd07..77fc313099 100644 --- a/network/config/bond-with-vlans/controller-no-external.j2.yaml +++ b/network/config/bond-with-vlans/controller-no-external.j2.yaml @@ -44,7 +44,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/bond-with-vlans/controller-v6.j2.yaml b/network/config/bond-with-vlans/controller-v6.j2.yaml index 73b1c6d050..1945b1090c 100644 --- a/network/config/bond-with-vlans/controller-v6.j2.yaml +++ b/network/config/bond-with-vlans/controller-v6.j2.yaml @@ -42,7 +42,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/bond-with-vlans/role.role.j2.yaml b/network/config/bond-with-vlans/role.role.j2.yaml index d9d4a5f8d0..7376a38353 100644 --- a/network/config/bond-with-vlans/role.role.j2.yaml +++ b/network/config/bond-with-vlans/role.role.j2.yaml @@ -40,7 +40,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/multiple-nics/compute-dvr.j2.yaml b/network/config/multiple-nics/compute-dvr.j2.yaml index 68d403b5eb..b6cc72b033 100644 --- a/network/config/multiple-nics/compute-dvr.j2.yaml +++ b/network/config/multiple-nics/compute-dvr.j2.yaml @@ -42,7 +42,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/multiple-nics/controller-v6.j2.yaml b/network/config/multiple-nics/controller-v6.j2.yaml index 9622be7107..5a597a652c 100644 --- a/network/config/multiple-nics/controller-v6.j2.yaml +++ b/network/config/multiple-nics/controller-v6.j2.yaml @@ -41,7 +41,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/multiple-nics/role.role.j2.yaml b/network/config/multiple-nics/role.role.j2.yaml index 5e1bab8947..acd9bc60c4 100644 --- a/network/config/multiple-nics/role.role.j2.yaml +++ b/network/config/multiple-nics/role.role.j2.yaml @@ -40,7 +40,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml b/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml index f8dae080dc..c97a1adbac 100644 --- a/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml +++ b/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml @@ -41,7 +41,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml index 326ce5ba21..0203d58d9f 100644 --- a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml +++ b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml @@ -40,7 +40,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/single-nic-vlans/controller-no-external.j2.yaml b/network/config/single-nic-vlans/controller-no-external.j2.yaml index ade5e01073..a53be40de7 100644 --- a/network/config/single-nic-vlans/controller-no-external.j2.yaml +++ b/network/config/single-nic-vlans/controller-no-external.j2.yaml @@ -44,7 +44,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/single-nic-vlans/controller-v6.j2.yaml b/network/config/single-nic-vlans/controller-v6.j2.yaml index c7eee6f73d..16a0bf81be 100644 --- a/network/config/single-nic-vlans/controller-v6.j2.yaml +++ b/network/config/single-nic-vlans/controller-v6.j2.yaml @@ -41,7 +41,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/network/config/single-nic-vlans/role.role.j2.yaml b/network/config/single-nic-vlans/role.role.j2.yaml index d5b30794b2..2e03467e3d 100644 --- a/network/config/single-nic-vlans/role.role.j2.yaml +++ b/network/config/single-nic-vlans/role.role.j2.yaml @@ -40,7 +40,10 @@ parameters: {%- endfor %} DnsServers: # Override this via parameter_defaults default: [] - description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. type: comma_delimited_list EC2MetadataIp: default: '' diff --git a/puppet/role.role.j2.yaml b/puppet/role.role.j2.yaml index 6f770ba8be..dde1034fe8 100644 --- a/puppet/role.role.j2.yaml +++ b/puppet/role.role.j2.yaml @@ -260,6 +260,13 @@ parameters: description: The IP address of the EC2 metadata server. (The parameter is automatically resolved from the ctlplane subnet's host_routes attribute.) type: string + DnsServers: # Override this via parameter_defaults + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet's + dns_nameservers attribute will be used. + type: comma_delimited_list ServerDeletionPolicy: description: Whether to retain or delete servers on deletion of the stack @@ -340,6 +347,9 @@ conditions: ec2metadaip_set: not: equals: [{get_param: EC2MetadataIp}, ''] + dnsservers_set: + not: + equals: [{get_param: DnsServers}, []] resources: {{server_resource_name}}: @@ -479,6 +489,11 @@ resources: # Return an empty string if there are no host_routes in the subnet. (Standalone and Container Undercloud) expression: switch($.data = null => '', $.data != null => $.data.where($.destination = "169.254.169.254/32").nexthop.first()) data: {get_attr: [{{server_resource_name}}, addresses, ctlplane, 0, subnets, 0, host_routes]} + DnsServers: + if: + - dnsservers_set + - {get_param: DnsServers} + - {get_attr: [{{server_resource_name}}, addresses, ctlplane, 0, subnets, 0, dns_nameservers]} {%- for network in networks %} {{network.name}}IpSubnet: {get_attr: [{{network.name}}Port, ip_subnet]} diff --git a/releasenotes/notes/use-subnet-attrs-dnsservers-f751ec1125a9f787.yaml b/releasenotes/notes/use-subnet-attrs-dnsservers-f751ec1125a9f787.yaml new file mode 100644 index 0000000000..7143161071 --- /dev/null +++ b/releasenotes/notes/use-subnet-attrs-dnsservers-f751ec1125a9f787.yaml @@ -0,0 +1,24 @@ +--- +features: + - | + It is no longer a requirement to provide the parameter: ``DnsServers`` + in the environment when deploying. Now ``get_attr`` on the server resource + is used to resolve the value from the ``ctlplane`` subnet's + ``dns_nameservers`` attribute. A conditional is used to determine if the + user provided the parameter in the environment. If the user provided the + parameter, the user provided value is used. +upgrade: + - | + Since the the ``DnsServers`` can now be resolved from the ``ctlplane`` + subnet(s) this parameter can be removed from the environment + (``network-environment.yaml``). + + .. Note:: Prior to removing the parameter ensure that the property of + the ``ctlplane`` subnet(s) is correct. In case it is not, update + ``undercloud.conf`` with the correct configuration and re-run the + ``openstack undercloud install`` command to ensure the property + is set correctly. + + .. Note:: ``DnsServers`` is now passed to the network config template when + the resource is created. Because of this the parameter must be + defined in the network config template, even if it is not used. diff --git a/sample-env-generator/composable-roles.yaml b/sample-env-generator/composable-roles.yaml index 2c929a4b31..3ae6ba7e42 100644 --- a/sample-env-generator/composable-roles.yaml +++ b/sample-env-generator/composable-roles.yaml @@ -131,8 +131,11 @@ environments: # in the generated config files. parameters: DnsServers: - default: ['8.8.8.8', '8,8.4.4'] - description: DNS servers to use for the Overcloud + default: [] + description: > + DNS servers to use for the Overcloud (2 max for some implementations). + If not set the nameservers configured in the ctlplane subnet(s) on the + undercloud will be used. type: comma_delimited_list # Dynamic vars based on roles ControllerOpenstackCount: