Add support for shared os_brick file lock path
There can be problems with some os-brick connectors if nova and cinder run on the same host with different lock path locations, which we currently do, or if Cinder and Glance with cinder store run on the same host, and a recent os-brick change (Ic52338278eb5bb3d90ce582fe6b23f37eb5568c4) allows for an os-brick specific lock_path to facilitate these kind of deployment. This patch adds the ``lock_path`` configuration option in the ``[os_brick]`` section of the nova, cinder, and glance config files. If the os-brick, cinder, nova, or glance-store changes are not present then the new config option is be ignored in the respective service, and it will be used otherwise, so there's no need to make this patch dependent on any other since we won't be worse off than we are now. Change-Id: Ibe7da160460151734224863cddec5e0d549b4938
This commit is contained in:
Gorka Eguileor
committed by
Brian Rosmaita
parent
608ae718fc
commit
c4340a64ee
2 changed files with 21 additions and 0 deletions
16
lib/cinder
16
lib/cinder
@@ -59,6 +59,7 @@ else
fi
CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder}
OS_BRICK_LOCK_PATH=${OS_BRICK_LOCK_PATH:=$DATA_DIR/os_brick}
CINDER_CONF_DIR=/etc/cinder
CINDER_CONF=$CINDER_CONF_DIR/cinder.conf
@@ -511,6 +512,21 @@ function init_cinder {
mkdir -p $CINDER_STATE_PATH/volumes
}
function init_os_brick {
mkdir -p $OS_BRICK_LOCK_PATH
if is_service_enabled cinder; then
iniset $CINDER_CONF os_brick lock_path $OS_BRICK_LOCK_PATH
fi
if is_service_enabled nova; then
iniset $NOVA_CONF os_brick lock_path $OS_BRICK_LOCK_PATH
fi
if is_service_enabled glance; then
iniset $GLANCE_API_CONF os_brick lock_path $OS_BRICK_LOCK_PATH
iniset $GLANCE_CACHE_CONF os_brick lock_path $OS_BRICK_LOCK_PATH
fi
}
# install_cinder() - Collect source and prepare
function install_cinder {
git_clone $CINDER_REPO $CINDER_DIR $CINDER_BRANCH
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.