From: Alexandru Avadanii Date: Thu, 20 Sep 2018 13:57:08 +0000 (+0200) Subject: [infra] Bind mas01 mcpcontrol DHCP to MAAS_IP X-Git-Tag: opnfv-8.0.0~143^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F62649%2F1;p=fuel.git [infra] Bind mas01 mcpcontrol DHCP to MAAS_IP Bring back MAAS_IP global env var and use it for mas01 VM IP addr in mcpcontrol network to prevent salt minion signature change. Partially-reverts: b666bc50 Change-Id: I5c7668393fe66287bd3ecdc75dd3195d5a89a8f3 Signed-off-by: Alexandru Avadanii --- diff --git a/ci/deploy.sh b/ci/deploy.sh index 103f83b9e..41ac60237 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -308,6 +308,7 @@ else do_sysctl_cfg do_udev_cfg create_vms "${MCP_STORAGE_DIR}" "${virtual_nodes_data}" "${OPNFV_BRIDGES[@]}" + update_mcpcontrol_network start_vms "${virtual_nodes[@]}" # https://github.com/docker/libnetwork/issues/1743 diff --git a/mcp/reclass/classes/cluster/.gitignore b/mcp/reclass/classes/cluster/.gitignore index 9266b7cbc..0179ad987 100644 --- a/mcp/reclass/classes/cluster/.gitignore +++ b/mcp/reclass/classes/cluster/.gitignore @@ -6,7 +6,7 @@ mcp-common-ha/infra/init.yml all-mcp-arch-common/infra/maas.yml mcp-common-ha/infra/kvm_novcp.yml all-mcp-arch-common/opnfv/maas_proxy.yml -mcp-common-ha/openstack_control.yml +mcp-common-*/openstack_control.yml mcp-common-ha/openstack_telemetry.yml mcp*common-*/openstack_init.yml mcp-common-ha/openstack_interface_vcp_biport.yml @@ -15,7 +15,7 @@ mcp-common-ha/openstack_proxy.yml mcp-*-ha/infra/kvm.yml mcp-*-ha/infra/init_vcp.yml mcp-odl-ha/infra/maas.yml -mcp-odl-ha/opendaylight/control.yml +mcp-odl-*/opendaylight/control.yml mcp-odl-ha/openstack/init.yml mcp-odl-noha/infra/config.yml mcp-*-noha/openstack/compute.yml diff --git a/mcp/scripts/globals.sh b/mcp/scripts/globals.sh index d95448d45..629bac8ca 100644 --- a/mcp/scripts/globals.sh +++ b/mcp/scripts/globals.sh @@ -16,6 +16,7 @@ export SALT_MASTER_USER=${SALT_MASTER_USER:-ubuntu} # Derived from INSTALLER_IP export MCPCONTROL_NET=${MCPCONTROL_NET:-${SALT_MASTER%.*}.0} export MCPCONTROL_PREFIX=${MCPCONTROL_PREFIX:-24} +export MAAS_IP=${MAAS_IP:-${SALT_MASTER%.*}.3} # Derived from above global vars, not overideable export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${SSH_KEY}" diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index df35f3706..293262e89 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -463,6 +463,13 @@ function create_vms { done } +function update_mcpcontrol_network { + # set static ip address for salt master node, MaaS node + local amac=$(virsh domiflist mas01 2>&1| awk '/mcpcontrol/ {print $5; exit}') + [ -z "${amac}" ] || virsh net-update "mcpcontrol" add ip-dhcp-host \ + "" --live --config +} + function reset_vms { local vnodes=("$@") local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}"