2014-12-05 14:25:28 -05:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2012-05-02 11:48:15 -05:00
|
|
|
# lib/cinder
|
2012-12-21 11:03:37 -06:00
|
|
|
# Install and start **Cinder** volume service
|
2012-05-02 11:48:15 -05:00
|
|
|
|
|
|
|
# Dependencies:
|
2013-10-24 11:27:02 +01:00
|
|
|
#
|
2012-05-02 11:48:15 -05:00
|
|
|
# - functions
|
2013-01-06 22:40:09 +01:00
|
|
|
# - DEST, DATA_DIR, STACK_USER must be defined
|
2013-10-24 11:27:02 +01:00
|
|
|
# - SERVICE_{TENANT_NAME|PASSWORD} must be defined
|
|
|
|
# - ``KEYSTONE_TOKEN_FORMAT`` must be defined
|
2012-05-02 11:48:15 -05:00
|
|
|
|
|
|
|
# stack.sh
|
|
|
|
# ---------
|
2013-10-24 11:27:02 +01:00
|
|
|
# - install_cinder
|
|
|
|
# - configure_cinder
|
|
|
|
# - init_cinder
|
|
|
|
# - start_cinder
|
|
|
|
# - stop_cinder
|
|
|
|
# - cleanup_cinder
|
2012-05-02 11:48:15 -05:00
|
|
|
|
2012-09-13 17:16:12 -05:00
|
|
|
# Save trace setting
|
2015-10-13 11:03:03 +11:00
|
|
|
_XTRACE_CINDER=$(set +o | grep xtrace)
|
2012-09-13 17:16:12 -05:00
|
|
|
set +o xtrace
|
2012-05-02 11:48:15 -05:00
|
|
|
|
|
|
|
|
|
|
|
# Defaults
|
|
|
|
# --------
|
|
|
|
|
2012-11-20 15:52:21 +00:00
|
|
|
# set up default driver
|
|
|
|
CINDER_DRIVER=${CINDER_DRIVER:-default}
|
2014-01-23 11:31:10 -07:00
|
|
|
CINDER_PLUGINS=$TOP_DIR/lib/cinder_plugins
|
2014-07-03 10:46:57 -05:00
|
|
|
CINDER_BACKENDS=$TOP_DIR/lib/cinder_backends
|
2014-01-23 11:31:10 -07:00
|
|
|
|
|
|
|
# grab plugin config if specified via cinder_driver
|
|
|
|
if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
|
|
|
|
source $CINDER_PLUGINS/$CINDER_DRIVER
|
|
|
|
fi
|
2012-11-20 15:52:21 +00:00
|
|
|
|
2012-05-02 11:48:15 -05:00
|
|
|
# set up default directories
|
2014-11-13 17:09:28 -05:00
|
|
|
GITDIR["python-cinderclient"]=$DEST/python-cinderclient
|
2016-05-26 23:41:49 +03:00
|
|
|
GITDIR["python-brick-cinderclient-ext"]=$DEST/python-brick-cinderclient-ext
|
2012-05-02 11:48:15 -05:00
|
|
|
CINDER_DIR=$DEST/cinder
|
2015-02-18 07:09:04 -06:00
|
|
|
|
|
|
|
# Cinder virtual environment
|
|
|
|
if [[ ${USE_VENV} = True ]]; then
|
|
|
|
PROJECT_VENV["cinder"]=${CINDER_DIR}.venv
|
|
|
|
CINDER_BIN_DIR=${PROJECT_VENV["cinder"]}/bin
|
|
|
|
else
|
|
|
|
CINDER_BIN_DIR=$(get_python_exec_prefix)
|
|
|
|
fi
|
|
|
|
|
2012-09-13 14:02:01 -05:00
|
|
|
CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder}
|
2012-12-13 16:22:38 -06:00
|
|
|
CINDER_AUTH_CACHE_DIR=${CINDER_AUTH_CACHE_DIR:-/var/cache/cinder}
|
|
|
|
|
2012-09-13 14:02:01 -05:00
|
|
|
CINDER_CONF_DIR=/etc/cinder
|
|
|
|
CINDER_CONF=$CINDER_CONF_DIR/cinder.conf
|
2012-12-13 16:22:38 -06:00
|
|
|
CINDER_API_PASTE_INI=$CINDER_CONF_DIR/api-paste.ini
|
2012-09-13 14:02:01 -05:00
|
|
|
|
2012-12-13 17:05:24 -06:00
|
|
|
# Public facing bits
|
2014-03-19 17:47:42 -04:00
|
|
|
if is_ssl_enabled_service "cinder" || is_service_enabled tls-proxy; then
|
|
|
|
CINDER_SERVICE_PROTOCOL="https"
|
|
|
|
fi
|
2012-12-13 17:05:24 -06:00
|
|
|
CINDER_SERVICE_HOST=${CINDER_SERVICE_HOST:-$SERVICE_HOST}
|
|
|
|
CINDER_SERVICE_PORT=${CINDER_SERVICE_PORT:-8776}
|
|
|
|
CINDER_SERVICE_PORT_INT=${CINDER_SERVICE_PORT_INT:-18776}
|
|
|
|
CINDER_SERVICE_PROTOCOL=${CINDER_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
2015-06-16 13:14:31 -04:00
|
|
|
CINDER_SERVICE_LISTEN_ADDRESS=${CINDER_SERVICE_LISTEN_ADDRESS:-$SERVICE_LISTEN_ADDRESS}
|
2012-12-13 17:05:24 -06:00
|
|
|
|
2015-05-12 17:28:59 -06:00
|
|
|
# What type of LVM device should Cinder use for LVM backend
|
2016-11-21 21:10:49 -05:00
|
|
|
# Defaults to default, which is thick, the other valid choice
|
|
|
|
# is thin, which as the name implies utilizes lvm thin provisioning.
|
|
|
|
# Thinly provisioned LVM volumes may be more efficient when using the Cinder
|
|
|
|
# image cache, but there are also known race failures with volume snapshots
|
|
|
|
# and thinly provisioned LVM volumes, see bug 1642111 for details.
|
|
|
|
CINDER_LVM_TYPE=${CINDER_LVM_TYPE:-default}
|
2014-07-03 10:46:57 -05:00
|
|
|
|
|
|
|
# Default backends
|
|
|
|
# The backend format is type:name where type is one of the supported backend
|
|
|
|
# types (lvm, nfs, etc) and name is the identifier used in the Cinder
|
|
|
|
# configuration and for the volume type name. Multiple backends are
|
|
|
|
# comma-separated.
|
2014-12-18 16:31:34 -06:00
|
|
|
# The old ``CINDER_MULTI_LVM_BACKEND=True`` setting had a default of:
|
|
|
|
# CINDER_ENABLED_BACKENDS=${CINDER_ENABLED_BACKENDS:-lvm:lvmdriver-1,lvm:lvmdriver-2}
|
|
|
|
CINDER_ENABLED_BACKENDS=${CINDER_ENABLED_BACKENDS:-lvm:lvmdriver-1}
|
2014-07-03 10:46:57 -05:00
|
|
|
|
|
|
|
|
2013-03-18 16:07:56 -05:00
|
|
|
# Should cinder perform secure deletion of volumes?
|
2015-04-29 15:39:17 -04:00
|
|
|
# Defaults to zero. Can also be set to none or shred.
|
|
|
|
# This was previously CINDER_SECURE_DELETE (True or False).
|
|
|
|
# Equivalents using CINDER_VOLUME_CLEAR are zero and none, respectively.
|
|
|
|
# Set to none to avoid this bug when testing:
|
2013-03-18 16:07:56 -05:00
|
|
|
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1023755
|
2015-04-29 15:39:17 -04:00
|
|
|
if [[ -n $CINDER_SECURE_DELETE ]]; then
|
|
|
|
CINDER_SECURE_DELETE=$(trueorfalse True CINDER_SECURE_DELETE)
|
|
|
|
if [[ $CINDER_SECURE_DELETE == "False" ]]; then
|
|
|
|
CINDER_VOLUME_CLEAR_DEFAULT="none"
|
|
|
|
fi
|
2015-10-07 11:51:40 -04:00
|
|
|
deprecated "Configure secure Cinder volume deletion using CINDER_VOLUME_CLEAR instead of CINDER_SECURE_DELETE."
|
2015-04-29 15:39:17 -04:00
|
|
|
fi
|
|
|
|
CINDER_VOLUME_CLEAR=${CINDER_VOLUME_CLEAR:-${CINDER_VOLUME_CLEAR_DEFAULT:-zero}}
|
|
|
|
CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]')
|
2013-03-18 16:07:56 -05:00
|
|
|
|
2013-05-16 16:31:12 -04:00
|
|
|
# Cinder reports allocations back to the scheduler on periodic intervals
|
|
|
|
# it turns out we can get an "out of space" issue when we run tests too
|
|
|
|
# quickly just because cinder didn't realize we'd freed up resources.
|
|
|
|
# Make this configurable so that devstack-gate/tempest can set it to
|
|
|
|
# less than the 60 second default
|
|
|
|
# https://bugs.launchpad.net/cinder/+bug/1180976
|
|
|
|
CINDER_PERIODIC_INTERVAL=${CINDER_PERIODIC_INTERVAL:-60}
|
|
|
|
|
2015-01-26 15:44:47 +01:00
|
|
|
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
|
|
|
|
|
2015-09-01 10:55:20 +03:00
|
|
|
# Toggle for deploying Cinder under HTTPD + mod_wsgi
|
|
|
|
CINDER_USE_MOD_WSGI=${CINDER_USE_MOD_WSGI:-False}
|
2013-04-08 15:38:03 -05:00
|
|
|
|
2014-07-03 10:46:57 -05:00
|
|
|
# Source the enabled backends
|
|
|
|
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
|
|
|
|
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
2014-07-25 12:37:41 -05:00
|
|
|
be_type=${be%%:*}
|
|
|
|
be_name=${be##*:}
|
|
|
|
if [[ -r $CINDER_BACKENDS/${be_type} ]]; then
|
|
|
|
source $CINDER_BACKENDS/${be_type}
|
2014-07-03 10:46:57 -05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2016-05-03 17:34:00 -07:00
|
|
|
# Environment variables to configure the image-volume cache
|
|
|
|
CINDER_IMG_CACHE_ENABLED=${CINDER_IMG_CACHE_ENABLED:-True}
|
|
|
|
|
|
|
|
# For limits, if left unset, it will use cinder defaults of 0 for unlimited
|
|
|
|
CINDER_IMG_CACHE_SIZE_GB=${CINDER_IMG_CACHE_SIZE_GB:-}
|
|
|
|
CINDER_IMG_CACHE_SIZE_COUNT=${CINDER_IMG_CACHE_SIZE_COUNT:-}
|
|
|
|
|
|
|
|
# Configure which cinder backends will have the image-volume cache, this takes the same
|
|
|
|
# form as the CINDER_ENABLED_BACKENDS config option. By default it will
|
|
|
|
# enable the cache for all cinder backends.
|
|
|
|
CINDER_CACHE_ENABLED_FOR_BACKENDS=${CINDER_CACHE_ENABLED_FOR_BACKENDS:-$CINDER_ENABLED_BACKENDS}
|
2014-07-03 10:46:57 -05:00
|
|
|
|
2013-04-08 15:38:03 -05:00
|
|
|
# Functions
|
|
|
|
# ---------
|
2014-01-15 15:04:49 -06:00
|
|
|
|
|
|
|
# Test if any Cinder services are enabled
|
|
|
|
# is_cinder_enabled
|
|
|
|
function is_cinder_enabled {
|
|
|
|
[[ ,${ENABLED_SERVICES} =~ ,"c-" ]] && return 0
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2015-09-01 10:55:20 +03:00
|
|
|
# _cinder_cleanup_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file
|
|
|
|
function _cinder_cleanup_apache_wsgi {
|
|
|
|
sudo rm -f $(apache_site_config_for osapi-volume)
|
|
|
|
}
|
|
|
|
|
2012-05-02 11:48:15 -05:00
|
|
|
# cleanup_cinder() - Remove residual data files, anything left over from previous
|
|
|
|
# runs that a clean run would need to clean up
|
2014-02-21 15:35:08 +11:00
|
|
|
function cleanup_cinder {
|
2012-12-20 16:41:57 -05:00
|
|
|
# ensure the volume group is cleared up because fails might
|
|
|
|
# leave dead volumes in the group
|
2015-01-26 15:44:47 +01:00
|
|
|
if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then
|
2015-10-07 14:06:26 +11:00
|
|
|
local targets
|
|
|
|
targets=$(sudo tgtadm --op show --mode target)
|
2015-01-26 15:44:47 +01:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
# If tgt driver isn't running this won't work obviously
|
|
|
|
# So check the response and restart if need be
|
|
|
|
echo "tgtd seems to be in a bad state, restarting..."
|
|
|
|
if is_ubuntu; then
|
|
|
|
restart_service tgt
|
|
|
|
else
|
|
|
|
restart_service tgtd
|
|
|
|
fi
|
|
|
|
targets=$(sudo tgtadm --op show --mode target)
|
2012-12-20 16:41:57 -05:00
|
|
|
fi
|
|
|
|
|
2015-01-26 15:44:47 +01:00
|
|
|
if [[ -n "$targets" ]]; then
|
|
|
|
local iqn_list=( $(grep --no-filename -r iqn $SCSI_PERSIST_DIR | sed 's/<target //' | sed 's/>//') )
|
|
|
|
for i in "${iqn_list[@]}"; do
|
|
|
|
echo removing iSCSI target: $i
|
|
|
|
sudo tgt-admin --delete $i
|
|
|
|
done
|
|
|
|
fi
|
2012-12-20 16:41:57 -05:00
|
|
|
|
2015-01-26 15:44:47 +01:00
|
|
|
if is_ubuntu; then
|
|
|
|
stop_service tgt
|
|
|
|
else
|
|
|
|
stop_service tgtd
|
|
|
|
fi
|
2012-12-20 16:41:57 -05:00
|
|
|
else
|
2015-01-26 15:44:47 +01:00
|
|
|
sudo cinder-rtstool get-targets | sudo xargs -rn 1 cinder-rtstool delete
|
2012-12-20 16:41:57 -05:00
|
|
|
fi
|
|
|
|
|
2014-07-03 10:46:57 -05:00
|
|
|
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
|
2014-07-25 12:37:41 -05:00
|
|
|
local be be_name be_type
|
2014-07-03 10:46:57 -05:00
|
|
|
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
2014-07-25 12:37:41 -05:00
|
|
|
be_type=${be%%:*}
|
|
|
|
be_name=${be##*:}
|
|
|
|
if type cleanup_cinder_backend_${be_type} >/dev/null 2>&1; then
|
|
|
|
cleanup_cinder_backend_${be_type} ${be_name}
|
2014-07-03 10:46:57 -05:00
|
|
|
fi
|
|
|
|
done
|
2013-02-22 17:28:10 +01:00
|
|
|
fi
|
2015-09-01 10:55:20 +03:00
|
|
|
|
|
|
|
if [ "$CINDER_USE_MOD_WSGI" == "True" ]; then
|
|
|
|
_cinder_cleanup_apache_wsgi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# _cinder_config_apache_wsgi() - Set WSGI config files
|
|
|
|
function _cinder_config_apache_wsgi {
|
2015-10-07 14:06:26 +11:00
|
|
|
local cinder_apache_conf
|
|
|
|
cinder_apache_conf=$(apache_site_config_for osapi-volume)
|
2015-09-01 10:55:20 +03:00
|
|
|
local cinder_ssl=""
|
|
|
|
local cinder_certfile=""
|
|
|
|
local cinder_keyfile=""
|
|
|
|
local cinder_api_port=$CINDER_SERVICE_PORT
|
|
|
|
local venv_path=""
|
|
|
|
|
|
|
|
if is_ssl_enabled_service c-api; then
|
|
|
|
cinder_ssl="SSLEngine On"
|
|
|
|
cinder_certfile="SSLCertificateFile $CINDER_SSL_CERT"
|
|
|
|
cinder_keyfile="SSLCertificateKeyFile $CINDER_SSL_KEY"
|
|
|
|
fi
|
|
|
|
if [[ ${USE_VENV} = True ]]; then
|
|
|
|
venv_path="python-path=${PROJECT_VENV["cinder"]}/lib/python2.7/site-packages"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# copy proxy vhost file
|
|
|
|
sudo cp $FILES/apache-cinder-api.template $cinder_apache_conf
|
|
|
|
sudo sed -e "
|
|
|
|
s|%PUBLICPORT%|$cinder_api_port|g;
|
|
|
|
s|%APACHE_NAME%|$APACHE_NAME|g;
|
|
|
|
s|%APIWORKERS%|$API_WORKERS|g
|
|
|
|
s|%CINDER_BIN_DIR%|$CINDER_BIN_DIR|g;
|
|
|
|
s|%SSLENGINE%|$cinder_ssl|g;
|
|
|
|
s|%SSLCERTFILE%|$cinder_certfile|g;
|
|
|
|
s|%SSLKEYFILE%|$cinder_keyfile|g;
|
|
|
|
s|%USER%|$STACK_USER|g;
|
|
|
|
s|%VIRTUALENV%|$venv_path|g
|
|
|
|
" -i $cinder_apache_conf
|
2012-05-02 11:48:15 -05:00
|
|
|
}
|
|
|
|
|
2014-01-10 14:23:03 +01:00
|
|
|
# configure_cinder() - Set config files, create data dirs, etc
|
2014-02-21 15:35:08 +11:00
|
|
|
function configure_cinder {
|
2015-03-16 13:52:19 -05:00
|
|
|
sudo install -d -o $STACK_USER -m 755 $CINDER_CONF_DIR
|
2014-01-10 14:23:03 +01:00
|
|
|
|
|
|
|
cp -p $CINDER_DIR/etc/cinder/policy.json $CINDER_CONF_DIR
|
|
|
|
|
2015-01-05 17:05:47 +08:00
|
|
|
rm -f $CINDER_CONF
|
|
|
|
|
2015-05-14 10:01:53 +10:00
|
|
|
configure_rootwrap cinder
|
2012-07-20 13:18:17 -06:00
|
|
|
|
2012-05-02 11:48:15 -05:00
|
|
|
cp $CINDER_DIR/etc/cinder/api-paste.ini $CINDER_API_PASTE_INI
|
2013-10-16 18:57:15 -04:00
|
|
|
|
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken auth_host
|
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken auth_port
|
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken auth_protocol
|
2013-09-20 16:26:42 +10:00
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken cafile
|
2013-10-16 18:57:15 -04:00
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken admin_tenant_name
|
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken admin_user
|
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken admin_password
|
|
|
|
inicomment $CINDER_API_PASTE_INI filter:authtoken signing_dir
|
2012-10-01 14:06:44 -05:00
|
|
|
|
2014-09-19 17:22:22 -05:00
|
|
|
configure_auth_token_middleware $CINDER_CONF cinder $CINDER_AUTH_CACHE_DIR
|
2013-10-16 18:57:15 -04:00
|
|
|
|
2017-02-17 11:51:36 -05:00
|
|
|
# Change the default nova_catalog_info and nova_catalog_admin_info values in
|
|
|
|
# cinder so that the service name cinder is searching for matches that set for
|
|
|
|
# nova in keystone.
|
|
|
|
if [[ -n "$CINDER_NOVA_CATALOG_INFO" ]]; then
|
|
|
|
iniset $CINDER_CONF DEFAULT nova_catalog_info $CINDER_NOVA_CATALOG_INFO
|
|
|
|
fi
|
|
|
|
if [[ -n "$CINDER_NOVA_CATALOG_ADMIN_INFO" ]]; then
|
|
|
|
iniset $CINDER_CONF DEFAULT nova_catalog_admin_info $CINDER_NOVA_CATALOG_ADMIN_INFO
|
|
|
|
fi
|
2015-01-08 17:37:40 +00:00
|
|
|
|
2012-05-02 11:48:15 -05:00
|
|
|
iniset $CINDER_CONF DEFAULT auth_strategy keystone
|
2013-08-10 09:56:16 -05:00
|
|
|
iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
|
2014-07-03 10:46:57 -05:00
|
|
|
|
2015-01-26 15:44:47 +01:00
|
|
|
iniset $CINDER_CONF DEFAULT iscsi_helper "$CINDER_ISCSI_HELPER"
|
2015-03-06 15:24:22 -08:00
|
|
|
iniset $CINDER_CONF database connection `database_connection_url cinder`
|
2012-05-02 11:48:15 -05:00
|
|
|
iniset $CINDER_CONF DEFAULT api_paste_config $CINDER_API_PASTE_INI
|
2013-02-20 12:45:02 -08:00
|
|
|
iniset $CINDER_CONF DEFAULT rootwrap_config "$CINDER_CONF_DIR/rootwrap.conf"
|
2013-01-28 09:53:38 -05:00
|
|
|
iniset $CINDER_CONF DEFAULT osapi_volume_extension cinder.api.contrib.standard_extensions
|
2015-06-16 13:14:31 -04:00
|
|
|
iniset $CINDER_CONF DEFAULT osapi_volume_listen $CINDER_SERVICE_LISTEN_ADDRESS
|
2012-09-13 14:02:01 -05:00
|
|
|
iniset $CINDER_CONF DEFAULT state_path $CINDER_STATE_PATH
|
2015-03-06 15:24:22 -08:00
|
|
|
iniset $CINDER_CONF oslo_concurrency lock_path $CINDER_STATE_PATH
|
2013-05-16 16:31:12 -04:00
|
|
|
iniset $CINDER_CONF DEFAULT periodic_interval $CINDER_PERIODIC_INTERVAL
|
2016-06-03 15:34:50 +02:00
|
|
|
iniset $CINDER_CONF DEFAULT my_ip "$HOST_IP"
|
2012-07-20 13:18:17 -06:00
|
|
|
|
2015-03-09 23:45:18 +08:00
|
|
|
iniset $CINDER_CONF DEFAULT os_region_name "$REGION_NAME"
|
|
|
|
|
2014-07-03 10:46:57 -05:00
|
|
|
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
|
2014-07-25 12:37:41 -05:00
|
|
|
local enabled_backends=""
|
|
|
|
local default_name=""
|
|
|
|
local be be_name be_type
|
2014-07-03 10:46:57 -05:00
|
|
|
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
2014-07-25 12:37:41 -05:00
|
|
|
be_type=${be%%:*}
|
|
|
|
be_name=${be##*:}
|
|
|
|
if type configure_cinder_backend_${be_type} >/dev/null 2>&1; then
|
|
|
|
configure_cinder_backend_${be_type} ${be_name}
|
2014-07-03 10:46:57 -05:00
|
|
|
fi
|
2014-08-28 09:29:47 -05:00
|
|
|
if [[ -z "$default_name" ]]; then
|
|
|
|
default_name=$be_name
|
2014-07-03 10:46:57 -05:00
|
|
|
fi
|
2014-07-25 12:37:41 -05:00
|
|
|
enabled_backends+=$be_name,
|
2014-07-03 10:46:57 -05:00
|
|
|
done
|
|
|
|
iniset $CINDER_CONF DEFAULT enabled_backends ${enabled_backends%,*}
|
2014-07-25 13:35:53 -07:00
|
|
|
if [[ -n "$default_name" ]]; then
|
|
|
|
iniset $CINDER_CONF DEFAULT default_volume_type ${default_name}
|
2014-07-03 10:46:57 -05:00
|
|
|
fi
|
2016-05-03 17:34:00 -07:00
|
|
|
configure_cinder_image_volume_cache
|
2014-07-03 10:46:57 -05:00
|
|
|
fi
|
|
|
|
|
2014-03-09 18:36:42 +01:00
|
|
|
if is_service_enabled swift; then
|
2015-08-28 12:40:19 +02:00
|
|
|
iniset $CINDER_CONF DEFAULT backup_swift_url "$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/v1/AUTH_"
|
2014-03-09 18:36:42 +01:00
|
|
|
fi
|
|
|
|
|
2013-08-09 10:55:12 -04:00
|
|
|
if is_service_enabled ceilometer; then
|
2017-03-05 13:07:39 -05:00
|
|
|
iniset $CINDER_CONF oslo_messaging_notifications driver "messagingv2"
|
2013-08-09 10:55:12 -04:00
|
|
|
fi
|
|
|
|
|
2012-12-13 17:05:24 -06:00
|
|
|
if is_service_enabled tls-proxy; then
|
|
|
|
# Set the service port for a proxy to take the original
|
|
|
|
iniset $CINDER_CONF DEFAULT osapi_volume_listen_port $CINDER_SERVICE_PORT_INT
|
2015-05-26 15:33:45 -04:00
|
|
|
iniset $CINDER_CONF DEFAULT public_endpoint $CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT
|
2016-08-31 18:19:51 -07:00
|
|
|
iniset $CINDER_CONF DEFAULT osapi_volume_base_URL $CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT
|
2012-12-13 17:05:24 -06:00
|
|
|
fi
|
|
|
|
|
2012-11-06 20:38:14 -06:00
|
|
|
if [ "$SYSLOG" != "False" ]; then
|
|
|
|
iniset $CINDER_CONF DEFAULT use_syslog True
|
|
|
|
fi
|
|
|
|
|
2015-03-14 12:39:14 -05:00
|
|
|
iniset_rpc_backend cinder $CINDER_CONF
|
2012-08-06 11:15:36 -04:00
|
|
|
|
2015-10-29 09:48:17 -07:00
|
|
|
iniset $CINDER_CONF DEFAULT volume_clear $CINDER_VOLUME_CLEAR
|
2012-11-06 09:38:36 +01:00
|
|
|
|
2013-08-20 14:51:08 -07:00
|
|
|
# Format logging
|
2016-04-05 12:08:57 -04:00
|
|
|
setup_logging $CINDER_CONF $CINDER_USE_MOD_WSGI
|
2012-11-20 15:52:21 +00:00
|
|
|
|
2015-09-01 10:55:20 +03:00
|
|
|
if [ "$CINDER_USE_MOD_WSGI" == "True" ]; then
|
|
|
|
_cinder_config_apache_wsgi
|
|
|
|
fi
|
|
|
|
|
2014-01-23 11:31:10 -07:00
|
|
|
if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
|
|
|
|
configure_cinder_driver
|
2012-11-20 15:52:21 +00:00
|
|
|
fi
|
2013-06-26 22:31:48 +10:00
|
|
|
|
2014-09-16 17:25:33 -05:00
|
|
|
iniset $CINDER_CONF DEFAULT osapi_volume_workers "$API_WORKERS"
|
2014-03-19 17:47:42 -04:00
|
|
|
|
|
|
|
iniset $CINDER_CONF DEFAULT glance_api_servers "${GLANCE_SERVICE_PROTOCOL}://${GLANCE_HOSTPORT}"
|
|
|
|
if is_ssl_enabled_service glance || is_service_enabled tls-proxy; then
|
|
|
|
iniset $CINDER_CONF DEFAULT glance_protocol https
|
2014-10-21 18:17:48 -04:00
|
|
|
iniset $CINDER_CONF DEFAULT glance_ca_certificates_file $SSL_BUNDLE_FILE
|
2014-03-19 17:47:42 -04:00
|
|
|
fi
|
|
|
|
|
2016-05-11 12:49:07 -05:00
|
|
|
if [ "$GLANCE_V1_ENABLED" != "True" ]; then
|
|
|
|
iniset $CINDER_CONF DEFAULT glance_api_version 2
|
|
|
|
fi
|
|
|
|
|
2014-03-19 17:47:42 -04:00
|
|
|
# Register SSL certificates if provided
|
|
|
|
if is_ssl_enabled_service cinder; then
|
|
|
|
ensure_certificates CINDER
|
|
|
|
|
|
|
|
iniset $CINDER_CONF DEFAULT ssl_cert_file "$CINDER_SSL_CERT"
|
|
|
|
iniset $CINDER_CONF DEFAULT ssl_key_file "$CINDER_SSL_KEY"
|
|
|
|
fi
|
|
|
|
|
2015-05-11 16:51:10 +02:00
|
|
|
# Set os_privileged_user credentials (used for os-assisted-snapshots)
|
|
|
|
iniset $CINDER_CONF DEFAULT os_privileged_user_name nova
|
|
|
|
iniset $CINDER_CONF DEFAULT os_privileged_user_password "$SERVICE_PASSWORD"
|
2016-02-17 06:23:36 -05:00
|
|
|
iniset $CINDER_CONF DEFAULT os_privileged_user_tenant "$SERVICE_PROJECT_NAME"
|
2015-10-22 15:47:49 -04:00
|
|
|
iniset $CINDER_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
|
2016-12-01 16:11:17 +01:00
|
|
|
|
|
|
|
# Set the backend url according to the configured dlm backend
|
|
|
|
if is_dlm_enabled; then
|
|
|
|
if [[ "$(dlm_backend)" == "zookeeper" ]]; then
|
|
|
|
iniset $CINDER_CONF coordination backend_url "zookeeper://${SERVICE_HOST}:2181"
|
|
|
|
fi
|
|
|
|
fi
|
2012-05-02 11:48:15 -05:00
|
|
|
}
|
|
|
|
|
2012-12-13 16:22:38 -06:00
|
|
|
# create_cinder_accounts() - Set up common required cinder accounts
|
|
|
|
|
|
|
|
# Tenant User Roles
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
# service cinder admin # if enabled
|
|
|
|
|
|
|
|
# Migrated from keystone_data.sh
|
2014-02-21 15:35:08 +11:00
|
|
|
function create_cinder_accounts {
|
2012-12-13 16:22:38 -06:00
|
|
|
|
|
|
|
# Cinder
|
|
|
|
if [[ "$ENABLED_SERVICES" =~ "c-api" ]]; then
|
2014-02-28 14:15:19 +01:00
|
|
|
|
2015-02-10 20:38:56 +11:00
|
|
|
create_service_user "cinder"
|
2014-02-28 14:15:19 +01:00
|
|
|
|
2016-02-10 07:25:24 -05:00
|
|
|
get_or_create_service "cinder" "volume" "Cinder Volume Service"
|
2016-04-23 01:45:40 +00:00
|
|
|
get_or_create_endpoint \
|
2016-02-10 07:25:24 -05:00
|
|
|
"volume" \
|
|
|
|
"$REGION_NAME" \
|
2016-04-04 09:09:27 -04:00
|
|
|
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1/\$(project_id)s"
|
2016-02-10 07:25:24 -05:00
|
|
|
|
|
|
|
get_or_create_service "cinderv2" "volumev2" "Cinder Volume Service V2"
|
2016-04-23 01:45:40 +00:00
|
|
|
get_or_create_endpoint \
|
2016-02-10 07:25:24 -05:00
|
|
|
"volumev2" \
|
|
|
|
"$REGION_NAME" \
|
2016-04-04 09:09:27 -04:00
|
|
|
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s"
|
2016-04-01 13:18:32 -04:00
|
|
|
|
|
|
|
get_or_create_service "cinderv3" "volumev3" "Cinder Volume Service V3"
|
2016-04-23 01:45:40 +00:00
|
|
|
get_or_create_endpoint \
|
2016-04-01 13:18:32 -04:00
|
|
|
"volumev3" \
|
|
|
|
"$REGION_NAME" \
|
|
|
|
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s"
|
2016-05-03 17:34:00 -07:00
|
|
|
|
|
|
|
configure_cinder_internal_tenant
|
2012-12-13 16:22:38 -06:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-02-12 10:58:28 -06:00
|
|
|
# create_cinder_cache_dir() - Part of the init_cinder() process
|
2014-02-21 15:35:08 +11:00
|
|
|
function create_cinder_cache_dir {
|
2013-02-12 10:58:28 -06:00
|
|
|
# Create cache dir
|
2015-03-16 13:52:19 -05:00
|
|
|
sudo install -d -o $STACK_USER $CINDER_AUTH_CACHE_DIR
|
2013-02-12 10:58:28 -06:00
|
|
|
rm -f $CINDER_AUTH_CACHE_DIR/*
|
|
|
|
}
|
|
|
|
|
2012-05-02 11:48:15 -05:00
|
|
|
# init_cinder() - Initialize database and volume group
|
2014-02-21 15:35:08 +11:00
|
|
|
function init_cinder {
|
2012-11-01 16:12:39 -04:00
|
|
|
if is_service_enabled $DATABASE_BACKENDS; then
|
2013-02-12 10:58:28 -06:00
|
|
|
# (Re)create cinder database
|
2014-10-06 13:29:39 +02:00
|
|
|
recreate_database cinder
|
2012-05-02 11:48:15 -05:00
|
|
|
|
2013-02-12 10:58:28 -06:00
|
|
|
# Migrate cinder database
|
2016-05-04 08:14:01 +00:00
|
|
|
$CINDER_BIN_DIR/cinder-manage --config-file $CINDER_CONF db sync
|
2012-05-02 11:48:15 -05:00
|
|
|
fi
|
|
|
|
|
2014-07-03 10:46:57 -05:00
|
|
|
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
|
2014-07-25 12:37:41 -05:00
|
|
|
local be be_name be_type
|
2014-07-03 10:46:57 -05:00
|
|
|
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
2014-07-25 12:37:41 -05:00
|
|
|
be_type=${be%%:*}
|
|
|
|
be_name=${be##*:}
|
|
|
|
if type init_cinder_backend_${be_type} >/dev/null 2>&1; then
|
2015-01-27 17:44:44 +00:00
|
|
|
# Always init the default volume group for lvm.
|
|
|
|
if [[ "$be_type" == "lvm" ]]; then
|
|
|
|
init_default_lvm_volume_group
|
|
|
|
fi
|
2014-07-25 12:37:41 -05:00
|
|
|
init_cinder_backend_${be_type} ${be_name}
|
2012-06-14 08:51:01 +02:00
|
|
|
fi
|
2014-07-03 10:46:57 -05:00
|
|
|
done
|
2012-05-02 11:48:15 -05:00
|
|
|
fi
|
2012-10-01 14:06:44 -05:00
|
|
|
|
2014-07-03 10:46:57 -05:00
|
|
|
mkdir -p $CINDER_STATE_PATH/volumes
|
2013-02-12 10:58:28 -06:00
|
|
|
create_cinder_cache_dir
|
2012-05-02 11:48:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
# install_cinder() - Collect source and prepare
|
2014-02-21 15:35:08 +11:00
|
|
|
function install_cinder {
|
2012-05-02 11:48:15 -05:00
|
|
|
git_clone $CINDER_REPO $CINDER_DIR $CINDER_BRANCH
|
2013-04-01 16:41:39 -04:00
|
|
|
setup_develop $CINDER_DIR
|
2015-01-26 15:44:47 +01:00
|
|
|
if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then
|
|
|
|
if is_fedora; then
|
|
|
|
install_package scsi-target-utils
|
|
|
|
else
|
|
|
|
install_package tgt
|
|
|
|
fi
|
|
|
|
fi
|
2015-09-01 10:55:20 +03:00
|
|
|
|
|
|
|
if [ "$CINDER_USE_MOD_WSGI" == "True" ]; then
|
|
|
|
install_apache_wsgi
|
|
|
|
if is_ssl_enabled_service "c-api"; then
|
|
|
|
enable_mod_ssl
|
|
|
|
fi
|
|
|
|
fi
|
2013-04-01 18:23:22 -05:00
|
|
|
}
|
2013-04-01 16:41:39 -04:00
|
|
|
|
2013-04-01 18:23:22 -05:00
|
|
|
# install_cinderclient() - Collect source and prepare
|
2014-02-21 15:35:08 +11:00
|
|
|
function install_cinderclient {
|
2016-05-26 23:41:49 +03:00
|
|
|
if use_library_from_git "python-brick-cinderclient-ext"; then
|
|
|
|
git_clone_by_name "python-brick-cinderclient-ext"
|
|
|
|
setup_dev_lib "python-brick-cinderclient-ext"
|
|
|
|
fi
|
|
|
|
|
2014-11-13 17:09:28 -05:00
|
|
|
if use_library_from_git "python-cinderclient"; then
|
|
|
|
git_clone_by_name "python-cinderclient"
|
|
|
|
setup_dev_lib "python-cinderclient"
|
|
|
|
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-cinderclient"]}/tools/,/etc/bash_completion.d/}cinder.bash_completion
|
2014-11-01 01:37:45 +01:00
|
|
|
fi
|
2012-05-02 11:48:15 -05:00
|
|
|
}
|
|
|
|
|
2013-04-14 12:48:41 -07:00
|
|
|
# apply config.d approach for cinder volumes directory
|
2014-02-21 15:35:08 +11:00
|
|
|
function _configure_tgt_for_config_d {
|
2013-04-14 12:48:41 -07:00
|
|
|
if [[ ! -d /etc/tgt/stack.d/ ]]; then
|
|
|
|
sudo ln -sf $CINDER_STATE_PATH/volumes /etc/tgt/stack.d
|
2016-01-07 19:40:44 +01:00
|
|
|
fi
|
|
|
|
if ! grep -q "include /etc/tgt/stack.d/*" /etc/tgt/targets.conf; then
|
2013-04-14 12:48:41 -07:00
|
|
|
echo "include /etc/tgt/stack.d/*" | sudo tee -a /etc/tgt/targets.conf
|
2012-09-03 15:45:53 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-05-02 11:48:15 -05:00
|
|
|
# start_cinder() - Start running processes, including screen
|
2014-02-21 15:35:08 +11:00
|
|
|
function start_cinder {
|
2014-03-19 17:47:42 -04:00
|
|
|
local service_port=$CINDER_SERVICE_PORT
|
|
|
|
local service_protocol=$CINDER_SERVICE_PROTOCOL
|
|
|
|
if is_service_enabled tls-proxy; then
|
|
|
|
service_port=$CINDER_SERVICE_PORT_INT
|
|
|
|
service_protocol="http"
|
|
|
|
fi
|
2015-01-26 15:44:47 +01:00
|
|
|
if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then
|
|
|
|
if is_service_enabled c-vol; then
|
|
|
|
# Delete any old stack.conf
|
|
|
|
sudo rm -f /etc/tgt/conf.d/stack.conf
|
|
|
|
_configure_tgt_for_config_d
|
|
|
|
if is_ubuntu; then
|
|
|
|
sudo service tgt restart
|
2015-06-01 12:39:12 +02:00
|
|
|
elif is_suse; then
|
|
|
|
# NOTE(dmllr): workaround restart bug
|
|
|
|
# https://bugzilla.suse.com/show_bug.cgi?id=934642
|
|
|
|
stop_service tgtd
|
|
|
|
start_service tgtd
|
2015-01-26 15:44:47 +01:00
|
|
|
else
|
2015-06-01 12:39:12 +02:00
|
|
|
restart_service tgtd
|
2015-01-26 15:44:47 +01:00
|
|
|
fi
|
|
|
|
# NOTE(gfidente): ensure tgtd is running in debug mode
|
|
|
|
sudo tgtadm --mode system --op update --name debug --value on
|
2012-05-02 11:48:15 -05:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-09-01 10:55:20 +03:00
|
|
|
if [ "$CINDER_USE_MOD_WSGI" == "True" ]; then
|
|
|
|
enable_apache_site osapi-volume
|
|
|
|
restart_apache_server
|
|
|
|
tail_log c-api /var/log/$APACHE_NAME/c-api.log
|
|
|
|
else
|
|
|
|
run_process c-api "$CINDER_BIN_DIR/cinder-api --config-file $CINDER_CONF"
|
|
|
|
echo "Waiting for Cinder API to start..."
|
|
|
|
if ! wait_for_service $SERVICE_TIMEOUT $service_protocol://$CINDER_SERVICE_HOST:$service_port; then
|
|
|
|
die $LINENO "c-api did not start"
|
|
|
|
fi
|
2014-07-03 10:46:57 -05:00
|
|
|
fi
|
|
|
|
|
2014-08-27 14:13:58 -05:00
|
|
|
run_process c-sch "$CINDER_BIN_DIR/cinder-scheduler --config-file $CINDER_CONF"
|
|
|
|
run_process c-bak "$CINDER_BIN_DIR/cinder-backup --config-file $CINDER_CONF"
|
|
|
|
run_process c-vol "$CINDER_BIN_DIR/cinder-volume --config-file $CINDER_CONF"
|
2013-07-15 17:35:54 -06:00
|
|
|
|
|
|
|
# NOTE(jdg): For cinder, startup order matters. To ensure that repor_capabilities is received
|
|
|
|
# by the scheduler start the cinder-volume service last (or restart it) after the scheduler
|
|
|
|
# has started. This is a quick fix for lp bug/1189595
|
2012-12-13 17:05:24 -06:00
|
|
|
|
|
|
|
# Start proxies if enabled
|
|
|
|
if is_service_enabled c-api && is_service_enabled tls-proxy; then
|
2016-08-31 18:19:51 -07:00
|
|
|
start_tls_proxy cinder '*' $CINDER_SERVICE_PORT $CINDER_SERVICE_HOST $CINDER_SERVICE_PORT_INT
|
2012-12-13 17:05:24 -06:00
|
|
|
fi
|
2012-05-02 11:48:15 -05:00
|
|
|
}
|
|
|
|
|
2012-09-10 14:10:27 -05:00
|
|
|
# stop_cinder() - Stop running processes
|
2014-02-21 15:35:08 +11:00
|
|
|
function stop_cinder {
|
2015-09-01 10:55:20 +03:00
|
|
|
if [ "$CINDER_USE_MOD_WSGI" == "True" ]; then
|
|
|
|
disable_apache_site osapi-volume
|
|
|
|
restart_apache_server
|
|
|
|
else
|
|
|
|
stop_process c-api
|
|
|
|
fi
|
|
|
|
|
2012-09-10 14:10:27 -05:00
|
|
|
# Kill the cinder screen windows
|
2014-07-25 12:37:41 -05:00
|
|
|
local serv
|
2015-09-01 10:55:20 +03:00
|
|
|
for serv in c-bak c-sch c-vol; do
|
2014-09-09 13:46:02 +01:00
|
|
|
stop_process $serv
|
2012-09-10 14:10:27 -05:00
|
|
|
done
|
2012-05-02 11:48:15 -05:00
|
|
|
}
|
2012-09-13 17:16:12 -05:00
|
|
|
|
2014-07-03 10:46:57 -05:00
|
|
|
# create_volume_types() - Create Cinder's configured volume types
|
|
|
|
function create_volume_types {
|
|
|
|
# Create volume types
|
|
|
|
if is_service_enabled c-api && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
|
2015-05-29 08:33:03 +00:00
|
|
|
local be be_name
|
2014-07-03 10:46:57 -05:00
|
|
|
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
2014-07-25 12:37:41 -05:00
|
|
|
be_name=${be##*:}
|
2016-04-27 15:15:52 +03:00
|
|
|
openstack --os-region-name="$REGION_NAME" volume type create --property volume_backend_name="${be_name}" ${be_name}
|
2014-07-03 10:46:57 -05:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Compatibility for Grenade
|
|
|
|
|
|
|
|
function create_cinder_volume_group {
|
|
|
|
# During a transition period Grenade needs to have this function defined
|
|
|
|
# It is effectively a no-op in the Grenade 'target' use case
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|
2016-05-03 17:34:00 -07:00
|
|
|
function configure_cinder_internal_tenant {
|
|
|
|
# Re-use the Cinder service account for simplicity.
|
|
|
|
iniset $CINDER_CONF DEFAULT cinder_internal_tenant_project_id $(get_or_create_project $SERVICE_PROJECT_NAME)
|
|
|
|
iniset $CINDER_CONF DEFAULT cinder_internal_tenant_user_id $(get_or_create_user "cinder")
|
|
|
|
}
|
|
|
|
|
|
|
|
function configure_cinder_image_volume_cache {
|
|
|
|
# Expect CINDER_CACHE_ENABLED_FOR_BACKENDS to be a list of backends
|
|
|
|
# similar to CINDER_ENABLED_BACKENDS with NAME:TYPE where NAME will
|
|
|
|
# be the backend specific configuration stanza in cinder.conf.
|
|
|
|
for be in ${CINDER_CACHE_ENABLED_FOR_BACKENDS//,/ }; do
|
|
|
|
local be_name=${be##*:}
|
|
|
|
|
|
|
|
iniset $CINDER_CONF $be_name image_volume_cache_enabled $CINDER_IMG_CACHE_ENABLED
|
|
|
|
|
|
|
|
if [[ -n $CINDER_IMG_CACHE_SIZE_GB ]]; then
|
|
|
|
iniset $CINDER_CONF $be_name image_volume_cache_max_size_gb $CINDER_IMG_CACHE_SIZE_GB
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -n $CINDER_IMG_CACHE_SIZE_COUNT ]]; then
|
|
|
|
iniset $CINDER_CONF $be_name image_volume_cache_max_count $CINDER_IMG_CACHE_SIZE_COUNT
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2013-04-08 15:38:03 -05:00
|
|
|
|
2012-09-13 17:16:12 -05:00
|
|
|
# Restore xtrace
|
2015-10-13 11:03:03 +11:00
|
|
|
$_XTRACE_CINDER
|
2013-03-29 14:34:53 -04:00
|
|
|
|
2013-10-24 11:27:02 +01:00
|
|
|
# Tell emacs to use shell-script-mode
|
|
|
|
## Local variables:
|
|
|
|
## mode: shell-script
|
|
|
|
## End:
|