From b5c6395cf1080fe5049e2aa26cead8b7cb057173 Mon Sep 17 00:00:00 2001 From: Daniel Mellado Date: Mon, 24 Apr 2017 12:44:06 +0000 Subject: [PATCH] Delete docker socket file only if exists Using devstack to install kuryr-k8s gets to a point when it breaks as it's trying to delete the docker socket file, which doesn't exist there yet. This commit fixes it by having it only delete if it exists. Closes-Bug: 1685799 Change-Id: Id16ea172337df0b999684b53f986a7bea29f8aa8 --- devstack/plugin.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index c5b470ad2..3082ea0e7 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -276,7 +276,9 @@ function stop_docker { echo -n "." sleep 1 done - sudo rm "$KURYR_DOCKER_ENGINE_SOCKET_FILE" + if [ -e "$KURYR_DOCKER_ENGINE_SOCKET_FILE" ]; then + sudo rm "$KURYR_DOCKER_ENGINE_SOCKET_FILE" + fi } function get_hyperkube_container_cacert_setup_dir {