[CORD-1650]
Finish changeover to new network configuration variables
Change-Id: I9d96c49e908245d009976ae101ca4b704e8dbab8
diff --git a/prep-headnode-playbook.yml b/prep-headnode-playbook.yml
index baf9a43..3e8e4fd 100644
--- a/prep-headnode-playbook.yml
+++ b/prep-headnode-playbook.yml
@@ -32,7 +32,7 @@
hosts: head
become: yes
roles:
- - { role: interface-config, when: not use_maas }
+ - interface-config
- name: DNS server on head node
hosts: head
diff --git a/roles/compute-node-config/defaults/main.yml b/roles/compute-node-config/defaults/main.yml
index fcef5a4..31579a5 100644
--- a/roles/compute-node-config/defaults/main.yml
+++ b/roles/compute-node-config/defaults/main.yml
@@ -31,19 +31,15 @@
# VTN adds it to `br-int`, when provided as the `dataPlaneIntf`
# default values:
# - `fabric` is default when using MaaS
-# - `vethfabric1` is default for OpenCloud (setup with interface-config role)
+# - `fabricbond` is default for all other configs (created with interface-config role)
-vtn_integration_bridge_interface: fabric
+vtn_integration_bridge_interface: fabricbond
computenode_fabric_interfaces:
- "{{ vtn_integration_bridge_interface }}"
- br-int
# used in openstack-compute-vtn.yaml.j2, referencing network in management-net.yaml.j2
-# default values:
-# - 'veth3' default with MaaS
-# - 'vethmgmt1' with OpenCloud
-
use_vtn_net_management_host: False
-vtn_net_management_host_interface: veth3
+vtn_net_management_host_interface: vethmgmt1
diff --git a/roles/cord-profile/defaults/main.yml b/roles/cord-profile/defaults/main.yml
index 10139d9..d64e04e 100644
--- a/roles/cord-profile/defaults/main.yml
+++ b/roles/cord-profile/defaults/main.yml
@@ -139,16 +139,7 @@
addresspool_public_cidr: "10.8.1.0/24"
addresspool_public_hwaddr_prefix: "0EFE"
-## LEGACY - remove when profiles have been updated to use new vars (see above)
-# used in management-net.yaml.j2
-management_network_cidr: "{{ vtn_net_management_local_cidr }}"
-
-use_management_hosts: "{{ use_vtn_net_management_host }}"
-management_hosts_net_cidr: "{{ vtn_net_management_host_cidr }}"
-management_hosts_net_range_xos_low: "{{ vtn_net_management_host_range_xos_low }}"
-management_hosts_net_range_xos_high: "{{ vtn_net_management_host_range_xos_high }}"
-
-# used in fabric-service.yaml.j2
+# used in fabric.yaml.j2
use_fabric: False
fabric_network_cfg_json: {}
diff --git a/roles/create-lxd/defaults/main.yml b/roles/create-lxd/defaults/main.yml
index 2a121f0..70f70c2 100644
--- a/roles/create-lxd/defaults/main.yml
+++ b/roles/create-lxd/defaults/main.yml
@@ -22,7 +22,7 @@
# For programatic generation of MAC addresses for LXD containers
management_net_cidr: "10.1.0.0/24"
-management_net_bridge: "mgmtbr"
+management_net_bridge: "mgmtbridge"
vtn_net_management_host_hwaddr_prefix: "06A6"
vtn_net_management_host_cidr: "{{ management_net_cidr }}"
diff --git a/roles/interface-config/defaults/main.yml b/roles/interface-config/defaults/main.yml
index 6e2b541..b3bc9e2 100644
--- a/roles/interface-config/defaults/main.yml
+++ b/roles/interface-config/defaults/main.yml
@@ -31,7 +31,7 @@
# management network configuration
management_net_cidr: "10.1.0.0/24"
-management_net_bridge: "mgmtbr"
+management_net_bridge: "mgmtbridge"
dns_servers:
- "{{ management_net_cidr | ipaddr('1') | ipaddr('address') }}"
diff --git a/roles/interface-config/tasks/main.yml b/roles/interface-config/tasks/main.yml
index f1d1253..c3d17c2 100644
--- a/roles/interface-config/tasks/main.yml
+++ b/roles/interface-config/tasks/main.yml
@@ -38,7 +38,7 @@
when: management_net_config.changed
command: "ifup {{ item }}"
with_flattened:
- - mgmtbridge
+ - "{{ management_net_bridge }}"
- mgmtbond
- "{{ management_net_interfaces }}"
- vethmgmt0
diff --git a/roles/interface-config/templates/management.cfg.j2 b/roles/interface-config/templates/management.cfg.j2
index d366660..bc669f9 100644
--- a/roles/interface-config/templates/management.cfg.j2
+++ b/roles/interface-config/templates/management.cfg.j2
@@ -2,19 +2,19 @@
{% for node in physical_node_list if node.name == ansible_hostname %}
# management bridge between physical and virtual interfaces for VTN
-{% set mgmtbr_ip = ( vtn_net_management_host_cidr | ipaddr(node.ipv4_last_octet) | ipaddr('address')) %}
-auto mgmtbridge
-iface mgmtbridge inet static
- pre-up ip link add mgmtbridge type bridge
+{% set mgmtbridge_ip = ( vtn_net_management_host_cidr | ipaddr(node.ipv4_last_octet) | ipaddr('address')) %}
+auto {{ management_net_bridge }}
+iface {{ management_net_bridge }} inet static
+ pre-up ip link add {{ management_net_bridge }} type bridge
bridge_ports mgmtbond vethmgmt0
- address {{ mgmtbr_ip }}
+ address {{ mgmtbridge_ip }}
network {{ vtn_net_management_host_cidr | ipaddr('network') }}
netmask {{ vtn_net_management_host_cidr | ipaddr('netmask') }}
broadcast {{ vtn_net_management_host_cidr | ipaddr('broadcast') }}
- hwaddress ether {{ ( vtn_net_management_host_hwaddr_prefix ~ ( mgmtbr_ip | ip4_hex )) | hwaddr('linux') }}
+ hwaddress ether {{ ( vtn_net_management_host_hwaddr_prefix ~ ( mgmtbridge_ip | ip4_hex )) | hwaddr('linux') }}
dns-search {{ site_suffix }}
dns-nameservers {{ dns_servers | join(" ") }}
- post-down ip link del mgmtbridge
+ post-down ip link del {{ management_net_bridge }}
# management bond of physical interfaces
auto mgmtbond
@@ -47,7 +47,7 @@
pre-up ip link add vethmgmt0 type veth peer name vethmgmt1
pre-up ip link set vethmgmt0 up
pre-up ip link set vethmgmt1 up
- post-up ip link set dev vethmgmt0 master mgmtbridge
+ post-up ip link set dev vethmgmt0 master {{ management_net_bridge }}
pre-down ip link set dev vethmgmt0 nomaster
post-down ip link del vethmgmt0
diff --git a/roles/test-client-install/defaults/main.yml b/roles/test-client-install/defaults/main.yml
index e68f99c..d60e2b1 100644
--- a/roles/test-client-install/defaults/main.yml
+++ b/roles/test-client-install/defaults/main.yml
@@ -15,5 +15,5 @@
# test-client-install/defaults/main.yml
-headnode_fabric_bridge: fabric
+headnode_fabric_bridge: fabricbridge