aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib_jump_deploy.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-04-18 17:16:32 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-04-19 11:33:49 +0000
commitee63c02fff4bba6278201d1c74c5bc5ea1d5cc37 (patch)
tree65db844dcc76e1ad2d241405d7d691a70d8c9a98 /mcp/scripts/lib_jump_deploy.sh
parent82718b6c8d6897228356c2f49afb68e78f60abd3 (diff)
mcpcontrol: Avoid duplicate ip rules
Executing deploy.sh multiple times led to duplicating the ip rules. Change-Id: Iad5886a851970f166996226fa3d115a93113c6db Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 08ae551d85109a42a1ea623d922aee42e8dd9c90)
Diffstat (limited to 'mcp/scripts/lib_jump_deploy.sh')
-rw-r--r--mcp/scripts/lib_jump_deploy.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh
index b7fe4c7fc..5d442eb0b 100644
--- a/mcp/scripts/lib_jump_deploy.sh
+++ b/mcp/scripts/lib_jump_deploy.sh
@@ -329,8 +329,9 @@ function create_networks {
ExecStart=/bin/sh -ec '\
${PREFIX}/brctl addif ${all_vnode_networks[0]} veth_mcp0 && \
${PREFIX}/brctl addif ${all_vnode_networks[1]} veth_mcp2 && \
+ while ${PREFIX}/ip rule del to ${SALT_MASTER} iif docker0 table 200 2>/dev/null; do true; done && \
${PREFIX}/ip rule add to ${SALT_MASTER} iif docker0 table 200 && \
- ${PREFIX}/ip route add ${SALT_MASTER} dev ${all_vnode_networks[0]} table 200'
+ ${PREFIX}/ip route replace ${SALT_MASTER} dev ${all_vnode_networks[0]} table 200'
EOF
sudo ln -sf "${FUEL_VETHC_SERVICE}" "/etc/systemd/system/multi-user.target.wants/"
sudo ln -sf "${FUEL_VETHA_SERVICE}" "/etc/systemd/system/multi-user.target.wants/"