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',
"--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))
"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']
# 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
- nic3
# Mapping for controller profile (nodes assigned as Controller nodes)
controller:
- phys_type: interface
+ phys_type: ovs_bridge
vlan: native
members:
- nic3