diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2019-04-27 13:53:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2019-08-11 08:48:22 +0000 |
commit | 0206529e4be9ff8df0511133e13f71c943de2172 (patch) | |
tree | 8ca64b11912ccec79d2aede89ab46c741791b3bf | |
parent | Updating interfaces example configuration in host-setup documentation. (diff) | |
download | compute-tools-0206529e4be9ff8df0511133e13f71c943de2172.tar.xz compute-tools-0206529e4be9ff8df0511133e13f71c943de2172.zip |
Removing stray veth links when starting containers with force.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-x | lib/container/start | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/container/start b/lib/container/start index d5e9059..47c2907 100755 --- a/lib/container/start +++ b/lib/container/start @@ -144,6 +144,13 @@ then case "${FORCE}" in true) rm -f "${MACHINES}/.#${NAME}.lck" + + VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf | awk -F: '{ print $1 }')" + + for VETH in ${VETHS} + do + ip link delete ${VETH} > /dev/null 2>&1 || true + done ;; *) |