Browse Source

Partial Revert "Don't pass the DNSServers param in undercloud env"

This partially reverts commit f1450b3ae8.

Reason for revert: undercloud_nameservers is supposed to configured
/etc/resolv.conf. The previous patch broke the link between the
configuration and the os-net-config configuration to ensure that
/etc/resolv.conf was updated at install time.

NOTE: This only affects Train through Victoria as we rewrote the network
configuration in Wallaby.

Closes-Bug: #1929117
Change-Id: Ibec901441952ee3336ca3a6b7b4381c97d326d22
(cherry picked from commit bf586c4c94)
changes/82/794182/1
Alex Schultz 2 months ago
parent
commit
4421aadf62
  1. 14
      tripleoclient/tests/v1/undercloud/test_config.py
  2. 1
      tripleoclient/v1/undercloud_config.py

14
tripleoclient/tests/v1/undercloud/test_config.py

@ -175,6 +175,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [],
'IronicInspectorSubnets': [
{'gateway': '192.168.24.1',
@ -222,6 +223,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
'MysqlIPv6': True,
'IronicIpVersion': '6',
'ControlPlaneStaticRoutes': [],
'DnsServers': '10.10.10.10,10.10.10.11',
'IronicInspectorSubnets': [
{'gateway': 'fd12:3456:789a:1::1',
'host_routes': [],
@ -271,6 +273,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
'MysqlIPv6': True,
'IronicIpVersion': '6',
'ControlPlaneStaticRoutes': [],
'DnsServers': '10.10.10.10,10.10.10.11',
'IronicInspectorSubnets': [
{'gateway': 'fd12:3456:789a:1::1',
'host_routes': [],
@ -343,6 +346,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [],
'IronicInspectorSubnets': [
{'gateway': '192.168.24.1',
@ -373,6 +377,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [],
'IronicInspectorSubnets': [
{'gateway': '192.168.10.1',
@ -405,6 +410,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [],
'IronicInspectorSubnets': [
{'gateway': '192.168.10.1',
@ -436,6 +442,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [],
'IronicInspectorSubnets': [
{'gateway': '192.168.24.1',
@ -465,6 +472,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [],
'IronicInspectorSubnets': [
{'gateway': '192.168.24.1',
@ -495,6 +503,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [],
'IronicInspectorSubnets': [
{'gateway': '192.168.24.1',
@ -548,6 +557,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [
{'ip_netmask': '192.168.10.0/24', 'next_hop': '192.168.24.1'},
{'ip_netmask': '192.168.20.0/24', 'next_hop': '192.168.24.1'}],
@ -634,6 +644,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [
{'ip_netmask': '192.168.10.0/24', 'next_hop': '192.168.24.1'},
{'ip_netmask': '192.168.20.0/24', 'next_hop': '192.168.24.1'}],
@ -700,6 +711,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [
{'ip_netmask': '192.168.10.0/24', 'next_hop': '192.168.24.1'}],
'IronicInspectorSubnets': [
@ -752,6 +764,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [
{'ip_netmask': '192.168.10.0/24', 'next_hop': '192.168.24.1'}],
'IronicInspectorSubnets': [
@ -822,6 +835,7 @@ class TestNetworkSettings(TestBaseNetworkSettings):
env = {}
undercloud_config._process_network_args(env)
expected = {
'DnsServers': '10.10.10.10,10.10.10.11',
'ControlPlaneStaticRoutes': [
{'ip_netmask': '192.168.10.0/24', 'next_hop': '192.168.24.1'},
{'ip_netmask': '192.168.20.0/24', 'next_hop': '192.168.24.1'},

1
tripleoclient/v1/undercloud_config.py

@ -384,6 +384,7 @@ def _process_network_args(env):
'Please provide less than 6 '
'servers in undercloud_'
'nameservers.')
env['DnsServers'] = ','.join(CONF['undercloud_nameservers'])
if netaddr.IPNetwork(CONF['local_ip']).version == 6:
env['NovaIPv6'] = True
env['RabbitIPv6'] = True

Loading…
Cancel
Save