[baremetal] PDF: Use net_admin for MaaS PXE net 73/48573/4
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 7 Dec 2017 22:24:37 +0000 (23:24 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 8 Dec 2017 01:19:35 +0000 (02:19 +0100)
While at it, fix another small issue where a variable
(parameters__param_opnfv_maas_pxe_address) was used without being
populated (defined in 'runtime.yml', which is not read using
`parse_yaml`, like the scenario yml or the PDF expanded class,
pod_config.yml).

JIRA: FUEL-313

Change-Id: Iee88601d5420f55572bf90c8cf330afbedfb2e21
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/deploy.sh
mcp/reclass/classes/cluster/all-mcp-arch-common/opnfv/runtime.yml.template
mcp/scripts/globals.sh

index 1b4dd95..fc44832 100755 (executable)
@@ -349,6 +349,10 @@ eval "$(parse_yaml "${LOCAL_PDF_RECLASS}")"
 
 export CLUSTER_DOMAIN=${cluster_domain}
 
+# Use MaaS PXE network defined via PDF admin network if available
+MAAS_PXE_NETWORK=${parameters__param_opnfv_infra_maas_node01_deploy_address:-${MAAS_PXE_NETWORK}}
+export MAAS_PXE_NETWORK=${MAAS_PXE_NETWORK%.*}.0
+
 # Serialize vnode data as '<name0>,<ram0>,<vcpu0>|<name1>,<ram1>,<vcpu1>[...]'
 for node in "${virtual_nodes[@]}"; do
     virtual_custom_ram="virtual_${node}_ram"
@@ -399,7 +403,7 @@ fi
 # Map PDF networks 'admin', 'mgmt', 'private' and 'public' to bridge names
 BR_NAMES=('admin' 'mgmt' 'private' 'public')
 BR_NETS=( \
-    "${parameters__param_opnfv_maas_pxe_address}" \
+    "${MAAS_PXE_NETWORK}" \
     "${parameters__param_opnfv_infra_config_address}" \
     "${parameters__param_opnfv_openstack_compute_node01_tenant_address}" \
     "${parameters__param_opnfv_openstack_compute_node01_external_address}" \
index 1445917..342dc77 100644 (file)
@@ -13,7 +13,7 @@ parameters:
     opnfv_net_mcpcontrol: ${SALT_MASTER%.*}.0
     opnfv_net_mcpcontrol_mask: 255.255.255.0
 
-    # These should be moved to pod_config.yml and read based on PDF admin net
+    # These should be moved to pod_config.yml and MAAS_PXE_NETWORK dropped
     opnfv_maas_pxe_network_address: ${MAAS_PXE_NETWORK}
     opnfv_maas_pxe_address: ${MAAS_PXE_NETWORK%.*}.3
     opnfv_maas_pxe_start_address: ${MAAS_PXE_NETWORK%.*}.5
index ce4f9ff..9ef9eba 100644 (file)
@@ -14,7 +14,7 @@ export SALT_MASTER=${INSTALLER_IP:-10.20.0.2}
 export SALT_MASTER_USER=${SALT_MASTER_USER:-ubuntu}
 export MAAS_IP=${MAAS_IP:-${SALT_MASTER%.*}.3}
 
-# These should be determined from PDF later
+# Define a default network address, baremetal might override it via PDF
 export MAAS_PXE_NETWORK=${MAAS_PXE_NETWORK:-192.168.11.0}
 
 # Derivated from above global vars