From: Emilien Macchi Date: Fri, 3 Feb 2017 14:17:59 +0000 (-0500) Subject: net-config-multinode: make controlplane int idempotent X-Git-Tag: opnfv-6.0.0~1127^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=f48c66509984a29169a1437593b4e288f1eb506c;p=apex-tripleo-heat-templates.git net-config-multinode: make controlplane int idempotent When doing a stack-update, it will try to create the control plane interface again. Add this conditional so the interface is not created if already exist. Note: this code has been taken from tripleo-ci and is consistent with how multinode jobs are currently tested. Co-Authored-By: James Slagle Co-Authored-By: Steven Hardy Co-Authored-By: Mathieu Bultel Change-Id: I773fdf5359cead6961b595e3c8192b02406452b7 Related-Bug: #1661412 --- diff --git a/ci/common/net-config-multinode.yaml b/ci/common/net-config-multinode.yaml index bf947d3e..dc31235a 100644 --- a/ci/common/net-config-multinode.yaml +++ b/ci/common/net-config-multinode.yaml @@ -47,7 +47,9 @@ resources: str_replace: template: | #!/bin/bash - ip addr add CONTROLPLANEIP/CONTROLPLANESUBNETCIDR dev $bridge_name + if ! ip addr show dev $bridge_name | grep CONTROLPLANEIP/CONTROLPLANESUBNETCIDR; then + ip addr add CONTROLPLANEIP/CONTROLPLANESUBNETCIDR dev $bridge_name + fi params: CONTROLPLANEIP: {get_param: ControlPlaneIp} CONTROLPLANESUBNETCIDR: {get_param: ControlPlaneSubnetCidr}