From 1a9c279236dc3856df10cab25dacf08b5344e829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Albert?= Date: Fri, 25 Mar 2016 13:36:18 +0100 Subject: [PATCH] Fixed devstack not creating folder for tooz locks Change-Id: I6f0f2703b4d23ab9722ecbb3f2137b793f4bf8f7 --- devstack/plugin.sh | 13 +++++++++++++ devstack/settings | 1 + 2 files changed, 14 insertions(+) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 80a89822..a613351d 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -146,6 +146,18 @@ function create_cloudkitty_cache_dir { rm -f $CLOUDKITTY_AUTH_CACHE_DIR/registry/* } +# create_cloudkitty_data_dir() - Part of the init_cloudkitty() process +function create_cloudkitty_data_dir { + # Create data dir + sudo mkdir -p $CLOUDKITTY_DATA_DIR + sudo chown $STACK_USER $CLOUDKITTY_DATA_DIR + rm -f $CLOUDKITTY_DATA_DIR/* + # Create locks dir + sudo mkdir -p $CLOUDKITTY_DATA_DIR/locks + sudo chown $STACK_USER $CLOUDKITTY_DATA_DIR/locks + rm -f $CLOUDKITTY_DATA_DIR/locks/* +} + # init_cloudkitty() - Initialize CloudKitty database function init_cloudkitty { # Delete existing cache @@ -168,6 +180,7 @@ function init_cloudkitty { $CLOUDKITTY_BIN_DIR/cloudkitty-storage-init create_cloudkitty_cache_dir + create_cloudkitty_data_dir } # install_cloudkitty() - Collect source and prepare diff --git a/devstack/settings b/devstack/settings index 0d90e683..b7fc021a 100644 --- a/devstack/settings +++ b/devstack/settings @@ -11,6 +11,7 @@ CLOUDKITTY_CONF_DIR=/etc/cloudkitty CLOUDKITTY_CONF=$CLOUDKITTY_CONF_DIR/cloudkitty.conf CLOUDKITTY_API_LOG_DIR=/var/log/cloudkitty CLOUDKITTY_AUTH_CACHE_DIR=${CLOUDKITTY_AUTH_CACHE_DIR:-/var/cache/cloudkitty} +CLOUDKITTY_DATA_DIR=${CLOUDKITTY_DATA_DIR:-/var/lib/cloudkitty} CLOUDKITTY_REPORTS_DIR=${DATA_DIR}/cloudkitty/reports # Horizon enabled file