Merge "Infer rootwrap arguments from project"

This commit is contained in:
Jenkins 2015-05-19 20:24:33 +00:00 committed by Gerrit Code Review
commit 0479bc101c
4 changed files with 13 additions and 7 deletions

View File

@ -38,11 +38,17 @@ function add_sudo_secure_path {
# Configure rootwrap # Configure rootwrap
# Make a load of assumptions otherwise we'll have 6 arguments # Make a load of assumptions otherwise we'll have 6 arguments
# configure_rootwrap project bin conf-src-dir # configure_rootwrap project
function configure_rootwrap { function configure_rootwrap {
local project=$1 # xx local project=$1
local rootwrap_bin=$2 # /opt/stack/xx.venv/bin/xx-rootwrap local project_uc=$(echo $1|tr a-z A-Z)
local rootwrap_conf_src_dir=$3 # /opt/stack/xx/etc/xx local bin_dir="${project_uc}_BIN_DIR"
bin_dir="${!bin_dir}"
local project_dir="${project_uc}_DIR"
project_dir="${!project_dir}"
local rootwrap_conf_src_dir="${project_dir}/etc/${project}"
local rootwrap_bin="${bin_dir}/${project}-rootwrap"
# Start fresh with rootwrap filters # Start fresh with rootwrap filters
sudo rm -rf /etc/${project}/rootwrap.d sudo rm -rf /etc/${project}/rootwrap.d

View File

@ -254,7 +254,7 @@ function configure_ceilometer {
if is_service_enabled ceilometer-aipmi; then if is_service_enabled ceilometer-aipmi; then
# Configure rootwrap for the ipmi agent # Configure rootwrap for the ipmi agent
configure_rootwrap ceilometer $CEILOMETER_BIN_DIR/ceilometer-rootwrap $CEILOMETER_DIR/etc/ceilometer configure_rootwrap ceilometer
fi fi
} }

View File

@ -190,7 +190,7 @@ function configure_cinder {
rm -f $CINDER_CONF rm -f $CINDER_CONF
configure_rootwrap cinder $CINDER_BIN_DIR/cinder-rootwrap $CINDER_DIR/etc/cinder configure_rootwrap cinder
cp $CINDER_DIR/etc/cinder/api-paste.ini $CINDER_API_PASTE_INI cp $CINDER_DIR/etc/cinder/api-paste.ini $CINDER_API_PASTE_INI

View File

@ -298,7 +298,7 @@ function configure_nova {
install_default_policy nova install_default_policy nova
configure_rootwrap nova $NOVA_BIN_DIR/nova-rootwrap $NOVA_DIR/etc/nova configure_rootwrap nova
if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then
# Get the sample configuration file in place # Get the sample configuration file in place