Merge "Fix shocco errors and warnings"
This commit is contained in:
commit
8e285072c9
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# **swift.sh**
|
# **swift.sh**
|
||||||
|
|
||||||
# Test swift via the ``swift`` command line from ``python-swiftclient`
|
# Test swift via the ``swift`` command line from ``python-swiftclient``
|
||||||
|
|
||||||
echo "*********************************************************************"
|
echo "*********************************************************************"
|
||||||
echo "Begin DevStack Exercise: $0"
|
echo "Begin DevStack Exercise: $0"
|
||||||
|
27
functions
27
functions
@ -54,7 +54,7 @@ function address_in_net() {
|
|||||||
|
|
||||||
|
|
||||||
# Wrapper for ``apt-get`` to set cache and proxy environment variables
|
# Wrapper for ``apt-get`` to set cache and proxy environment variables
|
||||||
# Uses globals ``OFFLINE``, ``*_proxy`
|
# Uses globals ``OFFLINE``, ``*_proxy``
|
||||||
# apt_get operation package [package ...]
|
# apt_get operation package [package ...]
|
||||||
function apt_get() {
|
function apt_get() {
|
||||||
[[ "$OFFLINE" = "True" || -z "$@" ]] && return
|
[[ "$OFFLINE" = "True" || -z "$@" ]] && return
|
||||||
@ -260,7 +260,8 @@ function _get_package_dir() {
|
|||||||
#
|
#
|
||||||
# Only packages required for the services in 1st argument will be
|
# Only packages required for the services in 1st argument will be
|
||||||
# included. Two bits of metadata are recognized in the prerequisite files:
|
# included. Two bits of metadata are recognized in the prerequisite files:
|
||||||
# - ``# NOPRIME`` defers installation to be performed later in stack.sh
|
#
|
||||||
|
# - ``# NOPRIME`` defers installation to be performed later in `stack.sh`
|
||||||
# - ``# dist:DISTRO`` or ``dist:DISTRO1,DISTRO2`` limits the selection
|
# - ``# dist:DISTRO`` or ``dist:DISTRO1,DISTRO2`` limits the selection
|
||||||
# of the package to the distros listed. The distro names are case insensitive.
|
# of the package to the distros listed. The distro names are case insensitive.
|
||||||
function get_packages() {
|
function get_packages() {
|
||||||
@ -982,7 +983,7 @@ function is_set() {
|
|||||||
|
|
||||||
# Wrapper for ``pip install`` to set cache and proxy environment variables
|
# Wrapper for ``pip install`` to set cache and proxy environment variables
|
||||||
# Uses globals ``OFFLINE``, ``PIP_DOWNLOAD_CACHE``, ``PIP_USE_MIRRORS``,
|
# Uses globals ``OFFLINE``, ``PIP_DOWNLOAD_CACHE``, ``PIP_USE_MIRRORS``,
|
||||||
# ``TRACK_DEPENDS``, ``*_proxy`
|
# ``TRACK_DEPENDS``, ``*_proxy``
|
||||||
# pip_install package [package ...]
|
# pip_install package [package ...]
|
||||||
function pip_install {
|
function pip_install {
|
||||||
[[ "$OFFLINE" = "True" || -z "$@" ]] && return
|
[[ "$OFFLINE" = "True" || -z "$@" ]] && return
|
||||||
@ -1011,8 +1012,7 @@ function pip_install {
|
|||||||
# /tmp/$USER-pip-build. Even if a later component specifies foo <
|
# /tmp/$USER-pip-build. Even if a later component specifies foo <
|
||||||
# 1.1, the existing extracted build will be used and cause
|
# 1.1, the existing extracted build will be used and cause
|
||||||
# confusing errors. By creating unique build directories we avoid
|
# confusing errors. By creating unique build directories we avoid
|
||||||
# this problem. See
|
# this problem. See https://github.com/pypa/pip/issues/709
|
||||||
# https://github.com/pypa/pip/issues/709
|
|
||||||
local pip_build_tmp=$(mktemp --tmpdir -d pip-build.XXXXX)
|
local pip_build_tmp=$(mktemp --tmpdir -d pip-build.XXXXX)
|
||||||
|
|
||||||
$SUDO_PIP PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
$SUDO_PIP PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
||||||
@ -1146,8 +1146,8 @@ function screen_rc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Helper to remove the *.failure files under $SERVICE_DIR/$SCREEN_NAME
|
# Helper to remove the ``*.failure`` files under ``$SERVICE_DIR/$SCREEN_NAME``.
|
||||||
# This is used for service_check when all the screen_it are called finished
|
# This is used for ``service_check`` when all the ``screen_it`` are called finished
|
||||||
# init_service_check
|
# init_service_check
|
||||||
function init_service_check() {
|
function init_service_check() {
|
||||||
SCREEN_NAME=${SCREEN_NAME:-stack}
|
SCREEN_NAME=${SCREEN_NAME:-stack}
|
||||||
@ -1310,10 +1310,12 @@ function trueorfalse() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Retrieve an image from a URL and upload into Glance
|
# Retrieve an image from a URL and upload into Glance.
|
||||||
# Uses the following variables:
|
# Uses the following variables:
|
||||||
# ``FILES`` must be set to the cache dir
|
#
|
||||||
# ``GLANCE_HOSTPORT``
|
# - ``FILES`` must be set to the cache dir
|
||||||
|
# - ``GLANCE_HOSTPORT``
|
||||||
|
#
|
||||||
# upload_image image-url glance-token
|
# upload_image image-url glance-token
|
||||||
function upload_image() {
|
function upload_image() {
|
||||||
local image_url=$1
|
local image_url=$1
|
||||||
@ -1475,7 +1477,8 @@ function upload_image() {
|
|||||||
# When called from stackrc/localrc DATABASE_BACKENDS has not been
|
# When called from stackrc/localrc DATABASE_BACKENDS has not been
|
||||||
# initialized yet, just save the configuration selection and call back later
|
# initialized yet, just save the configuration selection and call back later
|
||||||
# to validate it.
|
# to validate it.
|
||||||
# $1 The name of the database backend to use (mysql, postgresql, ...)
|
#
|
||||||
|
# ``$1`` - the name of the database backend to use (mysql, postgresql, ...)
|
||||||
function use_database {
|
function use_database {
|
||||||
if [[ -z "$DATABASE_BACKENDS" ]]; then
|
if [[ -z "$DATABASE_BACKENDS" ]]; then
|
||||||
# No backends registered means this is likely called from ``localrc``
|
# No backends registered means this is likely called from ``localrc``
|
||||||
@ -1516,7 +1519,7 @@ function wait_for_service() {
|
|||||||
|
|
||||||
|
|
||||||
# Wrapper for ``yum`` to set proxy environment variables
|
# Wrapper for ``yum`` to set proxy environment variables
|
||||||
# Uses globals ``OFFLINE``, ``*_proxy`
|
# Uses globals ``OFFLINE``, ``*_proxy``
|
||||||
# yum_install package [package ...]
|
# yum_install package [package ...]
|
||||||
function yum_install() {
|
function yum_install() {
|
||||||
[[ "$OFFLINE" = "True" ]] && return
|
[[ "$OFFLINE" = "True" ]] && return
|
||||||
|
@ -83,8 +83,10 @@ BM_POSEUR_EXTRA_OPTS=${BM_POSEUR_EXTRA_OPTS:-}
|
|||||||
# To provide PXE, configure nova-network's dnsmasq rather than run the one
|
# To provide PXE, configure nova-network's dnsmasq rather than run the one
|
||||||
# dedicated to baremetal. When enable this, make sure these conditions are
|
# dedicated to baremetal. When enable this, make sure these conditions are
|
||||||
# fulfilled:
|
# fulfilled:
|
||||||
|
#
|
||||||
# 1) nova-compute and nova-network runs on the same host
|
# 1) nova-compute and nova-network runs on the same host
|
||||||
# 2) nova-network uses FlatDHCPManager
|
# 2) nova-network uses FlatDHCPManager
|
||||||
|
#
|
||||||
# NOTE: the other BM_DNSMASQ_* have no effect on the behavior if this option
|
# NOTE: the other BM_DNSMASQ_* have no effect on the behavior if this option
|
||||||
# is enabled.
|
# is enabled.
|
||||||
BM_DNSMASQ_FROM_NOVA_NETWORK=`trueorfalse False $BM_DNSMASQ_FROM_NOVA_NETWORK`
|
BM_DNSMASQ_FROM_NOVA_NETWORK=`trueorfalse False $BM_DNSMASQ_FROM_NOVA_NETWORK`
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
# Install and start **Ceilometer** service
|
# Install and start **Ceilometer** service
|
||||||
|
|
||||||
# To enable a minimal set of Ceilometer services, add the following to localrc:
|
# To enable a minimal set of Ceilometer services, add the following to localrc:
|
||||||
|
#
|
||||||
# enable_service ceilometer-acompute ceilometer-acentral ceilometer-collector ceilometer-api
|
# enable_service ceilometer-acompute ceilometer-acentral ceilometer-collector ceilometer-api
|
||||||
#
|
#
|
||||||
# To ensure Ceilometer alarming services are enabled also, further add to the localrc:
|
# To ensure Ceilometer alarming services are enabled also, further add to the localrc:
|
||||||
|
#
|
||||||
# enable_service ceilometer-alarm-notifier ceilometer-alarm-evaluator
|
# enable_service ceilometer-alarm-notifier ceilometer-alarm-evaluator
|
||||||
|
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
|
11
lib/database
11
lib/database
@ -9,10 +9,11 @@
|
|||||||
|
|
||||||
# This is a wrapper for the specific database backends available.
|
# This is a wrapper for the specific database backends available.
|
||||||
# Each database must implement four functions:
|
# Each database must implement four functions:
|
||||||
# recreate_database_$DATABASE_TYPE
|
#
|
||||||
# install_database_$DATABASE_TYPE
|
# - recreate_database_$DATABASE_TYPE
|
||||||
# configure_database_$DATABASE_TYPE
|
# - install_database_$DATABASE_TYPE
|
||||||
# database_connection_url_$DATABASE_TYPE
|
# - configure_database_$DATABASE_TYPE
|
||||||
|
# - database_connection_url_$DATABASE_TYPE
|
||||||
#
|
#
|
||||||
# and call register_database $DATABASE_TYPE
|
# and call register_database $DATABASE_TYPE
|
||||||
|
|
||||||
@ -22,7 +23,9 @@ set +o xtrace
|
|||||||
|
|
||||||
|
|
||||||
# Register a database backend
|
# Register a database backend
|
||||||
|
#
|
||||||
# $1 The name of the database backend
|
# $1 The name of the database backend
|
||||||
|
#
|
||||||
# This is required to be defined before the specific database scripts are sourced
|
# This is required to be defined before the specific database scripts are sourced
|
||||||
function register_database {
|
function register_database {
|
||||||
[ -z "$DATABASE_BACKENDS" ] && DATABASE_BACKENDS=$1 || DATABASE_BACKENDS+=" $1"
|
[ -z "$DATABASE_BACKENDS" ] && DATABASE_BACKENDS=$1 || DATABASE_BACKENDS+=" $1"
|
||||||
|
@ -212,7 +212,7 @@ source $TOP_DIR/lib/neutron_plugins/services/loadbalancer
|
|||||||
source $TOP_DIR/lib/neutron_plugins/services/vpn
|
source $TOP_DIR/lib/neutron_plugins/services/vpn
|
||||||
|
|
||||||
# Firewall Service Plugin functions
|
# Firewall Service Plugin functions
|
||||||
# --------------------------------
|
# ---------------------------------
|
||||||
source $TOP_DIR/lib/neutron_plugins/services/firewall
|
source $TOP_DIR/lib/neutron_plugins/services/firewall
|
||||||
|
|
||||||
# Use security group or not
|
# Use security group or not
|
||||||
@ -498,6 +498,7 @@ function _configure_neutron_common() {
|
|||||||
# For main plugin config file, set ``Q_PLUGIN_CONF_PATH``, ``Q_PLUGIN_CONF_FILENAME``.
|
# For main plugin config file, set ``Q_PLUGIN_CONF_PATH``, ``Q_PLUGIN_CONF_FILENAME``.
|
||||||
# For addition plugin config files, set ``Q_PLUGIN_EXTRA_CONF_PATH``,
|
# For addition plugin config files, set ``Q_PLUGIN_EXTRA_CONF_PATH``,
|
||||||
# ``Q_PLUGIN_EXTRA_CONF_FILES``. For example:
|
# ``Q_PLUGIN_EXTRA_CONF_FILES``. For example:
|
||||||
|
#
|
||||||
# ``Q_PLUGIN_EXTRA_CONF_FILES=(file1, file2)``
|
# ``Q_PLUGIN_EXTRA_CONF_FILES=(file1, file2)``
|
||||||
neutron_plugin_configure_common
|
neutron_plugin_configure_common
|
||||||
|
|
||||||
|
@ -272,8 +272,8 @@ function configure_swift() {
|
|||||||
|
|
||||||
# By default Swift will be installed with keystone and tempauth middleware
|
# By default Swift will be installed with keystone and tempauth middleware
|
||||||
# and add the swift3 middleware if its configured for it. The token for
|
# and add the swift3 middleware if its configured for it. The token for
|
||||||
# tempauth would be prefixed with the reseller_prefix setting TEMPAUTH_ the
|
# tempauth would be prefixed with the reseller_prefix setting `TEMPAUTH_` the
|
||||||
# token for keystoneauth would have the standard reseller_prefix AUTH_
|
# token for keystoneauth would have the standard reseller_prefix `AUTH_`
|
||||||
if is_service_enabled swift3;then
|
if is_service_enabled swift3;then
|
||||||
swift_pipeline+=" swift3 s3token "
|
swift_pipeline+=" swift3 s3token "
|
||||||
fi
|
fi
|
||||||
|
@ -84,11 +84,10 @@ if [ ! -r $CACHEDIR/$DIST_NAME-base.img ]; then
|
|||||||
$TOOLS_DIR/get_uec_image.sh $DIST_NAME $CACHEDIR/$DIST_NAME-base.img
|
$TOOLS_DIR/get_uec_image.sh $DIST_NAME $CACHEDIR/$DIST_NAME-base.img
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Finds the next available NBD device
|
# Finds and returns full device path for the next available NBD device.
|
||||||
# Exits script if error connecting or none free
|
# Exits script if error connecting or none free.
|
||||||
# map_nbd image
|
# map_nbd image
|
||||||
# Returns full nbd device path
|
function map_nbd() {
|
||||||
function map_nbd {
|
|
||||||
for i in `seq 0 15`; do
|
for i in `seq 0 15`; do
|
||||||
if [ ! -e /sys/block/nbd$i/pid ]; then
|
if [ ! -e /sys/block/nbd$i/pid ]; then
|
||||||
NBD=/dev/nbd$i
|
NBD=/dev/nbd$i
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
# Create a user account suitable for running DevStack
|
# Create a user account suitable for running DevStack
|
||||||
# - create a group named $STACK_USER if it does not exist
|
# - create a group named $STACK_USER if it does not exist
|
||||||
# - create a user named $STACK_USER if it does not exist
|
# - create a user named $STACK_USER if it does not exist
|
||||||
|
#
|
||||||
# - home is $DEST
|
# - home is $DEST
|
||||||
|
#
|
||||||
# - configure sudo for $STACK_USER
|
# - configure sudo for $STACK_USER
|
||||||
|
|
||||||
# ``stack.sh`` was never intended to run as root. It had a hack to do what is
|
# ``stack.sh`` was never intended to run as root. It had a hack to do what is
|
||||||
|
@ -5,11 +5,15 @@
|
|||||||
# fixup_stuff.sh
|
# fixup_stuff.sh
|
||||||
#
|
#
|
||||||
# All distro and package specific hacks go in here
|
# All distro and package specific hacks go in here
|
||||||
|
#
|
||||||
# - prettytable 0.7.2 permissions are 600 in the package and
|
# - prettytable 0.7.2 permissions are 600 in the package and
|
||||||
# pip 1.4 doesn't fix it (1.3 did)
|
# pip 1.4 doesn't fix it (1.3 did)
|
||||||
|
#
|
||||||
# - httplib2 0.8 permissions are 600 in the package and
|
# - httplib2 0.8 permissions are 600 in the package and
|
||||||
# pip 1.4 doesn't fix it (1.3 did)
|
# pip 1.4 doesn't fix it (1.3 did)
|
||||||
|
#
|
||||||
# - RHEL6:
|
# - RHEL6:
|
||||||
|
#
|
||||||
# - set selinux not enforcing
|
# - set selinux not enforcing
|
||||||
# - (re)start messagebus daemon
|
# - (re)start messagebus daemon
|
||||||
# - remove distro packages python-crypto and python-lxml
|
# - remove distro packages python-crypto and python-lxml
|
||||||
|
Loading…
Reference in New Issue
Block a user