Merge "Add support for shared os_brick file lock path"

This commit is contained in:
Zuul
2025-10-16 20:35:12 +00:00
committed by Gerrit Code Review
2 changed files with 21 additions and 0 deletions

View File

@@ -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
@@ -514,6 +515,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

View File

@@ -1011,6 +1011,11 @@ if is_service_enabled tls-proxy; then
fix_system_ca_bundle_path
fi
if is_service_enabled cinder || [[ "$USE_CINDER_FOR_GLANCE" == "True" ]]; then
# os-brick setup required by glance, cinder, and nova
init_os_brick
fi
# Extras Install
# --------------