Merge "Fix SIGITIN hang with apt-get"
diff --git a/doc/source/guides/devstack-with-lbaas-v2.rst b/doc/source/guides/devstack-with-lbaas-v2.rst
index f3bd2fe..d79e0f8 100644
--- a/doc/source/guides/devstack-with-lbaas-v2.rst
+++ b/doc/source/guides/devstack-with-lbaas-v2.rst
@@ -46,7 +46,7 @@
# Horizon
ENABLED_SERVICES+=,horizon
# Nova
- ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch
+ ENABLED_SERVICES+=,n-api,n-crt,n-cpu,n-cond,n-sch
# Glance
ENABLED_SERVICES+=,g-api,g-reg
# Neutron
diff --git a/doc/source/stackrc.rst b/doc/source/stackrc.rst
index b21f74f..81d4b80 100644
--- a/doc/source/stackrc.rst
+++ b/doc/source/stackrc.rst
@@ -20,7 +20,7 @@
::
- ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,c-sch,c-api,c-vol,n-sch,n-cauth,horizon,rabbit,tempest,$DATABASE_TYPE
+ ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-cpu,n-net,n-cond,c-sch,c-api,c-vol,n-sch,n-cauth,horizon,rabbit,tempest,$DATABASE_TYPE
Other services that are not enabled by default can be enabled in
``localrc``. For example, to add Swift, use the following service
diff --git a/functions-common b/functions-common
index e4d92cb..47276f0 100644
--- a/functions-common
+++ b/functions-common
@@ -896,6 +896,38 @@
echo $user_role_id
}
+# Gets or adds user role to domain
+# Usage: get_or_add_user_domain_role <role> <user> <domain>
+function get_or_add_user_domain_role {
+ local user_role_id
+ # Gets user role id
+ user_role_id=$(openstack role list \
+ --user $2 \
+ --os-url=$KEYSTONE_SERVICE_URI_V3 \
+ --os-identity-api-version=3 \
+ --column "ID" \
+ --domain $3 \
+ --column "Name" \
+ | grep " $1 " | get_field 1)
+ if [[ -z "$user_role_id" ]]; then
+ # Adds role to user and get it
+ openstack role add $1 \
+ --user $2 \
+ --domain $3 \
+ --os-url=$KEYSTONE_SERVICE_URI_V3 \
+ --os-identity-api-version=3
+ user_role_id=$(openstack role list \
+ --user $2 \
+ --os-url=$KEYSTONE_SERVICE_URI_V3 \
+ --os-identity-api-version=3 \
+ --column "ID" \
+ --domain $3 \
+ --column "Name" \
+ | grep " $1 " | get_field 1)
+ fi
+ echo $user_role_id
+}
+
# Gets or adds group role to project
# Usage: get_or_add_group_project_role <role> <group> <project>
function get_or_add_group_project_role {
@@ -979,8 +1011,6 @@
function get_endpoint_url {
echo $(openstack endpoint list \
--service $1 --interface $2 \
- --os-url $KEYSTONE_SERVICE_URI_V3 \
- --os-identity-api-version=3 \
-c URL -f value)
}
@@ -1247,7 +1277,9 @@
# install_package package [package ...]
function install_package {
update_package_repo
- real_install_package $@ || RETRY_UPDATE=True update_package_repo && real_install_package $@
+ if ! real_install_package "$@"; then
+ RETRY_UPDATE=True update_package_repo && real_install_package "$@"
+ fi
}
# Distro-agnostic function to tell if a package is installed
diff --git a/lib/cinder b/lib/cinder
index 5bd940b..9ca8109 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -467,6 +467,8 @@
function _configure_tgt_for_config_d {
if [[ ! -d /etc/tgt/stack.d/ ]]; then
sudo ln -sf $CINDER_STATE_PATH/volumes /etc/tgt/stack.d
+ fi
+ if ! grep -q "include /etc/tgt/stack.d/*" /etc/tgt/targets.conf; then
echo "include /etc/tgt/stack.d/*" | sudo tee -a /etc/tgt/targets.conf
fi
}
diff --git a/lib/horizon b/lib/horizon
index 67181fc..dca3111 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -83,10 +83,7 @@
# Message catalog compilation is handled by Django admin script,
# so compiling them after the installation avoids Django installation twice.
(cd $HORIZON_DIR; ./run_tests.sh -N --compilemessages)
-}
-# init_horizon() - Initialize databases, etc.
-function init_horizon {
# ``local_settings.py`` is used to override horizon default settings.
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
cp $HORIZON_SETTINGS $local_settings
@@ -113,6 +110,7 @@
horizon_conf=$(apache_site_config_for horizon)
# Configure apache to run horizon
+ # Set up the django horizon application to serve via apache/wsgi
sudo sh -c "sed -e \"
s,%USER%,$APACHE_USER,g;
s,%GROUP%,$APACHE_GROUP,g;
@@ -133,7 +131,10 @@
exit_distro_not_supported "horizon apache configuration"
fi
enable_apache_site horizon
+}
+# init_horizon() - Initialize databases, etc.
+function init_horizon {
# Remove old log files that could mess with how DevStack detects whether Horizon
# has been successfully started (see start_horizon() and functions::screen_it())
# and run_process
@@ -147,6 +148,7 @@
django_admin=django-admin.py
fi
+ # These need to be run after horizon plugins are configured.
DJANGO_SETTINGS_MODULE=openstack_dashboard.settings $django_admin collectstatic --noinput
DJANGO_SETTINGS_MODULE=openstack_dashboard.settings $django_admin compress --force
diff --git a/lib/keystone b/lib/keystone
index d033a94..057bb47 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -332,6 +332,7 @@
local admin_role
admin_role=$(get_or_create_role "admin")
get_or_add_user_project_role $admin_role $admin_user $admin_tenant
+ get_or_add_user_domain_role $admin_role $admin_user default
# Create service project/role
get_or_create_project "$SERVICE_TENANT_NAME" default
@@ -506,6 +507,11 @@
fi
git_clone $KEYSTONE_REPO $KEYSTONE_DIR $KEYSTONE_BRANCH
setup_develop $KEYSTONE_DIR
+
+ if is_service_enabled ldap; then
+ setup_develop $KEYSTONE_DIR ldap
+ fi
+
if [ "$KEYSTONE_USE_MOD_WSGI" == "True" ]; then
install_apache_wsgi
if is_ssl_enabled_service "key"; then
diff --git a/lib/ldap b/lib/ldap
index 65056ae..4cea812 100644
--- a/lib/ldap
+++ b/lib/ldap
@@ -145,8 +145,6 @@
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
fi
- pip_install_gr ldappool
-
rm -rf $tmp_ldap_dir
}
diff --git a/lib/neutron_plugins/nec b/lib/neutron_plugins/nec
deleted file mode 100644
index 9ea7338..0000000
--- a/lib/neutron_plugins/nec
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-# This file is needed so Q_PLUGIN=nec will work.
-
-# FIXME(amotoki): This function should not be here, but unfortunately
-# devstack calls it before the external plugins are fetched
-function has_neutron_plugin_security_group {
- # 0 means True here
- return 0
-}
diff --git a/lib/nova b/lib/nova
index c97f517..cbf7c5f 100644
--- a/lib/nova
+++ b/lib/nova
@@ -450,7 +450,7 @@
fi
# S3
- if is_service_enabled n-obj swift3; then
+ if is_service_enabled swift3; then
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
get_or_create_service "s3" "s3" "S3"
@@ -869,11 +869,6 @@
run_process n-cauth "$NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf"
run_process n-sproxy "$NOVA_BIN_DIR/nova-serialproxy --config-file $api_cell_conf"
- # Starting the nova-objectstore only if swift3 service is not enabled.
- # Swift will act as s3 objectstore.
- is_service_enabled swift3 || \
- run_process n-obj "$NOVA_BIN_DIR/nova-objectstore --config-file $api_cell_conf"
-
export PATH=$old_path
}
@@ -907,7 +902,7 @@
# Kill the nova screen windows
# Some services are listed here twice since more than one instance
# of a service may be running in certain configs.
- for serv in n-api n-crt n-net n-sch n-novnc n-xvnc n-cauth n-spice n-cond n-cell n-cell n-api-meta n-obj n-sproxy; do
+ for serv in n-api n-crt n-net n-sch n-novnc n-xvnc n-cauth n-spice n-cond n-cell n-cell n-api-meta n-sproxy; do
stop_process $serv
done
}
diff --git a/lib/rpc_backend b/lib/rpc_backend
index a44287c..05e303e 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -47,9 +47,9 @@
if is_service_enabled rabbit; then
# Install rabbitmq-server
install_package rabbitmq-server
- fi
- if is_fedora; then
- sudo systemctl enable rabbitmq-server
+ if is_fedora; then
+ sudo systemctl enable rabbitmq-server
+ fi
fi
}
diff --git a/samples/local.conf b/samples/local.conf
index 34c9e8b..92231bb 100644
--- a/samples/local.conf
+++ b/samples/local.conf
@@ -86,10 +86,9 @@
# Swift
# -----
-# Swift is now used as the back-end for the S3-like object store. If Nova's
-# objectstore (``n-obj`` in ``ENABLED_SERVICES``) is enabled, it will NOT
-# run if Swift is enabled. Setting the hash value is required and you will
-# be prompted for it if Swift is enabled so just set it to something already:
+# Swift is now used as the back-end for the S3-like object store. Setting the
+# hash value is required and you will be prompted for it if Swift is enabled
+# so just set it to something already:
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
# For development purposes the default of 3 replicas is usually not required.
diff --git a/stack.sh b/stack.sh
index 1fa506c..5e4a4f8 100755
--- a/stack.sh
+++ b/stack.sh
@@ -838,7 +838,6 @@
install_django_openstack_auth
# dashboard
stack_install_service horizon
- configure_horizon
fi
if is_service_enabled heat; then
@@ -1058,12 +1057,9 @@
# Horizon
# -------
-# Set up the django horizon application to serve via apache/wsgi
-
if is_service_enabled horizon; then
- echo_summary "Configuring and starting Horizon"
- init_horizon
- start_horizon
+ echo_summary "Configuring Horizon"
+ configure_horizon
fi
@@ -1288,6 +1284,12 @@
fi
fi
+if is_service_enabled horizon; then
+ echo_summary "Starting Horizon"
+ init_horizon
+ start_horizon
+fi
+
# Create account rc files
# =======================