From 23431f352618372b6204c3a591653784d77effa1 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 12 Dec 2012 15:57:33 -0800 Subject: [PATCH] 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 --- lib/cinder | 1 + lib/glance | 2 ++ lib/keystone | 2 ++ lib/nova | 1 + lib/quantum | 1 + 5 files changed, 7 insertions(+) diff --git a/lib/cinder b/lib/cinder index 16cbaf361a..0ab3fd4e13 100644 --- a/lib/cinder +++ b/lib/cinder @@ -212,6 +212,7 @@ function init_cinder() { # Create cache dir sudo mkdir -p $CINDER_AUTH_CACHE_DIR sudo chown `whoami` $CINDER_AUTH_CACHE_DIR + rm -f $CINDER_AUTH_CACHE_DIR/* } # install_cinder() - Collect source and prepare diff --git a/lib/glance b/lib/glance index 4f631b2c8b..8ba04b3a85 100644 --- a/lib/glance +++ b/lib/glance @@ -162,8 +162,10 @@ function init_glance() { # Create cache dir sudo mkdir -p $GLANCE_AUTH_CACHE_DIR/api sudo chown `whoami` $GLANCE_AUTH_CACHE_DIR/api + rm -f $GLANCE_AUTH_CACHE_DIR/api/* sudo mkdir -p $GLANCE_AUTH_CACHE_DIR/registry sudo chown `whoami` $GLANCE_AUTH_CACHE_DIR/registry + rm -f $GLANCE_AUTH_CACHE_DIR/registry/* } # install_glanceclient() - Collect source and prepare diff --git a/lib/keystone b/lib/keystone index 2d21c2c31c..acef8ce3ec 100644 --- a/lib/keystone +++ b/lib/keystone @@ -259,11 +259,13 @@ function init_keystone() { 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 } diff --git a/lib/nova b/lib/nova index 840965eeac..e07e61c2ca 100644 --- a/lib/nova +++ b/lib/nova @@ -435,6 +435,7 @@ function init_nova() { # Create cache dir sudo mkdir -p $NOVA_AUTH_CACHE_DIR sudo chown `whoami` $NOVA_AUTH_CACHE_DIR + rm -f $NOVA_AUTH_CACHE_DIR/* } # install_novaclient() - Collect source and prepare diff --git a/lib/quantum b/lib/quantum index 288a3279a0..480aaa17d8 100644 --- a/lib/quantum +++ b/lib/quantum @@ -127,6 +127,7 @@ function quantum_setup_keystone() { # Create cache dir sudo mkdir -p $QUANTUM_AUTH_CACHE_DIR sudo chown `whoami` $QUANTUM_AUTH_CACHE_DIR + rm -f $QUANTUM_AUTH_CACHE_DIR/* } function quantum_setup_ovs_bridge() {