[IDF] infra VMs: Allow trunking mgmt network 73/60673/3
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 6 Aug 2018 21:30:29 +0000 (23:30 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 9 Aug 2018 12:28:10 +0000 (12:28 +0000)
Due to design limitations in idf.net_config, for a hybrid POD we need
to trunk certain network segments for the VMs running on the
jumpserver, including mgmt network going to cfg01, mas01.

Add mgmt VLAN support for cfg01, mas01 gated by a flag in IDF:
  idf.fuel.jumphost.trunks.mgmt: True

JIRA: FUEL-338

Change-Id: I6903f9b70e5f8a88618bce28e21c7c0631a05065
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
mcp/reclass/classes/cluster/mcp-common-ha/infra/config.yml.j2
mcp/reclass/classes/cluster/mcp-common-noha/infra/config.yml.j2
mcp/scripts/pharos

index b4afdd9..7ee1aa1 100644 (file)
@@ -163,11 +163,21 @@ parameters:
         primary_interface:
           enabled: true
           name: ${_param:primary_interface}
+          type: eth
+{%- if conf.idf.fuel.jumphost.get('trunks', {}).get('mgmt', False) and (nm.vlan_mgmt | int > 0) %}
+          proto: manual
           mtu: ${_param:interface_mtu}
+        primary_interface_vlan:
+          enabled: true
+          type: vlan
+          name: ${_param:primary_interface}.{{ nm.vlan_mgmt }}
+          use_interfaces:
+            - ${_param:primary_interface}
+{%- endif %}
           proto: static
+          mtu: ${_param:interface_mtu}
           address: ${_param:infra_maas_node01_address}
           netmask: ${_param:opnfv_net_mgmt_mask}
-          type: eth
         pxe_admin_interface:
           enabled: true
           name: ${_param:pxe_admin_interface}
index 6bc5083..0e880c5 100644 (file)
@@ -40,8 +40,17 @@ parameters:
         single:
           enabled: true
           type: eth
-          proto: static
           name: ${_param:single_nic}
+{%- if conf.idf.fuel.jumphost.get('trunks', {}).get('mgmt', False) and (nm.vlan_mgmt | int > 0) %}
+          proto: manual
+        single_vlan:
+          enabled: true
+          type: vlan
+          name: ${_param:single_nic}.{{ nm.vlan_mgmt }}
+          use_interfaces:
+            - ${_param:single_nic}
+{%- endif %}
+          proto: static
           address: ${_param:single_address}
           netmask: ${_param:opnfv_net_mgmt_mask}
         pxe_admin_int:
index ac53e82..dc31a93 100644 (file)
@@ -29,6 +29,15 @@ parameters:
           enabled: true
           name: ${_param:opnfv_fn_vm_secondary_interface}
           type: eth
+{%- if conf.idf.fuel.jumphost.get('trunks', {}).get('mgmt', False) and (nm.vlan_mgmt | int > 0) %}
+          proto: manual
+        single_int_vlan:
+          enabled: true
+          type: vlan
+          name: ${_param:opnfv_fn_vm_secondary_interface}.{{ nm.vlan_mgmt }}
+          use_interfaces:
+            - ${_param:opnfv_fn_vm_secondary_interface}
+{%- endif %}
           proto: static
           address: ${_param:single_address}
           netmask: ${_param:opnfv_net_mgmt_mask}
index 2b78607..1b233cf 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 2b78607e0252eed27f1ed50134c55e01f12a7490
+Subproject commit 1b233cfbf7b42aaf951f175e9cf818d2b8428561