diff options
-rw-r--r-- | apex/network/jumphost.py | 8 | ||||
-rw-r--r-- | apex/overcloud/deploy.py | 7 | ||||
-rw-r--r-- | apex/tests/test_apex_overcloud_deploy.py | 4 | ||||
-rw-r--r-- | apex/undercloud/undercloud.py | 7 | ||||
-rw-r--r-- | build/upstream-environment.yaml | 3 | ||||
-rw-r--r-- | config/network/network_settings_v6.yaml | 4 |
6 files changed, 21 insertions, 12 deletions
diff --git a/apex/network/jumphost.py b/apex/network/jumphost.py index c28c105e..86556659 100644 --- a/apex/network/jumphost.py +++ b/apex/network/jumphost.py @@ -53,12 +53,8 @@ def configure_bridges(ns): if cidr.version == 6: ipv6_br_path = "/proc/sys/net/ipv6/conf/{}/disable_" \ "ipv6".format(NET_MAP[network]) - try: - subprocess.check_call('echo', 0, '>', ipv6_br_path) - except subprocess.CalledProcessError: - logging.error("Unable to enable ipv6 on " - "bridge {}".format(NET_MAP[network])) - raise + with open(ipv6_br_path, 'w') as f: + print(0, file=f) try: ip_prefix = "{}/{}".format(ovs_ip, cidr.prefixlen) subprocess.check_call(['ip', 'addr', 'add', ip_prefix, 'dev', diff --git a/apex/overcloud/deploy.py b/apex/overcloud/deploy.py index 2f75b40d..fcd7f0f6 100644 --- a/apex/overcloud/deploy.py +++ b/apex/overcloud/deploy.py @@ -697,6 +697,10 @@ def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir): "services") logging.info("opnfv-environment file written to {}".format(tmp_opnfv_env)) + with open(tmp_opnfv_env, 'r') as fh: + logging.debug("opnfv-environment content is : {}".format( + pprint.pformat(yaml.safe_load(fh.read())) + )) def generate_ceph_key(): @@ -850,8 +854,7 @@ def external_network_cmds(ns, ds): "--allocation-pool start={},end={} --subnet-range " \ "{}".format(gateway, pool_start, pool_end, str(cidr)) if external and cidr.version == 6: - subnet_cmd += ' --ip-version 6 --ipv6-ra-mode slaac ' \ - '--ipv6-address-mode slaac' + subnet_cmd += ' --ip-version 6' cmds.append(subnet_cmd) logging.debug("Neutron external network commands determined " "as: {}".format(cmds)) diff --git a/apex/tests/test_apex_overcloud_deploy.py b/apex/tests/test_apex_overcloud_deploy.py index c2d17408..71ef80b4 100644 --- a/apex/tests/test_apex_overcloud_deploy.py +++ b/apex/tests/test_apex_overcloud_deploy.py @@ -484,6 +484,7 @@ class TestOvercloudDeploy(unittest.TestCase): @patch('apex.overcloud.deploy.fileinput') @patch('apex.overcloud.deploy.shutil') + @patch('builtins.open', mock_open()) def test_prep_env_round_two(self, mock_shutil, mock_fileinput): mock_fileinput.input.return_value = \ ['NeutronVPPAgentPhysnets'] @@ -529,6 +530,7 @@ class TestOvercloudDeploy(unittest.TestCase): @patch('apex.overcloud.deploy.fileinput') @patch('apex.overcloud.deploy.shutil') + @patch('builtins.open', mock_open()) def test_prep_env_round_three(self, mock_shutil, mock_fileinput): mock_fileinput.input.return_value = \ ['OS::TripleO::Services::NeutronDhcpAgent', @@ -571,6 +573,7 @@ class TestOvercloudDeploy(unittest.TestCase): @patch('apex.overcloud.deploy.fileinput') @patch('apex.overcloud.deploy.shutil') + @patch('builtins.open', mock_open()) def test_prep_env_tenant_vlan(self, mock_shutil, mock_fileinput): mock_fileinput.input.return_value = \ ['NeutronNetworkVLANRanges', @@ -621,6 +624,7 @@ class TestOvercloudDeploy(unittest.TestCase): @patch('apex.overcloud.deploy.fileinput') @patch('apex.overcloud.deploy.shutil') + @patch('builtins.open', mock_open()) def test_prep_env_tenant_vlan_odl(self, mock_shutil, mock_fileinput): mock_fileinput.input.return_value = \ ['NeutronNetworkVLANRanges', diff --git a/apex/undercloud/undercloud.py b/apex/undercloud/undercloud.py index d2de2de1..56087695 100644 --- a/apex/undercloud/undercloud.py +++ b/apex/undercloud/undercloud.py @@ -263,8 +263,11 @@ class Undercloud: "prefix": str(ns_external['cidr']).split('/')[1], "enabled": ns_external['enabled'] } - # TODO(trozet): clean this logic up and merge with above - if 'external' in ns.enabled_network_list: + # We will NAT external network if it is enabled. If external network + # is IPv6, we will NAT admin network in case we need IPv4 connectivity + # for things like DNS server. + if 'external' in ns.enabled_network_list and \ + ns_external['cidr'].version == 4: nat_cidr = ns_external['cidr'] else: nat_cidr = ns['networks']['admin']['cidr'] diff --git a/build/upstream-environment.yaml b/build/upstream-environment.yaml index 2d037c38..ab110177 100644 --- a/build/upstream-environment.yaml +++ b/build/upstream-environment.yaml @@ -11,6 +11,9 @@ parameter_defaults: #NeutronBridgeMappings: "datacentre:br-ex" #OpenDaylightProviderMappings: "datacentre:br-ex" NeutronNetworkType: vxlan + MigrationSshKey: + public_key: replace_public_key + private_key: replace_private_key SshServerOptions: HostKey: - '/etc/ssh/ssh_host_rsa_key' diff --git a/config/network/network_settings_v6.yaml b/config/network/network_settings_v6.yaml index 1dd1097d..71b0b272 100644 --- a/config/network/network_settings_v6.yaml +++ b/config/network/network_settings_v6.yaml @@ -180,7 +180,7 @@ networks: # Mapping for compute profile (nodes assigned as Compute nodes) compute: # Physical interface type (interface or bond) - phys_type: interface + phys_type: ovs_bridge # VLAN tag to use with this NIC vlan: native # Physical NIC members of this mapping @@ -189,7 +189,7 @@ networks: - nic3 # Mapping for controller profile (nodes assigned as Controller nodes) controller: - phys_type: interface + phys_type: ovs_bridge vlan: native members: - nic3 |