Clear out the keystone pki data for each run
This prevents old invalid tokens from working after a rerun of stack.sh
and potentially providing users and tenants that don't exist.
Fixes bug 1089700
Change-Id: Icfc22978e41e459d51b50bc7ad2e6d98d766e402
diff --git a/lib/keystone b/lib/keystone
index 2d21c2c..acef8ce 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -259,11 +259,13 @@
if [[ "$KEYSTONE_TOKEN_FORMAT" == "PKI" ]]; then
# Set up certificates
+ rm -rf $KEYSTONE_CONF_DIR/ssl
$KEYSTONE_DIR/bin/keystone-manage pki_setup
# Create cache dir
sudo mkdir -p $KEYSTONE_AUTH_CACHE_DIR
sudo chown `whoami` $KEYSTONE_AUTH_CACHE_DIR
+ rm -f $KEYSTONE_AUTH_CACHE_DIR/*
fi
}