Merge "Use stevedore for keystone backends"
diff --git a/MAINTAINERS.rst b/MAINTAINERS.rst
index 20e8655..d3e8c67 100644
--- a/MAINTAINERS.rst
+++ b/MAINTAINERS.rst
@@ -75,12 +75,6 @@
Tempest
~~~~~~~
-Trove
-~~~~~
-
-* Nikhil Manchanda <SlickNik@gmail.com>
-* Michael Basnight <mbasnight@gmail.com>
-
Xen
~~~
* Bob Ball <bob.ball@citrix.com>
diff --git a/README.md b/README.md
index 9853c3d..455e1c6 100644
--- a/README.md
+++ b/README.md
@@ -332,7 +332,7 @@
You likely want to change your `localrc` section to run a scheduler that
will balance VMs across hosts:
- SCHEDULER=nova.scheduler.simple.SimpleScheduler
+ SCHEDULER=nova.scheduler.filter_scheduler.FilterScheduler
You can then run many compute nodes, each of which should have a `stackrc`
which includes the following, with the IP address of the above controller node:
diff --git a/clean.sh b/clean.sh
index 7db519b..c31a65f 100755
--- a/clean.sh
+++ b/clean.sh
@@ -51,7 +51,6 @@
source $TOP_DIR/lib/heat
source $TOP_DIR/lib/neutron-legacy
source $TOP_DIR/lib/ironic
-source $TOP_DIR/lib/trove
# Extras Source
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 4435b49..e0c3f3a 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -173,7 +173,6 @@
* `lib/swift <lib/swift.html>`__
* `lib/tempest <lib/tempest.html>`__
* `lib/tls <lib/tls.html>`__
-* `lib/trove <lib/trove.html>`__
* `lib/zaqar <lib/zaqar.html>`__
* `unstack.sh <unstack.sh.html>`__
* `clean.sh <clean.sh.html>`__
@@ -182,7 +181,6 @@
* `extras.d/50-ironic.sh <extras.d/50-ironic.sh.html>`__
* `extras.d/60-ceph.sh <extras.d/60-ceph.sh.html>`__
* `extras.d/70-sahara.sh <extras.d/70-sahara.sh.html>`__
-* `extras.d/70-trove.sh <extras.d/70-trove.sh.html>`__
* `extras.d/70-tuskar.sh <extras.d/70-tuskar.sh.html>`__
* `extras.d/70-zaqar.sh <extras.d/70-zaqar.sh.html>`__
* `extras.d/80-tempest.sh <extras.d/80-tempest.sh.html>`__
@@ -242,6 +240,5 @@
* `exercises/sahara.sh <exercises/sahara.sh.html>`__
* `exercises/sec\_groups.sh <exercises/sec_groups.sh.html>`__
* `exercises/swift.sh <exercises/swift.sh.html>`__
-* `exercises/trove.sh <exercises/trove.sh.html>`__
* `exercises/volumes.sh <exercises/volumes.sh.html>`__
* `exercises/zaqar.sh <exercises/zaqar.sh.html>`__
diff --git a/extras.d/70-trove.sh b/extras.d/70-trove.sh
deleted file mode 100644
index f284354..0000000
--- a/extras.d/70-trove.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-# trove.sh - Devstack extras script to install Trove
-
-if is_service_enabled trove; then
- if [[ "$1" == "source" ]]; then
- # Initial source
- source $TOP_DIR/lib/trove
- elif [[ "$1" == "stack" && "$2" == "install" ]]; then
- echo_summary "Installing Trove"
- install_trove
- install_troveclient
- cleanup_trove
- elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
- echo_summary "Configuring Trove"
- configure_trove
-
- if is_service_enabled key; then
- create_trove_accounts
- fi
-
- elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
- # Initialize trove
- init_trove
-
- # Start the trove API and trove taskmgr components
- echo_summary "Starting Trove"
- start_trove
- fi
-
- if [[ "$1" == "unstack" ]]; then
- stop_trove
- fi
-fi
diff --git a/functions-common b/functions-common
index 4d07c03..52d80fb 100644
--- a/functions-common
+++ b/functions-common
@@ -51,14 +51,16 @@
function trueorfalse {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
- local default=$1
- local literal=$2
- local testval=${!literal:-}
- [[ -z "$testval" ]] && { echo "$default"; return; }
- [[ "0 no No NO false False FALSE" =~ "$testval" ]] && { echo "False"; return; }
- [[ "1 yes Yes YES true True TRUE" =~ "$testval" ]] && { echo "True"; return; }
- echo "$default"
+ local default=$1
+ local testval=${!2:-}
+
+ case "$testval" in
+ "1" | [yY]es | "YES" | [tT]rue | "TRUE" ) echo "True" ;;
+ "0" | [nN]o | "NO" | [fF]alse | "FALSE" ) echo "False" ;;
+ * ) echo "$default" ;;
+ esac
+
$xtrace
}
@@ -1897,6 +1899,12 @@
echo $subnet
}
+# Return the current python as "python<major>.<minor>"
+function python_version {
+ local python_version=$(python -c 'import sys; print("%s.%s" % sys.version_info[0:2])')
+ echo "python${python_version}"
+}
+
# Service wrapper to restart services
# restart_service service-name
function restart_service {
diff --git a/lib/cinder b/lib/cinder
index eb0e1d7..7ad7ef9 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -299,6 +299,11 @@
iniset $CINDER_CONF DEFAULT ssl_key_file "$CINDER_SSL_KEY"
fi
+ # 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"
+ iniset $CINDER_CONF DEFAULT os_privileged_user_tenant "$SERVICE_TENANT_NAME"
+
}
# create_cinder_accounts() - Set up common required cinder accounts
diff --git a/lib/glance b/lib/glance
index f543e54..4e1bd24 100644
--- a/lib/glance
+++ b/lib/glance
@@ -138,26 +138,12 @@
fi
# Store specific configs
- iniset $GLANCE_API_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
-
- # NOTE(flaper87): Until Glance is fully migrated, set these configs in both
- # sections.
iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
iniset $GLANCE_API_CONF DEFAULT workers "$API_WORKERS"
# Store the images in swift if enabled.
if is_service_enabled s-proxy; then
- iniset $GLANCE_API_CONF DEFAULT default_store swift
- iniset $GLANCE_API_CONF DEFAULT swift_store_auth_address $KEYSTONE_SERVICE_URI/v2.0/
- iniset $GLANCE_API_CONF DEFAULT swift_store_user $SERVICE_TENANT_NAME:glance-swift
- iniset $GLANCE_API_CONF DEFAULT swift_store_key $SERVICE_PASSWORD
- iniset $GLANCE_API_CONF DEFAULT swift_store_create_container_on_put True
-
- iniset $GLANCE_API_CONF DEFAULT known_stores "glance.store.filesystem.Store, glance.store.http.Store, glance.store.swift.Store"
-
- # NOTE(flaper87): Until Glance is fully migrated, set these configs in both
- # sections.
iniset $GLANCE_API_CONF glance_store default_store swift
iniset $GLANCE_API_CONF glance_store swift_store_auth_address $KEYSTONE_SERVICE_URI/v2.0/
iniset $GLANCE_API_CONF glance_store swift_store_user $SERVICE_TENANT_NAME:glance-swift
@@ -211,9 +197,6 @@
iniset $GLANCE_CACHE_CONF DEFAULT admin_password $SERVICE_PASSWORD
# Store specific confs
- # NOTE(flaper87): Until Glance is fully migrated, set these configs in both
- # sections.
- iniset $GLANCE_CACHE_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
iniset $GLANCE_CACHE_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
cp -p $GLANCE_DIR/etc/policy.json $GLANCE_POLICY_JSON
diff --git a/lib/keystone b/lib/keystone
index 976aad0..02c23be 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -158,7 +158,7 @@
keystone_auth_port=$KEYSTONE_AUTH_PORT_INT
fi
if [[ ${USE_VENV} = True ]]; then
- venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/python2.7/site-packages"
+ venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/$(python_version)/site-packages"
fi
# copy proxy vhost and wsgi file
diff --git a/lib/nova b/lib/nova
index 768346a..7d2145b 100644
--- a/lib/nova
+++ b/lib/nova
@@ -259,7 +259,7 @@
nova_keyfile="SSLCertificateKeyFile $NOVA_SSL_KEY"
fi
if [[ ${USE_VENV} = True ]]; then
- venv_path="python-path=${PROJECT_VENV["nova"]}/lib/python2.7/site-packages"
+ venv_path="python-path=${PROJECT_VENV["nova"]}/lib/$(python_version)/site-packages"
fi
# copy proxy vhost and wsgi helper files
@@ -460,7 +460,6 @@
iniset $NOVA_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
if [ "$NOVA_ALLOW_MOVE_TO_SAME_HOST" == "True" ]; then
iniset $NOVA_CONF DEFAULT allow_resize_to_same_host "True"
- iniset $NOVA_CONF DEFAULT allow_migrate_to_same_host "True"
fi
iniset $NOVA_CONF DEFAULT api_paste_config "$NOVA_API_PASTE_INI"
iniset $NOVA_CONF DEFAULT rootwrap_config "$NOVA_CONF_DIR/rootwrap.conf"
diff --git a/lib/swift b/lib/swift
index 456dde4..820042d 100644
--- a/lib/swift
+++ b/lib/swift
@@ -439,7 +439,7 @@
if is_service_enabled swift3; then
cat <<EOF >>${SWIFT_CONFIG_PROXY_SERVER}
[filter:s3token]
-paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
+paste.filter_factory = keystonemiddleware.s3_token:filter_factory
auth_port = ${KEYSTONE_AUTH_PORT}
auth_host = ${KEYSTONE_AUTH_HOST}
auth_protocol = ${KEYSTONE_AUTH_PROTOCOL}
diff --git a/lib/tempest b/lib/tempest
index 6ce245a..9c22716 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -106,6 +106,10 @@
pip_install_gr testrepository
fi
+ # Used during configuration so make sure we have the correct
+ # version installed
+ pip_install_gr python-openstackclient
+
local image_lines
local images
local num_images
@@ -340,7 +344,9 @@
iniset $TEMPEST_CONFIG compute flavor_ref $flavor_ref
iniset $TEMPEST_CONFIG compute flavor_ref_alt $flavor_ref_alt
iniset $TEMPEST_CONFIG compute ssh_connect_method $ssh_connect_method
- iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME
+ if ! is_service_enabled n-cell; then
+ iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME
+ fi
# Compute Features
# Run ``verify_tempest_config -ur`` to retrieve enabled extensions on API endpoints
diff --git a/lib/trove b/lib/trove
deleted file mode 100644
index b0a9610..0000000
--- a/lib/trove
+++ /dev/null
@@ -1,252 +0,0 @@
-#!/bin/bash
-#
-# lib/trove
-# Functions to control the configuration and operation of the **Trove** service
-
-# Dependencies:
-# ``functions`` file
-# ``DEST``, ``STACK_USER`` must be defined
-# ``SERVICE_{HOST|PROTOCOL|TOKEN}`` must be defined
-
-# ``stack.sh`` calls the entry points in this order:
-#
-# install_trove
-# configure_trove
-# init_trove
-# start_trove
-# stop_trove
-# cleanup_trove
-
-# Save trace setting
-XTRACE=$(set +o | grep xtrace)
-set +o xtrace
-
-
-# Defaults
-# --------
-if is_service_enabled neutron; then
- TROVE_HOST_GATEWAY=${PUBLIC_NETWORK_GATEWAY:-172.24.4.1}
-else
- TROVE_HOST_GATEWAY=${NETWORK_GATEWAY:-10.0.0.1}
-fi
-
-# Set up default configuration
-GITDIR["python-troveclient"]=$DEST/python-troveclient
-
-TROVE_DIR=$DEST/trove
-TROVE_CONF_DIR=${TROVE_CONF_DIR:-/etc/trove}
-TROVE_CONF=${TROVE_CONF:-$TROVE_CONF_DIR/trove.conf}
-TROVE_TASKMANAGER_CONF=${TROVE_TASKMANAGER_CONF:-$TROVE_CONF_DIR/trove-taskmanager.conf}
-TROVE_CONDUCTOR_CONF=${TROVE_CONDUCTOR_CONF:-$TROVE_CONF_DIR/trove-conductor.conf}
-TROVE_GUESTAGENT_CONF=${TROVE_GUESTAGENT_CONF:-$TROVE_CONF_DIR/trove-guestagent.conf}
-TROVE_API_PASTE_INI=${TROVE_API_PASTE_INI:-$TROVE_CONF_DIR/api-paste.ini}
-
-TROVE_LOCAL_CONF_DIR=$TROVE_DIR/etc/trove
-TROVE_LOCAL_API_PASTE_INI=$TROVE_LOCAL_CONF_DIR/api-paste.ini
-TROVE_AUTH_CACHE_DIR=${TROVE_AUTH_CACHE_DIR:-/var/cache/trove}
-TROVE_DATASTORE_TYPE=${TROVE_DATASTORE_TYPE:-"mysql"}
-TROVE_DATASTORE_VERSION=${TROVE_DATASTORE_VERSION:-"5.6"}
-TROVE_DATASTORE_PACKAGE=${TROVE_DATASTORE_PACKAGE:-"mysql-server-5.6"}
-
-# Support entry points installation of console scripts
-if [[ -d $TROVE_DIR/bin ]]; then
- TROVE_BIN_DIR=$TROVE_DIR/bin
-else
- TROVE_BIN_DIR=$(get_python_exec_prefix)
-fi
-TROVE_MANAGE=$TROVE_BIN_DIR/trove-manage
-
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,trove
-
-
-# Functions
-# ---------
-
-# Test if any Trove services are enabled
-# is_trove_enabled
-function is_trove_enabled {
- [[ ,${ENABLED_SERVICES} =~ ,"tr-" ]] && return 0
- return 1
-}
-
-# setup_trove_logging() - Adds logging configuration to conf files
-function setup_trove_logging {
- local CONF=$1
- iniset $CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
- iniset $CONF DEFAULT use_syslog $SYSLOG
- if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then
- # Add color to logging output
- setup_colorized_logging $CONF DEFAULT tenant user
- fi
-}
-
-# create_trove_accounts() - Set up common required Trove accounts
-
-# Tenant User Roles
-# ------------------------------------------------------------------
-# service trove admin # if enabled
-
-function create_trove_accounts {
- if [[ "$ENABLED_SERVICES" =~ "trove" ]]; then
-
- create_service_user "trove"
-
- if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
-
- local trove_service=$(get_or_create_service "trove" \
- "database" "Trove Service")
- get_or_create_endpoint $trove_service \
- "$REGION_NAME" \
- "http://$SERVICE_HOST:8779/v1.0/\$(tenant_id)s" \
- "http://$SERVICE_HOST:8779/v1.0/\$(tenant_id)s" \
- "http://$SERVICE_HOST:8779/v1.0/\$(tenant_id)s"
- fi
- fi
-}
-
-# stack.sh entry points
-# ---------------------
-
-# cleanup_trove() - Remove residual data files, anything left over from previous
-# runs that a clean run would need to clean up
-function cleanup_trove {
- #Clean up dirs
- rm -fr $TROVE_AUTH_CACHE_DIR/*
- rm -fr $TROVE_CONF_DIR/*
-}
-
-# configure_trove() - Set config files, create data dirs, etc
-function configure_trove {
- setup_develop $TROVE_DIR
-
- # Create the trove conf dir and cache dirs if they don't exist
- sudo install -d -o $STACK_USER ${TROVE_CONF_DIR} ${TROVE_AUTH_CACHE_DIR}
-
- # Copy api-paste file over to the trove conf dir
- cp $TROVE_LOCAL_API_PASTE_INI $TROVE_API_PASTE_INI
-
- # (Re)create trove conf files
- rm -f $TROVE_CONF
- rm -f $TROVE_TASKMANAGER_CONF
- rm -f $TROVE_CONDUCTOR_CONF
-
- iniset $TROVE_CONF DEFAULT rabbit_userid $RABBIT_USERID
- iniset $TROVE_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
- iniset $TROVE_CONF database connection `database_connection_url trove`
- iniset $TROVE_CONF DEFAULT default_datastore $TROVE_DATASTORE_TYPE
- setup_trove_logging $TROVE_CONF
- iniset $TROVE_CONF DEFAULT trove_api_workers "$API_WORKERS"
-
- configure_auth_token_middleware $TROVE_CONF trove $TROVE_AUTH_CACHE_DIR
-
- # (Re)create trove taskmanager conf file if needed
- if is_service_enabled tr-tmgr; then
- TROVE_AUTH_ENDPOINT=$KEYSTONE_AUTH_URI/v$IDENTITY_API_VERSION
-
- iniset $TROVE_TASKMANAGER_CONF DEFAULT rabbit_userid $RABBIT_USERID
- iniset $TROVE_TASKMANAGER_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
- iniset $TROVE_TASKMANAGER_CONF database connection `database_connection_url trove`
- iniset $TROVE_TASKMANAGER_CONF DEFAULT taskmanager_manager trove.taskmanager.manager.Manager
- iniset $TROVE_TASKMANAGER_CONF DEFAULT nova_proxy_admin_user radmin
- iniset $TROVE_TASKMANAGER_CONF DEFAULT nova_proxy_admin_tenant_name trove
- iniset $TROVE_TASKMANAGER_CONF DEFAULT nova_proxy_admin_pass $RADMIN_USER_PASS
- iniset $TROVE_TASKMANAGER_CONF DEFAULT trove_auth_url $TROVE_AUTH_ENDPOINT
- setup_trove_logging $TROVE_TASKMANAGER_CONF
- fi
-
- # (Re)create trove conductor conf file if needed
- if is_service_enabled tr-cond; then
- iniset $TROVE_CONDUCTOR_CONF DEFAULT rabbit_userid $RABBIT_USERID
- iniset $TROVE_CONDUCTOR_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
- iniset $TROVE_CONDUCTOR_CONF database connection `database_connection_url trove`
- iniset $TROVE_CONDUCTOR_CONF DEFAULT nova_proxy_admin_user radmin
- iniset $TROVE_CONDUCTOR_CONF DEFAULT nova_proxy_admin_tenant_name trove
- iniset $TROVE_CONDUCTOR_CONF DEFAULT nova_proxy_admin_pass $RADMIN_USER_PASS
- iniset $TROVE_CONDUCTOR_CONF DEFAULT trove_auth_url $TROVE_AUTH_ENDPOINT
- iniset $TROVE_CONDUCTOR_CONF DEFAULT control_exchange trove
- setup_trove_logging $TROVE_CONDUCTOR_CONF
- fi
-
- # Set up Guest Agent conf
- iniset $TROVE_GUESTAGENT_CONF DEFAULT rabbit_userid $RABBIT_USERID
- iniset $TROVE_GUESTAGENT_CONF DEFAULT rabbit_host $TROVE_HOST_GATEWAY
- iniset $TROVE_GUESTAGENT_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
- iniset $TROVE_GUESTAGENT_CONF DEFAULT nova_proxy_admin_user radmin
- iniset $TROVE_GUESTAGENT_CONF DEFAULT nova_proxy_admin_tenant_name trove
- iniset $TROVE_GUESTAGENT_CONF DEFAULT nova_proxy_admin_pass $RADMIN_USER_PASS
- iniset $TROVE_GUESTAGENT_CONF DEFAULT trove_auth_url $TROVE_AUTH_ENDPOINT
- iniset $TROVE_GUESTAGENT_CONF DEFAULT control_exchange trove
- iniset $TROVE_GUESTAGENT_CONF DEFAULT ignore_users os_admin
- iniset $TROVE_GUESTAGENT_CONF DEFAULT log_dir /var/log/trove/
- iniset $TROVE_GUESTAGENT_CONF DEFAULT log_file trove-guestagent.log
- setup_trove_logging $TROVE_GUESTAGENT_CONF
-}
-
-# install_troveclient() - Collect source and prepare
-function install_troveclient {
- if use_library_from_git "python-troveclient"; then
- git_clone_by_name "python-troveclient"
- setup_dev_lib "python-troveclient"
- fi
-}
-
-# install_trove() - Collect source and prepare
-function install_trove {
- git_clone $TROVE_REPO $TROVE_DIR $TROVE_BRANCH
-}
-
-# init_trove() - Initializes Trove Database as a Service
-function init_trove {
- # (Re)Create trove db
- recreate_database trove
-
- # Initialize the trove database
- $TROVE_MANAGE db_sync
-
- # If no guest image is specified, skip remaining setup
- [ -z "$TROVE_GUEST_IMAGE_URL" ] && return 0
-
- # Find the glance id for the trove guest image
- # The image is uploaded by stack.sh -- see $IMAGE_URLS handling
- GUEST_IMAGE_NAME=$(basename "$TROVE_GUEST_IMAGE_URL")
- GUEST_IMAGE_NAME=${GUEST_IMAGE_NAME%.*}
- TROVE_GUEST_IMAGE_ID=$(openstack --os-token $TOKEN --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image list | grep "${GUEST_IMAGE_NAME}" | get_field 1)
- if [ -z "$TROVE_GUEST_IMAGE_ID" ]; then
- # If no glance id is found, skip remaining setup
- echo "Datastore ${TROVE_DATASTORE_TYPE} will not be created: guest image ${GUEST_IMAGE_NAME} not found."
- return 1
- fi
-
- # Now that we have the guest image id, initialize appropriate datastores / datastore versions
- $TROVE_MANAGE datastore_update "$TROVE_DATASTORE_TYPE" ""
- $TROVE_MANAGE datastore_version_update "$TROVE_DATASTORE_TYPE" "$TROVE_DATASTORE_VERSION" "$TROVE_DATASTORE_TYPE" \
- "$TROVE_GUEST_IMAGE_ID" "$TROVE_DATASTORE_PACKAGE" 1
- $TROVE_MANAGE datastore_version_update "$TROVE_DATASTORE_TYPE" "inactive_version" "inactive_manager" "$TROVE_GUEST_IMAGE_ID" "" 0
- $TROVE_MANAGE datastore_update "$TROVE_DATASTORE_TYPE" "$TROVE_DATASTORE_VERSION"
- $TROVE_MANAGE datastore_update "Inactive_Datastore" ""
-}
-
-# start_trove() - Start running processes, including screen
-function start_trove {
- run_process tr-api "$TROVE_BIN_DIR/trove-api --config-file=$TROVE_CONF --debug"
- run_process tr-tmgr "$TROVE_BIN_DIR/trove-taskmanager --config-file=$TROVE_TASKMANAGER_CONF --debug"
- run_process tr-cond "$TROVE_BIN_DIR/trove-conductor --config-file=$TROVE_CONDUCTOR_CONF --debug"
-}
-
-# stop_trove() - Stop running processes
-function stop_trove {
- # Kill the trove screen windows
- local serv
- for serv in tr-api tr-tmgr tr-cond; do
- stop_process $serv
- done
-}
-
-# Restore xtrace
-$XTRACE
-
-# Tell emacs to use shell-script-mode
-## Local variables:
-## mode: shell-script
-## End:
diff --git a/stack.sh b/stack.sh
index f0aafaf..f20af21 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1213,13 +1213,6 @@
elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then
NM_CONF=${NOVA_CONF}
if is_service_enabled n-cell; then
- # Both cells should have the same network uuid for server create
- if [[ ! "$NETWORK_CREATE_ARGS" =~ "--uuid" ]]; then
- NETWORK_CREATE_ARGS="$NETWORK_CREATE_ARGS --uuid $(uuidgen)"
- fi
- # Create a small network in the API cell
- $NOVA_BIN_DIR/nova-manage --config-file $NM_CONF network create "$PRIVATE_NETWORK_NAME" $FIXED_RANGE 1 $FIXED_NETWORK_SIZE $NETWORK_CREATE_ARGS
- # Everything else should go in the child cell
NM_CONF=${NOVA_CELLS_CONF}
fi
diff --git a/stackrc b/stackrc
index 3c08b15..938a09a 100644
--- a/stackrc
+++ b/stackrc
@@ -231,11 +231,6 @@
SWIFT_REPO=${SWIFT_REPO:-${GIT_BASE}/openstack/swift.git}
SWIFT_BRANCH=${SWIFT_BRANCH:-master}
-# trove service
-TROVE_REPO=${TROVE_REPO:-${GIT_BASE}/openstack/trove.git}
-TROVE_BRANCH=${TROVE_BRANCH:-master}
-
-
##############
#
# Testing Components
@@ -301,10 +296,6 @@
GITREPO["python-swiftclient"]=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git}
GITBRANCH["python-swiftclient"]=${SWIFTCLIENT_BRANCH:-master}
-# trove client library test
-GITREPO["python-troveclient"]=${TROVECLIENT_REPO:-${GIT_BASE}/openstack/python-troveclient.git}
-GITBRANCH["python-troveclient"]=${TROVECLIENT_BRANCH:-master}
-
# consolidated openstack python client
GITREPO["python-openstackclient"]=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
GITBRANCH["python-openstackclient"]=${OPENSTACKCLIENT_BRANCH:-master}
@@ -577,16 +568,15 @@
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz"};;
esac
-# Trove needs a custom image for its work
-if [[ "$ENABLED_SERVICES" =~ 'tr-api' ]]; then
- case "$VIRT_DRIVER" in
- libvirt|ironic|xenapi)
- TROVE_GUEST_IMAGE_URL=${TROVE_GUEST_IMAGE_URL:-"http://tarballs.openstack.org/trove/images/ubuntu/mysql.qcow2"}
- IMAGE_URLS+=",${TROVE_GUEST_IMAGE_URL}"
- ;;
- *)
- ;;
- esac
+# Staging Area for New Images, have them here for at least 24hrs for nodepool
+# to cache them otherwise the failure rates in the gate are too high
+PRECACHE_IMAGES=$(trueorfalse False PRECACHE_IMAGES)
+if [[ "$PRECACHE_IMAGES" == "True" ]]; then
+
+ IMAGE_URL="http://tarballs.openstack.org/trove/images/ubuntu/mysql.qcow2"
+ if ! [[ "$IMAGE_URLS" =~ "$IMAGE_URL" ]]; then
+ IMAGE_URLS+=",$IMAGE_URL"
+ fi
fi
# 10Gb default volume backing file size
diff --git a/tests/test_libs_from_pypi.sh b/tests/test_libs_from_pypi.sh
index 0bec584..8210d0a 100755
--- a/tests/test_libs_from_pypi.sh
+++ b/tests/test_libs_from_pypi.sh
@@ -29,7 +29,7 @@
fi
done
-ALL_LIBS="python-novaclient oslo.config pbr oslo.context python-troveclient"
+ALL_LIBS="python-novaclient oslo.config pbr oslo.context"
ALL_LIBS+=" python-keystoneclient taskflow oslo.middleware pycadf"
ALL_LIBS+=" python-glanceclient python-ironicclient tempest-lib"
ALL_LIBS+=" oslo.messaging oslo.log cliff python-heatclient stevedore"
diff --git a/tests/test_truefalse.sh b/tests/test_truefalse.sh
index e57948a..ebd9650 100755
--- a/tests/test_truefalse.sh
+++ b/tests/test_truefalse.sh
@@ -8,27 +8,36 @@
source $TOP/functions
source $TOP/tests/unittest.sh
-function test_truefalse {
+function test_trueorfalse {
local one=1
local captrue=True
local lowtrue=true
- local abrevtrue=t
+ local uppertrue=TRUE
+ local capyes=Yes
+ local lowyes=yes
+ local upperyes=YES
+
+ for default in True False; do
+ for name in one captrue lowtrue uppertrue capyes lowyes upperyes; do
+ assert_equal "True" $(trueorfalse $default $name) "\$(trueorfalse $default $name)"
+ done
+ done
+
local zero=0
local capfalse=False
local lowfalse=false
- local abrevfalse=f
- for against in True False; do
- for name in one captrue lowtrue abrevtrue; do
- assert_equal "True" $(trueorfalse $against $name) "\$(trueorfalse $against $name)"
- done
- done
- for against in True False; do
- for name in zero capfalse lowfalse abrevfalse; do
- assert_equal "False" $(trueorfalse $against $name) "\$(trueorfalse $against $name)"
+ local upperfalse=FALSE
+ local capno=No
+ local lowno=no
+ local upperno=NO
+
+ for default in True False; do
+ for name in zero capfalse lowfalse upperfalse capno lowno upperno; do
+ assert_equal "False" $(trueorfalse $default $name) "\$(trueorfalse $default $name)"
done
done
}
-test_truefalse
+test_trueorfalse
report_results
diff --git a/tools/worlddump.py b/tools/worlddump.py
index cb32510..d846f10 100755
--- a/tools/worlddump.py
+++ b/tools/worlddump.py
@@ -18,6 +18,7 @@
import argparse
import datetime
+import fnmatch
import os
import os.path
import sys
@@ -41,12 +42,24 @@
print "WARN: %s" % msg
+def _dump_cmd(cmd):
+ print cmd
+ print "-" * len(cmd)
+ print
+ print os.popen(cmd).read()
+
+
+def _header(name):
+ print
+ print name
+ print "=" * len(name)
+ print
+
+
def disk_space():
# the df output
- print """
-File System Summary
-===================
-"""
+ _header("File System Summary")
+
dfraw = os.popen("df -Ph").read()
df = [s.split() for s in dfraw.splitlines()]
for fs in df:
@@ -63,22 +76,34 @@
def iptables_dump():
tables = ['filter', 'nat', 'mangle']
- print """
-IP Tables Dump
-===============
-"""
+ _header("IP Tables Dump")
+
for table in tables:
- print os.popen("sudo iptables --line-numbers -L -nv -t %s"
- % table).read()
+ _dump_cmd("sudo iptables --line-numbers -L -nv -t %s" % table)
+
+
+def network_dump():
+ _header("Network Dump")
+
+ _dump_cmd("brctl show")
+ _dump_cmd("arp -n")
+ _dump_cmd("ip addr")
+ _dump_cmd("ip link")
+ _dump_cmd("ip route")
def process_list():
- print """
-Process Listing
-===============
-"""
- psraw = os.popen("ps axo user,ppid,pid,pcpu,pmem,vsz,rss,tty,stat,start,time,args").read()
- print psraw
+ _header("Process Listing")
+ _dump_cmd("ps axo "
+ "user,ppid,pid,pcpu,pmem,vsz,rss,tty,stat,start,time,args")
+
+
+def compute_consoles():
+ _header("Compute consoles")
+ for root, dirnames, filenames in os.walk('/opt/stack'):
+ for filename in fnmatch.filter(filenames, 'console.log'):
+ fullpath = os.path.join(root, filename)
+ _dump_cmd("sudo cat %s" % fullpath)
def main():
@@ -90,7 +115,9 @@
os.dup2(f.fileno(), sys.stdout.fileno())
disk_space()
process_list()
+ network_dump()
iptables_dump()
+ compute_consoles()
if __name__ == '__main__':
diff --git a/unstack.sh b/unstack.sh
index ed7e617..f0da971 100755
--- a/unstack.sh
+++ b/unstack.sh
@@ -173,10 +173,6 @@
cleanup_neutron
fi
-if is_service_enabled trove; then
- cleanup_trove
-fi
-
if is_service_enabled dstat; then
stop_dstat
fi