From d385c0ca5a6650ed05744be545d52788a6b40b6d Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 17 Sep 2018 15:48:52 +0200 Subject: [lib.sh] Stop Fuel@OPNFV containers if present JIRA: FUEL-388 Change-Id: I6a7286bb9fc0243ab4a89292e34059fc85a831c4 Signed-off-by: Alexandru Avadanii --- mcp/scripts/lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index ce5db251f..e7720d6fa 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -245,6 +245,10 @@ function cleanup_vms { xargs --no-run-if-empty -I{} sudo rm -f {} virsh undefine "${node}" --remove-all-storage --nvram done + # Newer Fuel@OPNFV releases run containers that conflict with the infra VMs + if which docker > /dev/null 2>&1; then + docker ps -a -q --filter="name=fuel" | xargs --no-run-if-empty docker stop + fi } function prepare_vms { -- cgit 1.2.3-korg