From c7f4b4a9dbf4271dd4fbcdc1aaff6fb4f133f7b7 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Thu, 26 Sep 2019 09:49:52 +0200 Subject: [PATCH] Fix certificate directory creation When calling ./stack.sh twice, octavia devstack plugin fails because local certificate directory already exists. This commit deletes the directory each time a certificate creation script is called and when the user cleans up his devstack's installation. Change-Id: I21dfffa9b30274fa0fa9f365a88222b8f4c89e29 --- bin/create_dual_intermediate_CA.sh | 1 + bin/create_single_CA_intermediate_CA.sh | 1 + devstack/plugin.sh | 3 +++ 3 files changed, 5 insertions(+) diff --git a/bin/create_dual_intermediate_CA.sh b/bin/create_dual_intermediate_CA.sh index 254aa357d9..2cb1ae38fc 100755 --- a/bin/create_dual_intermediate_CA.sh +++ b/bin/create_dual_intermediate_CA.sh @@ -27,6 +27,7 @@ set -x -e CA_PATH=dual_ca +rm -rf $CA_PATH mkdir $CA_PATH chmod 700 $CA_PATH cd $CA_PATH diff --git a/bin/create_single_CA_intermediate_CA.sh b/bin/create_single_CA_intermediate_CA.sh index 2c6d19b572..7403c33ca5 100755 --- a/bin/create_single_CA_intermediate_CA.sh +++ b/bin/create_single_CA_intermediate_CA.sh @@ -27,6 +27,7 @@ set -x -e CA_PATH=single_ca +rm -rf $CA_PATH mkdir $CA_PATH chmod 700 $CA_PATH cd $CA_PATH diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 9021bb692f..96707ea66a 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -590,6 +590,9 @@ function octavia_cleanup { _cleanup_octavia_apache_wsgi fi + sudo rm -rf $OCTAVIA_DIR/bin/dual_ca + sudo rm -rf $OCTAVIA_DIR/bin/single_ca + sudo rm -rf $NOVA_STATE_PATH $NOVA_AUTH_CACHE_DIR sudo rm -f /etc/rsyslog.d/10-octavia-log-offloading.conf