From fa898f5174e3aff9c65366024c170ce3cdda306d Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 25 Apr 2017 01:30:10 -0400 Subject: [PATCH] Add external lock dir to glance api config As we move to enabling glance-api to use a wsgi script that might be run as multiple processes, there are a couple places where external synchronization is necessary. To use this we need to set the lock_path config option from oslo.concurrency so external locks will work. Change-Id: I9a66a8636d12037ff9aa4fb73cc3f9b9343dd7e9 --- lib/glance | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/glance b/lib/glance index 23a1cbf2c7..57f07f5aba 100644 --- a/lib/glance +++ b/lib/glance @@ -43,6 +43,7 @@ fi GLANCE_CACHE_DIR=${GLANCE_CACHE_DIR:=$DATA_DIR/glance/cache} GLANCE_IMAGE_DIR=${GLANCE_IMAGE_DIR:=$DATA_DIR/glance/images} +GLANCE_LOCK_DIR=${GLANCE_LOCK_DIR:=$DATA_DIR/glance/locks} GLANCE_AUTH_CACHE_DIR=${GLANCE_AUTH_CACHE_DIR:-/var/cache/glance} GLANCE_CONF_DIR=${GLANCE_CONF_DIR:-/etc/glance} @@ -116,6 +117,7 @@ function configure_glance { iniset $GLANCE_API_CONF database connection $dburl iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG iniset $GLANCE_API_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/ + iniset $GLANCE_API_CONF DEFAULT lock_path $GLANCE_LOCK_DIR iniset $GLANCE_API_CONF paste_deploy flavor keystone+cachemanagement configure_auth_token_middleware $GLANCE_API_CONF glance $GLANCE_AUTH_CACHE_DIR/api iniset $GLANCE_API_CONF oslo_messaging_notifications driver messagingv2