Merge "remove clouds.yaml in clean.sh"
diff --git a/data/devstack-plugins-registry.header b/data/devstack-plugins-registry.header
index f105fe9..6119ab5 100644
--- a/data/devstack-plugins-registry.header
+++ b/data/devstack-plugins-registry.header
@@ -1,20 +1,23 @@
..
- Note to patch submitters: this file is covered by a periodic proposal
- job. You should edit the files data/devstack-plugins-registry.footer
- data/devstack-plugins-registry.header instead of this one.
+
+ Note to patch submitters:
+
+ # ============================= #
+ # THIS FILE IS AUTOGENERATED ! #
+ # ============================= #
+
+ ** Plugins are found automatically and added to this list **
+
+ This file is created by a periodic proposal job. You should not
+ edit this file.
+
+ You should edit the files data/devstack-plugins-registry.footer
+ data/devstack-plugins-registry.header to modify this text.
==========================
DevStack Plugin Registry
==========================
-Since we've created the external plugin mechanism, it's gotten used by
-a lot of projects. The following is a list of plugins that currently
-exist. Any project that wishes to list their plugin here is welcomed
-to.
-
-Detected Plugins
-================
-
-The following are plugins that a script has found in the openstack/
-namespace, which includes but is not limited to official OpenStack
-projects.
+The following list is an automatically-generated collection of
+available DevStack plugins. This includes, but is not limited to,
+official OpenStack projects.
diff --git a/doc/source/changes.rst b/doc/source/changes.rst
deleted file mode 100644
index 19fce0f..0000000
--- a/doc/source/changes.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-=======
-Changes
-=======
-
-Recent Changes What's been happening?
-=====================================
-
-These are the commits to DevStack for the last six months. For the
-complete list see `the DevStack project in
-Gerrit <https://review.openstack.org/#/q/status:merged+project:openstack-dev/devstack,n,z>`__.
-
-%GIT_LOG%
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index f3e4896..1f5797c 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -62,8 +62,7 @@
A specific meta-section ``local|localrc`` is used to provide a default
``localrc`` file (actually ``.localrc.auto``). This allows all custom
settings for DevStack to be contained in a single file. If ``localrc``
-exists it will be used instead to preserve backward-compatibility. More
-details on the :doc:`contents of local.conf <local.conf>` are available.
+exists it will be used instead to preserve backward-compatibility.
::
@@ -84,6 +83,76 @@
fragment and MUST conform to the shell requirements, specifically no
whitespace around ``=`` (equals).
+openrc
+======
+
+``openrc`` configures login credentials suitable for use with the
+OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the
+beginning (which in turn sources the ``localrc`` section of
+``local.conf``) in order to pick up ``HOST_IP`` and/or ``SERVICE_HOST``
+to use in the endpoints. The values shown below are the default values.
+
+OS\_PROJECT\_NAME (OS\_TENANT\_NAME)
+ Keystone has
+ standardized the term *project* as the entity that owns resources. In
+ some places references still exist to the previous term
+ *tenant* for this use. Also, *project\_name* is preferred to
+ *project\_id*. OS\_TENANT\_NAME remains supported for compatibility
+ with older tools.
+
+ ::
+
+ OS_PROJECT_NAME=demo
+
+OS\_USERNAME
+ In addition to the owning entity (project), OpenStack calls the entity
+ performing the action *user*.
+
+ ::
+
+ OS_USERNAME=demo
+
+OS\_PASSWORD
+ Keystone's default authentication requires a password be provided.
+ The usual cautions about putting passwords in environment variables
+ apply, for most DevStack uses this may be an acceptable tradeoff.
+
+ ::
+
+ OS_PASSWORD=secret
+
+HOST\_IP, SERVICE\_HOST
+ Set API endpoint host using ``HOST_IP``. ``SERVICE_HOST`` may also
+ be used to specify the endpoint, which is convenient for some
+ ``local.conf`` configurations. Typically, ``HOST_IP`` is set in the
+ ``localrc`` section.
+
+ ::
+
+ HOST_IP=127.0.0.1
+ SERVICE_HOST=$HOST_IP
+
+OS\_AUTH\_URL
+ Authenticating against an OpenStack cloud using Keystone returns a
+ *Token* and *Service Catalog*. The catalog contains the endpoints
+ for all services the user/tenant has access to - including Nova,
+ Glance, Keystone and Swift.
+
+ ::
+
+ OS_AUTH_URL=http://$SERVICE_HOST:5000/v2.0
+
+KEYSTONECLIENT\_DEBUG, NOVACLIENT\_DEBUG
+ Set command-line client log level to ``DEBUG``. These are commented
+ out by default.
+
+ ::
+
+ # export KEYSTONECLIENT_DEBUG=1
+ # export NOVACLIENT_DEBUG=1
+
+
+
.. _minimal-configuration:
Minimal Configuration
@@ -145,6 +214,37 @@
.. contents::
:local:
+Service Repos
+-------------
+
+The Git repositories used to check out the source for each service are
+controlled by a pair of variables set for each service. ``*_REPO``
+points to the repository and ``*_BRANCH`` selects which branch to
+check out. These may be overridden in ``local.conf`` to pull source
+from a different repo for testing, such as a Gerrit branch
+proposal. ``GIT_BASE`` points to the primary repository server.
+
+ ::
+
+ NOVA_REPO=$GIT_BASE/openstack/nova.git
+ NOVA_BRANCH=master
+
+To pull a branch directly from Gerrit, get the repo and branch from
+the Gerrit review page:
+
+ ::
+
+ git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD
+
+ The repo is the stanza following ``fetch`` and the branch is the
+ stanza following that:
+
+ ::
+
+ NOVA_REPO=https://review.openstack.org/p/openstack/nova
+ NOVA_BRANCH=refs/changes/50/5050/1
+
+
Installation Directory
----------------------
@@ -513,6 +613,18 @@
with multiple replicas you can do so by customizing the variable
``SWIFT_REPLICAS`` in your ``localrc`` section (usually to 3).
+You can manually override the ring building to use specific storage
+nodes, for example when you want to test a multinode environment. In
+this case you have to set a space-separated list of IPs in
+``SWIFT_STORAGE_IPS`` in your ``localrc`` section that should be used
+as Swift storage nodes.
+Please note that this does not create a multinode setup, it is only
+used when adding nodes to the Swift rings.
+
+::
+
+ SWIFT_STORAGE_IPS="192.168.1.10 192.168.1.11 192.168.1.12"
+
Swift S3
++++++++
@@ -630,6 +742,16 @@
KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
REGION_NAME=RegionTwo
+ KEYSTONE_REGION_NAME=RegionOne
+
+In the devstack for RegionOne, we set REGION_NAME as RegionOne, so region of
+the services started in this devstack are registered as RegionOne. In devstack
+for RegionTwo, similarly, we set REGION_NAME as RegionTwo since we want
+services started in this devstack to be registered in RegionTwo. But Keystone
+service is started and registered in RegionOne, not RegionTwo, so we use
+KEYSTONE_REGION_NAME to specify the region of Keystone service.
+KEYSTONE_REGION_NAME has a default value the same as REGION_NAME thus we omit
+it in the configuration of RegionOne.
Disabling Identity API v2
+++++++++++++++++++++++++
@@ -640,3 +762,40 @@
::
ENABLE_IDENTITY_V2=False
+
+Exercises
+~~~~~~~~~
+
+``exerciserc`` is used to configure settings for the exercise scripts.
+The values shown below are the default values. These can all be
+overridden by setting them in the ``localrc`` section.
+
+* Max time to wait while vm goes from build to active state
+
+ ::
+
+ ACTIVE_TIMEOUT==30
+
+* Max time to wait for proper IP association and dis-association.
+
+ ::
+
+ ASSOCIATE_TIMEOUT=15
+
+* Max time till the vm is bootable
+
+ ::
+
+ BOOT_TIMEOUT=30
+
+* Max time from run instance command until it is running
+
+ ::
+
+ RUNNING_TIMEOUT=$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))
+
+* Max time to wait for a vm to terminate
+
+ ::
+
+ TERMINATE_TIMEOUT=30
diff --git a/doc/source/exerciserc.rst b/doc/source/exerciserc.rst
deleted file mode 100644
index dacae2e..0000000
--- a/doc/source/exerciserc.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-==============================
-exerciserc - Exercise Settings
-==============================
-
-``exerciserc`` is used to configure settings for the exercise scripts.
-The values shown below are the default values. These can all be
-overridden by setting them in the ``localrc`` section.
-
-ACTIVE\_TIMEOUT
- Max time to wait while vm goes from build to active state
-
- ::
-
- ACTIVE_TIMEOUT==30
-
-ASSOCIATE\_TIMEOUT
- Max time to wait for proper IP association and dis-association.
-
- ::
-
- ASSOCIATE_TIMEOUT=15
-
-BOOT\_TIMEOUT
- Max time till the vm is bootable
-
- ::
-
- BOOT_TIMEOUT=30
-
-RUNNING\_TIMEOUT
- Max time from run instance command until it is running
-
- ::
-
- RUNNING_TIMEOUT=$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))
-
-TERMINATE\_TIMEOUT
- Max time to wait for a vm to terminate
-
- ::
-
- TERMINATE_TIMEOUT=30
diff --git a/doc/source/index.rst b/doc/source/index.rst
index c79b2ce..c4a7c59 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,8 +1,16 @@
-DevStack - an OpenStack Community Production
-============================================
+DevStack
+========
.. image:: assets/images/logo-blue.png
+DevStack is a series of extensible scripts used to quickly bring up a
+complete OpenStack environment. It is used interactively as a
+development environment and as the basis for much of the OpenStack
+project's functional testing.
+
+The source is available at
+`<https://git.openstack.org/cgit/openstack-dev/devstack>`__.
+
.. toctree::
:glob:
:maxdepth: 1
@@ -12,7 +20,6 @@
plugins
plugin-registry
faq
- changes
hacking
Quick Start
@@ -147,11 +154,6 @@
:doc:`Extending DevStack with new features <plugins>`
-Recent Changes
---------------
-
-:doc:`An incomplete summary of recent changes <changes>`
-
FAQ
---
@@ -162,94 +164,3 @@
:doc:`Pitching in to make DevStack a better place <hacking>`
-Code
-====
-
-*A look at the bits that make it all go*
-
-Scripts
--------
-
-* `stack.sh <stack.sh.html>`__ - The main script
-* `functions <functions.html>`__ - DevStack-specific functions
-* `functions-common <functions-common.html>`__ - Functions shared with other projects
-* `lib/apache <lib/apache.html>`__
-* `lib/ceph <lib/ceph.html>`__
-* `lib/cinder <lib/cinder.html>`__
-* `lib/database <lib/database.html>`__
-* `lib/dstat <lib/dstat.html>`__
-* `lib/glance <lib/glance.html>`__
-* `lib/heat <lib/heat.html>`__
-* `lib/horizon <lib/horizon.html>`__
-* `lib/infra <lib/infra.html>`__
-* `lib/keystone <lib/keystone.html>`__
-* `lib/ldap <lib/ldap.html>`__
-* `lib/neutron-legacy <lib/neutron-legacy.html>`__
-* `lib/nova <lib/nova.html>`__
-* `lib/oslo <lib/oslo.html>`__
-* `lib/rpc\_backend <lib/rpc_backend.html>`__
-* `lib/swift <lib/swift.html>`__
-* `lib/tempest <lib/tempest.html>`__
-* `lib/tls <lib/tls.html>`__
-* `lib/trove <lib/trove.html>`__
-* `unstack.sh <unstack.sh.html>`__
-* `clean.sh <clean.sh.html>`__
-* `run\_tests.sh <run_tests.sh.html>`__
-
-* `extras.d/60-ceph.sh <extras.d/60-ceph.sh.html>`__
-* `extras.d/70-tuskar.sh <extras.d/70-tuskar.sh.html>`__
-* `extras.d/80-tempest.sh <extras.d/80-tempest.sh.html>`__
-
-* `inc/ini-config <inc/ini-config.html>`__
-* `inc/meta-config <inc/meta-config.html>`__
-* `inc/python <inc/python.html>`__
-
-* `pkg/elasticsearch.sh <pkg/elasticsearch.sh.html>`_
-
-Configuration
--------------
-
-.. toctree::
- :glob:
- :maxdepth: 1
-
- local.conf
- stackrc
- openrc
- exerciserc
-
-Tools
------
-
-* `tools/build\_docs.sh <tools/build_docs.sh.html>`__
-* `tools/build\_venv.sh <tools/build_venv.sh.html>`__
-* `tools/create-stack-user.sh <tools/create-stack-user.sh.html>`__
-* `tools/create\_userrc.sh <tools/create_userrc.sh.html>`__
-* `tools/fixup\_stuff.sh <tools/fixup_stuff.sh.html>`__
-* `tools/info.sh <tools/info.sh.html>`__
-* `tools/install\_pip.sh <tools/install_pip.sh.html>`__
-* `tools/install\_prereqs.sh <tools/install_prereqs.sh.html>`__
-* `tools/make\_cert.sh <tools/make_cert.sh.html>`__
-* `tools/upload\_image.sh <tools/upload_image.sh.html>`__
-
-Samples
--------
-
-* `local.sh <samples/local.sh.html>`__
-
-Exercises
----------
-
-* `exercise.sh <exercise.sh.html>`__
-* `exercises/aggregates.sh <exercises/aggregates.sh.html>`__
-* `exercises/boot\_from\_volume.sh <exercises/boot_from_volume.sh.html>`__
-* `exercises/bundle.sh <exercises/bundle.sh.html>`__
-* `exercises/client-args.sh <exercises/client-args.sh.html>`__
-* `exercises/client-env.sh <exercises/client-env.sh.html>`__
-* `exercises/euca.sh <exercises/euca.sh.html>`__
-* `exercises/floating\_ips.sh <exercises/floating_ips.sh.html>`__
-* `exercises/horizon.sh <exercises/horizon.sh.html>`__
-* `exercises/neutron-adv-test.sh <exercises/neutron-adv-test.sh.html>`__
-* `exercises/sec\_groups.sh <exercises/sec_groups.sh.html>`__
-* `exercises/swift.sh <exercises/swift.sh.html>`__
-* `exercises/volumes.sh <exercises/volumes.sh.html>`__
diff --git a/doc/source/local.conf.rst b/doc/source/local.conf.rst
deleted file mode 100644
index a1ca60a..0000000
--- a/doc/source/local.conf.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-==========================
-local.conf - User Settings
-==========================
-
-``local.conf`` is a user-maintained settings file that is sourced in
-``stackrc``. It contains a section that replaces the historical
-``localrc`` file. See the description of
-:doc:`local.conf <configuration>` for more details about the mechanics
-of the file.
diff --git a/doc/source/openrc.rst b/doc/source/openrc.rst
deleted file mode 100644
index d28b568..0000000
--- a/doc/source/openrc.rst
+++ /dev/null
@@ -1,68 +0,0 @@
-=====================================
-openrc - User Authentication Settings
-=====================================
-
-``openrc`` configures login credentials suitable for use with the
-OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the
-beginning (which in turn sources the ``localrc`` section of
-``local.conf``) in order to pick up ``HOST_IP`` and/or ``SERVICE_HOST``
-to use in the endpoints. The values shown below are the default values.
-
-OS\_PROJECT\_NAME (OS\_TENANT\_NAME)
- Keystone has
- standardized the term *project* as the entity that owns resources. In
- some places references still exist to the previous term
- *tenant* for this use. Also, *project\_name* is preferred to
- *project\_id*. OS\_TENANT\_NAME remains supported for compatibility
- with older tools.
-
- ::
-
- OS_PROJECT_NAME=demo
-
-OS\_USERNAME
- In addition to the owning entity (project), OpenStack calls the entity
- performing the action *user*.
-
- ::
-
- OS_USERNAME=demo
-
-OS\_PASSWORD
- Keystone's default authentication requires a password be provided.
- The usual cautions about putting passwords in environment variables
- apply, for most DevStack uses this may be an acceptable tradeoff.
-
- ::
-
- OS_PASSWORD=secret
-
-HOST\_IP, SERVICE\_HOST
- Set API endpoint host using ``HOST_IP``. ``SERVICE_HOST`` may also
- be used to specify the endpoint, which is convenient for some
- ``local.conf`` configurations. Typically, ``HOST_IP`` is set in the
- ``localrc`` section.
-
- ::
-
- HOST_IP=127.0.0.1
- SERVICE_HOST=$HOST_IP
-
-OS\_AUTH\_URL
- Authenticating against an OpenStack cloud using Keystone returns a
- *Token* and *Service Catalog*. The catalog contains the endpoints
- for all services the user/project has access to - including Nova,
- Glance, Keystone and Swift.
-
- ::
-
- OS_AUTH_URL=http://$SERVICE_HOST:5000/v2.0
-
-KEYSTONECLIENT\_DEBUG, NOVACLIENT\_DEBUG
- Set command-line client log level to ``DEBUG``. These are commented
- out by default.
-
- ::
-
- # export KEYSTONECLIENT_DEBUG=1
- # export NOVACLIENT_DEBUG=1
diff --git a/doc/source/plugin-registry.rst b/doc/source/plugin-registry.rst
index 999350f..9c20765 100644
--- a/doc/source/plugin-registry.rst
+++ b/doc/source/plugin-registry.rst
@@ -1,23 +1,26 @@
..
- Note to patch submitters: this file is covered by a periodic proposal
- job. You should edit the files data/devstack-plugins-registry.footer
- data/devstack-plugins-registry.header instead of this one.
+
+ Note to patch submitters:
+
+ # ============================= #
+ # THIS FILE IS AUTOGENERATED ! #
+ # ============================= #
+
+ ** Plugins are found automatically and added to this list **
+
+ This file is created by a periodic proposal job. You should not
+ edit this file.
+
+ You should edit the files data/devstack-plugins-registry.footer
+ data/devstack-plugins-registry.header to modify this text.
==========================
DevStack Plugin Registry
==========================
-Since we've created the external plugin mechanism, it's gotten used by
-a lot of projects. The following is a list of plugins that currently
-exist. Any project that wishes to list their plugin here is welcomed
-to.
-
-Detected Plugins
-================
-
-The following are plugins that a script has found in the openstack/
-namespace, which includes but is not limited to official OpenStack
-projects.
+The following list is an automatically-generated collection of
+available DevStack plugins. This includes, but is not limited to,
+official OpenStack projects.
====================================== ===
@@ -56,6 +59,7 @@
freezer-web-ui `git://git.openstack.org/openstack/freezer-web-ui <https://git.openstack.org/cgit/openstack/freezer-web-ui>`__
gce-api `git://git.openstack.org/openstack/gce-api <https://git.openstack.org/cgit/openstack/gce-api>`__
gnocchi `git://git.openstack.org/openstack/gnocchi <https://git.openstack.org/cgit/openstack/gnocchi>`__
+group-based-policy `git://git.openstack.org/openstack/group-based-policy <https://git.openstack.org/cgit/openstack/group-based-policy>`__
ironic `git://git.openstack.org/openstack/ironic <https://git.openstack.org/cgit/openstack/ironic>`__
ironic-inspector `git://git.openstack.org/openstack/ironic-inspector <https://git.openstack.org/cgit/openstack/ironic-inspector>`__
kingbird `git://git.openstack.org/openstack/kingbird <https://git.openstack.org/cgit/openstack/kingbird>`__
@@ -65,6 +69,7 @@
manila `git://git.openstack.org/openstack/manila <https://git.openstack.org/cgit/openstack/manila>`__
mistral `git://git.openstack.org/openstack/mistral <https://git.openstack.org/cgit/openstack/mistral>`__
monasca-api `git://git.openstack.org/openstack/monasca-api <https://git.openstack.org/cgit/openstack/monasca-api>`__
+monasca-log-api `git://git.openstack.org/openstack/monasca-log-api <https://git.openstack.org/cgit/openstack/monasca-log-api>`__
murano `git://git.openstack.org/openstack/murano <https://git.openstack.org/cgit/openstack/murano>`__
networking-6wind `git://git.openstack.org/openstack/networking-6wind <https://git.openstack.org/cgit/openstack/networking-6wind>`__
networking-bagpipe `git://git.openstack.org/openstack/networking-bagpipe <https://git.openstack.org/cgit/openstack/networking-bagpipe>`__
diff --git a/doc/source/stackrc.rst b/doc/source/stackrc.rst
deleted file mode 100644
index 81d4b80..0000000
--- a/doc/source/stackrc.rst
+++ /dev/null
@@ -1,66 +0,0 @@
-===========================
-stackrc - DevStack Settings
-===========================
-
-``stackrc`` is the primary configuration file for DevStack. It contains
-all of the settings that control the services started and the
-repositories used to download the source for those services. ``stackrc``
-sources the ``localrc`` section of ``local.conf`` to perform the default
-overrides.
-
-DATABASE\_TYPE
- Select the database backend to use. The default is ``mysql``,
- ``postgresql`` is also available.
-ENABLED\_SERVICES
- Specify which services to launch. These generally correspond to
- screen tabs. The default includes: Glance (API and Registry),
- Keystone, Nova (API, Certificate, Object Store, Compute, Network,
- Scheduler, Certificate Authentication), Cinder
- (Scheduler, API, Volume), Horizon, MySQL, RabbitMQ, Tempest.
-
- ::
-
- 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
- names:
-
- ::
-
- enable_service s-proxy s-object s-container s-account
-
- A service can similarly be disabled:
-
- ::
-
- disable_service horizon
-
-Service Repos
- The Git repositories used to check out the source for each service
- are controlled by a pair of variables set for each service.
- ``*_REPO`` points to the repository and ``*_BRANCH`` selects which
- branch to check out. These may be overridden in ``local.conf`` to
- pull source from a different repo for testing, such as a Gerrit
- branch proposal. ``GIT_BASE`` points to the primary repository
- server.
-
- ::
-
- NOVA_REPO=$GIT_BASE/openstack/nova.git
- NOVA_BRANCH=master
-
- To pull a branch directly from Gerrit, get the repo and branch from
- the Gerrit review page:
-
- ::
-
- git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD
-
- The repo is the stanza following ``fetch`` and the branch is the
- stanza following that:
-
- ::
-
- NOVA_REPO=https://review.openstack.org/p/openstack/nova
- NOVA_BRANCH=refs/changes/50/5050/1
diff --git a/functions-common b/functions-common
index a4711dd..e44fea1 100644
--- a/functions-common
+++ b/functions-common
@@ -840,27 +840,49 @@
echo $role_id
}
+# Returns the domain parts of a function call if present
+# Usage: _get_domain_args [<user_domain> <project_domain>]
+function _get_domain_args {
+ local domain
+ domain=""
+
+ if [[ -n "$1" ]]; then
+ domain="$domain --user-domain $1"
+ fi
+ if [[ -n "$2" ]]; then
+ domain="$domain --project-domain $2"
+ fi
+
+ echo $domain
+}
+
# Gets or adds user role to project
-# Usage: get_or_add_user_project_role <role> <user> <project>
+# Usage: get_or_add_user_project_role <role> <user> <project> [<user_domain> <project_domain>]
function get_or_add_user_project_role {
local user_role_id
+
+ domain_args=$(_get_domain_args $4 $5)
+
# Gets user role id
user_role_id=$(openstack role list \
--user $2 \
--column "ID" \
--project $3 \
--column "Name" \
+ $domain_args \
| grep " $1 " | get_field 1)
if [[ -z "$user_role_id" ]]; then
# Adds role to user and get it
openstack role add $1 \
--user $2 \
- --project $3
+ --project $3 \
+ $domain_args
user_role_id=$(openstack role list \
--user $2 \
--column "ID" \
--project $3 \
--column "Name" \
+ $domain_args \
| grep " $1 " | get_field 1)
fi
echo $user_role_id
diff --git a/lib/cinder b/lib/cinder
index 4df7de8..607a6f8 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -386,6 +386,14 @@
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s" \
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s" \
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s"
+
+ get_or_create_service "cinderv3" "volumev3" "Cinder Volume Service V3"
+ get_or_create_endpoint \
+ "volumev3" \
+ "$REGION_NAME" \
+ "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s" \
+ "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s" \
+ "$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s"
fi
}
diff --git a/lib/glance b/lib/glance
index 3743e16..f2a6db6 100644
--- a/lib/glance
+++ b/lib/glance
@@ -173,8 +173,8 @@
iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3
- iniset $GLANCE_SWIFT_STORE_CONF ref1 user_domain_id default
- iniset $GLANCE_SWIFT_STORE_CONF ref1 project_domain_id default
+ iniset $GLANCE_SWIFT_STORE_CONF ref1 user_domain_name $SERVICE_DOMAIN_NAME
+ iniset $GLANCE_SWIFT_STORE_CONF ref1 project_domain_name $SERVICE_DOMAIN_NAME
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3
# commenting is not strictly necessary but it's confusing to have bad values in conf
@@ -288,11 +288,7 @@
# required for swift access
if is_service_enabled s-proxy; then
-
- local glance_swift_user
- glance_swift_user=$(get_or_create_user "glance-swift" \
- "$SERVICE_PASSWORD" "default" "glance-swift@example.com")
- get_or_add_user_project_role "ResellerAdmin" $glance_swift_user $SERVICE_PROJECT_NAME
+ create_service_user "glance-swift" "ResellerAdmin"
fi
get_or_create_service "glance" "image" "Glance Image Service"
diff --git a/lib/keystone b/lib/keystone
index b5c107c..542bd05 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -106,8 +106,13 @@
# Bind hosts
KEYSTONE_ADMIN_BIND_HOST=${KEYSTONE_ADMIN_BIND_HOST:-$KEYSTONE_SERVICE_HOST}
+
# Set the project for service accounts in Keystone
+SERVICE_DOMAIN_NAME=${SERVICE_DOMAIN_NAME:-Default}
SERVICE_PROJECT_NAME=${SERVICE_PROJECT_NAME:-service}
+
+# Note 2016-03 : SERVICE_TENANT_NAME is kept for backwards
+# compatibility; we should be using SERVICE_PROJECT_NAME now
SERVICE_TENANT_NAME=${SERVICE_PROJECT_NAME:-service}
# if we are running with SSL use https protocols
@@ -370,6 +375,7 @@
get_or_add_user_domain_role $admin_role $admin_user default
# Create service project/role
+ get_or_create_domain "$SERVICE_DOMAIN_NAME"
get_or_create_project "$SERVICE_PROJECT_NAME" default
# Service role, so service users do not have to be admins
@@ -442,9 +448,8 @@
function create_service_user {
local role=${2:-service}
- local user
- user=$(get_or_create_user "$1" "$SERVICE_PASSWORD" default)
- get_or_add_user_project_role "$role" "$user" "$SERVICE_PROJECT_NAME"
+ get_or_create_user "$1" "$SERVICE_PASSWORD" "$SERVICE_DOMAIN_NAME"
+ get_or_add_user_project_role "$role" "$1" "$SERVICE_PROJECT_NAME" "$SERVICE_DOMAIN_NAME" "$SERVICE_DOMAIN_NAME"
}
# Configure the service to use the auth token middleware.
@@ -464,9 +469,9 @@
iniset $conf_file $section auth_url $KEYSTONE_AUTH_URI
iniset $conf_file $section username $admin_user
iniset $conf_file $section password $SERVICE_PASSWORD
- iniset $conf_file $section user_domain_id default
+ iniset $conf_file $section user_domain_name "$SERVICE_DOMAIN_NAME"
iniset $conf_file $section project_name $SERVICE_PROJECT_NAME
- iniset $conf_file $section project_domain_id default
+ iniset $conf_file $section project_domain_name "$SERVICE_DOMAIN_NAME"
iniset $conf_file $section auth_uri $KEYSTONE_SERVICE_URI
iniset $conf_file $section cafile $SSL_BUNDLE_FILE
diff --git a/lib/neutron-legacy b/lib/neutron-legacy
index f5a7a0a..f0592e2 100644
--- a/lib/neutron-legacy
+++ b/lib/neutron-legacy
@@ -107,6 +107,7 @@
NEUTRON_DIR=$DEST/neutron
NEUTRON_FWAAS_DIR=$DEST/neutron-fwaas
+NEUTRON_LBAAS_DIR=$DEST/neutron-lbaas
NEUTRON_VPNAAS_DIR=$DEST/neutron-vpnaas
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
@@ -121,6 +122,9 @@
NEUTRON_CONF=$NEUTRON_CONF_DIR/neutron.conf
export NEUTRON_TEST_CONFIG_FILE=${NEUTRON_TEST_CONFIG_FILE:-"$NEUTRON_CONF_DIR/debug.ini"}
+# Default provider for load balancer service
+DEFAULT_LB_PROVIDER=LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
+
# Default provider for VPN service
DEFAULT_VPN_PROVIDER=VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default
@@ -343,6 +347,12 @@
source $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN
fi
+# Agent loadbalancer service plugin functions
+# -------------------------------------------
+
+# Hardcoding for 1 service plugin for now
+source $TOP_DIR/lib/neutron_plugins/services/loadbalancer
+
# Agent metering service plugin functions
# -------------------------------------------
@@ -377,7 +387,7 @@
local cfg_file
local opts="--config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE"
for cfg_file in ${Q_PLUGIN_EXTRA_CONF_FILES[@]}; do
- opts+=" --config-file /$cfg_file"
+ opts+=" --config-file $cfg_file"
done
echo "$opts"
}
@@ -432,6 +442,10 @@
iniset_rpc_backend neutron $NEUTRON_CONF
# goes before q-svc to init Q_SERVICE_PLUGIN_CLASSES
+ if is_service_enabled q-lbaas; then
+ deprecated "Configuring q-lbaas through devstack is deprecated"
+ _configure_neutron_lbaas
+ fi
if is_service_enabled q-metering; then
_configure_neutron_metering
fi
@@ -477,9 +491,9 @@
iniset $NOVA_CONF neutron auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v3"
iniset $NOVA_CONF neutron username "$Q_ADMIN_USERNAME"
iniset $NOVA_CONF neutron password "$SERVICE_PASSWORD"
- iniset $NOVA_CONF neutron user_domain_name "Default"
+ iniset $NOVA_CONF neutron user_domain_name "$SERVICE_DOMAIN_NAME"
iniset $NOVA_CONF neutron project_name "$SERVICE_PROJECT_NAME"
- iniset $NOVA_CONF neutron project_domain_name "Default"
+ iniset $NOVA_CONF neutron project_domain_name "$SERVICE_DOMAIN_NAME"
iniset $NOVA_CONF neutron auth_strategy "$Q_AUTH_STRATEGY"
iniset $NOVA_CONF neutron region_name "$REGION_NAME"
iniset $NOVA_CONF neutron url "${Q_PROTOCOL}://$Q_HOST:$Q_PORT"
@@ -643,6 +657,10 @@
git_clone $NEUTRON_FWAAS_REPO $NEUTRON_FWAAS_DIR $NEUTRON_FWAAS_BRANCH
setup_develop $NEUTRON_FWAAS_DIR
fi
+ if is_service_enabled q-lbaas; then
+ git_clone $NEUTRON_LBAAS_REPO $NEUTRON_LBAAS_DIR $NEUTRON_LBAAS_BRANCH
+ setup_develop $NEUTRON_LBAAS_DIR
+ fi
if is_service_enabled q-vpn; then
git_clone $NEUTRON_VPNAAS_REPO $NEUTRON_VPNAAS_DIR $NEUTRON_VPNAAS_BRANCH
setup_develop $NEUTRON_VPNAAS_DIR
@@ -686,6 +704,10 @@
if is_service_enabled q-agt q-dhcp q-l3; then
neutron_plugin_install_agent_packages
fi
+
+ if is_service_enabled q-lbaas; then
+ neutron_agent_lbaas_install_agent_packages
+ fi
}
# Start running processes, including screen
@@ -748,6 +770,7 @@
fi
run_process q-meta "$AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file=$Q_META_CONF_FILE"
+ run_process q-lbaas "$AGENT_LBAAS_BINARY --config-file $NEUTRON_CONF --config-file=$LBAAS_AGENT_CONF_FILENAME"
run_process q-metering "$AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME"
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
@@ -786,6 +809,9 @@
stop_process q-meta
fi
+ if is_service_enabled q-lbaas; then
+ neutron_lbaas_stop
+ fi
if is_service_enabled q-fwaas; then
neutron_fwaas_stop
fi
@@ -890,7 +916,7 @@
fi
# delete all namespaces created by neutron
- for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|fip|snat)-[0-9a-f-]*'); do
+ for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|qlbaas|fip|snat)-[0-9a-f-]*'); do
sudo ip netns delete ${ns}
done
}
@@ -920,10 +946,11 @@
# Set plugin-specific variables ``Q_DB_NAME``, ``Q_PLUGIN_CLASS``.
# 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 additional plugin config files, set ``Q_PLUGIN_EXTRA_CONF_PATH`` and
# ``Q_PLUGIN_EXTRA_CONF_FILES``. For example:
#
- # ``Q_PLUGIN_EXTRA_CONF_FILES=(file1, file2)``
+ # ``Q_PLUGIN_EXTRA_CONF_PATH=/path/to/plugins``
+ # ``Q_PLUGIN_EXTRA_CONF_FILES=(file1 file2)``
neutron_plugin_configure_common
if [[ "$Q_PLUGIN_CONF_PATH" == '' || "$Q_PLUGIN_CONF_FILENAME" == '' || "$Q_PLUGIN_CLASS" == '' ]]; then
@@ -1083,6 +1110,18 @@
iniset $NEUTRON_CONF oslo_messaging_notifications driver messaging
}
+function _configure_neutron_lbaas {
+ # Uses oslo config generator to generate LBaaS sample configuration files
+ (cd $NEUTRON_LBAAS_DIR && exec ./tools/generate_config_file_samples.sh)
+
+ if [ -f $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf.sample ]; then
+ cp $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf.sample $NEUTRON_CONF_DIR/neutron_lbaas.conf
+ iniset $NEUTRON_CONF_DIR/neutron_lbaas.conf service_providers service_provider $DEFAULT_LB_PROVIDER
+ fi
+ neutron_agent_lbaas_configure_common
+ neutron_agent_lbaas_configure_agent
+}
+
function _configure_neutron_metering {
neutron_agent_metering_configure_common
neutron_agent_metering_configure_agent
diff --git a/lib/neutron_plugins/services/loadbalancer b/lib/neutron_plugins/services/loadbalancer
new file mode 100644
index 0000000..30e9480
--- /dev/null
+++ b/lib/neutron_plugins/services/loadbalancer
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+# Neutron loadbalancer plugin
+# ---------------------------
+
+# Save trace setting
+_XTRACE_NEUTRON_LB=$(set +o | grep xtrace)
+set +o xtrace
+
+
+AGENT_LBAAS_BINARY="$NEUTRON_BIN_DIR/neutron-lbaas-agent"
+LBAAS_PLUGIN=neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin
+
+function neutron_agent_lbaas_install_agent_packages {
+ if is_ubuntu || is_fedora || is_suse; then
+ install_package haproxy
+ fi
+}
+
+function neutron_agent_lbaas_configure_common {
+ _neutron_service_plugin_class_add $LBAAS_PLUGIN
+ _neutron_deploy_rootwrap_filters $NEUTRON_LBAAS_DIR
+}
+
+function neutron_agent_lbaas_configure_agent {
+ LBAAS_AGENT_CONF_PATH=/etc/neutron/services/loadbalancer/haproxy
+ mkdir -p $LBAAS_AGENT_CONF_PATH
+
+ LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini"
+
+ cp $NEUTRON_LBAAS_DIR/etc/lbaas_agent.ini.sample $LBAAS_AGENT_CONF_FILENAME
+
+ # ovs_use_veth needs to be set before the plugin configuration
+ # occurs to allow plugins to override the setting.
+ iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT ovs_use_veth $Q_OVS_USE_VETH
+
+ neutron_plugin_setup_interface_driver $LBAAS_AGENT_CONF_FILENAME
+
+ if is_fedora; then
+ iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody"
+ iniset $LBAAS_AGENT_CONF_FILENAME haproxy user_group "nobody"
+ fi
+}
+
+function neutron_lbaas_stop {
+ pids=$(ps aux | awk '/haproxy/ { print $2 }')
+ [ ! -z "$pids" ] && sudo kill $pids || true
+}
+
+# Restore xtrace
+$_XTRACE_NEUTRON_LB
diff --git a/lib/nova b/lib/nova
index 8823e1d..818ecc4 100644
--- a/lib/nova
+++ b/lib/nova
@@ -439,7 +439,7 @@
if is_service_enabled swift; then
# Nova needs ResellerAdmin role to download images when accessing
# swift through the s3 api.
- get_or_add_user_project_role ResellerAdmin nova $SERVICE_PROJECT_NAME
+ get_or_add_user_project_role ResellerAdmin nova $SERVICE_PROJECT_NAME $SERVICE_DOMAIN_NAME $SERVICE_DOMAIN_NAME
fi
fi
@@ -466,7 +466,7 @@
if [ "$NOVA_ALLOW_MOVE_TO_SAME_HOST" == "True" ]; then
iniset $NOVA_CONF DEFAULT allow_resize_to_same_host "True"
fi
- iniset $NOVA_CONF DEFAULT api_paste_config "$NOVA_API_PASTE_INI"
+ iniset $NOVA_CONF wsgi api_paste_config "$NOVA_API_PASTE_INI"
iniset $NOVA_CONF DEFAULT rootwrap_config "$NOVA_CONF_DIR/rootwrap.conf"
iniset $NOVA_CONF DEFAULT scheduler_driver "$SCHEDULER"
iniset $NOVA_CONF DEFAULT scheduler_default_filters "$FILTERS"
diff --git a/lib/swift b/lib/swift
index 82144f7..8cb94ef 100644
--- a/lib/swift
+++ b/lib/swift
@@ -149,6 +149,11 @@
# Toggle for deploying Swift under HTTPD + mod_wsgi
SWIFT_USE_MOD_WSGI=${SWIFT_USE_MOD_WSGI:-False}
+# A space-separated list of storage node IPs that
+# should be used to create the Swift rings
+SWIFT_STORAGE_IPS=${SWIFT_STORAGE_IPS:-}
+
+
# Functions
# ---------
@@ -693,14 +698,35 @@
swift-ring-builder container.builder create ${SWIFT_PARTITION_POWER_SIZE} ${SWIFT_REPLICAS} 1
swift-ring-builder account.builder create ${SWIFT_PARTITION_POWER_SIZE} ${SWIFT_REPLICAS} 1
- for node_number in ${SWIFT_REPLICAS_SEQ}; do
- swift-ring-builder object.builder add z${node_number}-${SWIFT_SERVICE_LOCAL_HOST}:$(( OBJECT_PORT_BASE + 10 * (node_number - 1) ))/sdb1 1
- swift-ring-builder container.builder add z${node_number}-${SWIFT_SERVICE_LOCAL_HOST}:$(( CONTAINER_PORT_BASE + 10 * (node_number - 1) ))/sdb1 1
- swift-ring-builder account.builder add z${node_number}-${SWIFT_SERVICE_LOCAL_HOST}:$(( ACCOUNT_PORT_BASE + 10 * (node_number - 1) ))/sdb1 1
- done
- swift-ring-builder object.builder rebalance
- swift-ring-builder container.builder rebalance
- swift-ring-builder account.builder rebalance
+ # The ring will be created on each node, and because the order of
+ # nodes is identical we can use a seed for rebalancing, making it
+ # possible to get a ring on each node that uses the same partition
+ # assignment.
+ if [[ -n $SWIFT_STORAGE_IPS ]]; then
+ local node_number
+ node_number=1
+
+ for node in ${SWIFT_STORAGE_IPS}; do
+ swift-ring-builder object.builder add z${node_number}-${node}:${OBJECT_PORT_BASE}/sdb1 1
+ swift-ring-builder container.builder add z${node_number}-${node}:${CONTAINER_PORT_BASE}/sdb1 1
+ swift-ring-builder account.builder add z${node_number}-${node}:${ACCOUNT_PORT_BASE}/sdb1 1
+ let "node_number=node_number+1"
+ done
+
+ else
+
+ for node_number in ${SWIFT_REPLICAS_SEQ}; do
+ swift-ring-builder object.builder add z${node_number}-${SWIFT_SERVICE_LOCAL_HOST}:$(( OBJECT_PORT_BASE + 10 * (node_number - 1) ))/sdb1 1
+ swift-ring-builder container.builder add z${node_number}-${SWIFT_SERVICE_LOCAL_HOST}:$(( CONTAINER_PORT_BASE + 10 * (node_number - 1) ))/sdb1 1
+ swift-ring-builder account.builder add z${node_number}-${SWIFT_SERVICE_LOCAL_HOST}:$(( ACCOUNT_PORT_BASE + 10 * (node_number - 1) ))/sdb1 1
+ done
+ fi
+
+ # We use a seed for rebalancing. Doing this allows us to create
+ # identical rings on multiple nodes if SWIFT_STORAGE_IPS is the same
+ swift-ring-builder object.builder rebalance 42
+ swift-ring-builder container.builder rebalance 42
+ swift-ring-builder account.builder rebalance 42
} && popd >/dev/null
# Create cache dir
@@ -820,7 +846,9 @@
# note we are using swift credentials!
OS_USERNAME=swift \
OS_PASSWORD=$SERVICE_PASSWORD \
+ OS_USER_DOMAIN_NAME=$SERVICE_DOMAIN_NAME \
OS_PROJECT_NAME=$SERVICE_PROJECT_NAME \
+ OS_PROJECT_DOMAIN_NAME=$SERVICE_DOMAIN_NAME \
openstack object store account \
set --property "Temp-URL-Key=$SWIFT_TEMPURL_KEY"
}
diff --git a/lib/tempest b/lib/tempest
index fd98c94..46dc1f8 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -383,6 +383,11 @@
# Orchestration Tests
if is_service_enabled heat; then
+ # Though this is not needed by heat, some tempest tests explicitly
+ # try to set this role. Removing them from the tempest tests breaks
+ # some non-devstack CIs.
+ get_or_create_role "heat_stack_owner"
+
if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then
iniset $TEMPEST_CONFIG orchestration image_ref $(basename "${HEAT_CFN_IMAGE_URL%.*}")
fi
@@ -396,7 +401,7 @@
iniset $TEMPEST_CONFIG orchestration instance_type "m1.heat"
fi
iniset $TEMPEST_CONFIG orchestration build_timeout 900
- iniset $TEMPEST_CONFIG orchestration stack_owner_role "_member_"
+ iniset $TEMPEST_CONFIG orchestration stack_owner_role "heat_stack_owner"
fi
# Scenario
@@ -425,6 +430,8 @@
iniset $TEMPEST_CONFIG volume-feature-enabled incremental_backup_force True
# TODO(ynesenenko): Remove the volume_services flag when Liberty and Kilo will correct work with host info.
iniset $TEMPEST_CONFIG volume-feature-enabled volume_services True
+ # TODO(ameade): Remove the api_v3 flag when Mitaka and Liberty are end of life.
+ iniset $TEMPEST_CONFIG volume-feature-enabled api_v3 True
if ! is_service_enabled c-bak; then
iniset $TEMPEST_CONFIG volume-feature-enabled backup False
diff --git a/stack.sh b/stack.sh
index 739d939..3de9af2 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1020,7 +1020,7 @@
export OS_PASSWORD=$ADMIN_PASSWORD
export OS_PROJECT_NAME=admin
export OS_PROJECT_DOMAIN_ID=default
-export OS_REGION_NAME=$REGION_NAME
+export OS_REGION_NAME=$KEYSTONE_REGION_NAME
EOF
diff --git a/stackrc b/stackrc
index 5dd837b..8858788 100644
--- a/stackrc
+++ b/stackrc
@@ -42,6 +42,12 @@
# Specify region name Region
REGION_NAME=${REGION_NAME:-RegionOne}
+# Specify name of region where identity service endpoint is registered.
+# When deploying multiple DevStack instances in different regions with shared
+# Keystone, set KEYSTONE_REGION_NAME to the region where Keystone is running
+# for DevStack instances which do not host Keystone.
+KEYSTONE_REGION_NAME=${KEYSTONE_REGION_NAME:-$REGION_NAME}
+
# Specify which services to launch. These generally correspond to
# screen tabs. To change the default list, use the ``enable_service`` and
# ``disable_service`` functions in ``local.conf``.
@@ -238,6 +244,10 @@
NEUTRON_FWAAS_REPO=${NEUTRON_FWAAS_REPO:-${GIT_BASE}/openstack/neutron-fwaas.git}
NEUTRON_FWAAS_BRANCH=${NEUTRON_FWAAS_BRANCH:-master}
+# neutron lbaas service
+NEUTRON_LBAAS_REPO=${NEUTRON_LBAAS_REPO:-${GIT_BASE}/openstack/neutron-lbaas.git}
+NEUTRON_LBAAS_BRANCH=${NEUTRON_LBAAS_BRANCH:-master}
+
# neutron vpnaas service
NEUTRON_VPNAAS_REPO=${NEUTRON_VPNAAS_REPO:-${GIT_BASE}/openstack/neutron-vpnaas.git}
NEUTRON_VPNAAS_BRANCH=${NEUTRON_VPNAAS_BRANCH:-master}
diff --git a/tools/build_docs.sh b/tools/build_docs.sh
deleted file mode 100755
index 7dc492e..0000000
--- a/tools/build_docs.sh
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env bash
-
-# **build_docs.sh** - Build the docs for DevStack
-#
-# - Install shocco if not found on ``PATH`` and ``INSTALL_SHOCCO`` is set
-# - Clone ``MASTER_REPO`` branch ``MASTER_BRANCH``
-# - Re-creates ``doc/build/html`` directory from existing repo + new generated script docs
-
-# Usage:
-## build_docs.sh [-o <out-dir>]
-## -o <out-dir> Write the static HTML output to <out-dir>
-## (Note that <out-dir> will be deleted and re-created to ensure it is clean)
-
-# Defaults
-# --------
-
-HTML_BUILD=doc/build/html
-
-# Keep track of the DevStack directory
-TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
-
-# Uses this shocco branch: https://github.com/dtroyer/shocco/tree/rst_support
-SHOCCO=${SHOCCO:-shocco}
-if ! which shocco; then
- if [[ ! -x $TOP_DIR/shocco/shocco ]]; then
- if [[ -z "$INSTALL_SHOCCO" ]]; then
- echo "shocco not found in \$PATH, please set environment variable SHOCCO"
- exit 1
- fi
- echo "Installing local copy of shocco"
- if ! which pygmentize; then
- sudo pip install Pygments
- fi
- if ! which rst2html.py; then
- sudo pip install docutils
- fi
- git clone -b rst_support https://github.com/dtroyer/shocco shocco
- cd shocco
- ./configure
- make || exit
- cd ..
- fi
- SHOCCO=$TOP_DIR/shocco/shocco
-fi
-
-# Process command-line args
-while getopts o: c; do
- case $c in
- o) HTML_BUILD=$OPTARG
- ;;
- esac
-done
-shift `expr $OPTIND - 1`
-
-
-# Processing
-# ----------
-
-# Ensure build dir exists
-mkdir -p $HTML_BUILD
-
-# Get fully qualified dirs
-FQ_HTML_BUILD=$(cd $HTML_BUILD && pwd)
-
-# Insert automated bits
-GLOG=$(mktemp gitlogXXXX)
-echo "<ul>" >$GLOG
-git log \
- --pretty=format:' <li>%s - <em>Commit <a href="https://review.openstack.org/#q,%h,n,z">%h</a> %cd</em></li>' \
- --date=short \
- --since '6 months ago' | grep -v Merge >>$GLOG
-echo "</ul>" >>$GLOG
-sed -i~ -e $"/^.*%GIT_LOG%.*$/r $GLOG" -e $"/^.*%GIT_LOG%.*$/s/^.*%GIT_LOG%.*$//" $FQ_HTML_BUILD/changes.html
-rm -f $GLOG
-
-# Build list of scripts to process
-FILES=""
-for f in $(find . \( -name .git -o -name .tox \) -prune -o \( -type f -name \*.sh -not -path \*shocco/\* -print \)); do
- echo $f
- FILES+="$f "
- mkdir -p $FQ_HTML_BUILD/`dirname $f`;
- $SHOCCO $f > $FQ_HTML_BUILD/$f.html
-done
-for f in $(find functions functions-common inc lib pkg samples -type f -name \* ! -name *.md ! -name *.conf); do
- echo $f
- FILES+="$f "
- mkdir -p $FQ_HTML_BUILD/`dirname $f`;
- $SHOCCO $f > $FQ_HTML_BUILD/$f.html
-done
-echo "$FILES" >doc/files
-
-# Clean up or report the temp workspace
-if [[ -n REPO && -n $PUSH_REPO ]]; then
- echo rm -rf $TMP_ROOT
-else
- if [[ -z "$TMP_ROOT" ]]; then
- TMP_ROOT="$(pwd)"
- fi
- echo "Built docs in $HTML_BUILD"
-fi
diff --git a/tools/worlddump.py b/tools/worlddump.py
index 8c053e0..238a23d 100755
--- a/tools/worlddump.py
+++ b/tools/worlddump.py
@@ -27,6 +27,16 @@
import sys
+GMR_PROCESSES = (
+ 'nova-compute',
+ 'neutron-dhcp-agent',
+ 'neutron-l3-agent',
+ 'neutron-linuxbridge-agent',
+ 'neutron-metadata-agent',
+ 'neutron-openvswitch-agent',
+)
+
+
def get_options():
parser = argparse.ArgumentParser(
description='Dump world state for debugging')
@@ -191,17 +201,18 @@
_dump_cmd("sudo cat %s" % fullpath)
-def guru_meditation_report():
- _header("nova-compute Guru Meditation Report")
+def guru_meditation_reports():
+ for service in GMR_PROCESSES:
+ _header("%s Guru Meditation Report" % service)
- try:
- subprocess.check_call(["pgrep","nova-compute"])
- except subprocess.CalledProcessError:
- print("Skipping as nova-compute does not appear to be running")
- return
+ try:
+ subprocess.check_call(['pgrep', '-f', service])
+ except subprocess.CalledProcessError:
+ print("Skipping as %s does not appear to be running" % service)
+ continue
- _dump_cmd("kill -s USR2 `pgrep nova-compute`")
- print("guru meditation report in nova-compute log")
+ _dump_cmd("killall -e -USR2 %s" % service)
+ print("guru meditation report in %s log" % service)
def main():
@@ -218,7 +229,7 @@
iptables_dump()
ebtables_dump()
compute_consoles()
- guru_meditation_report()
+ guru_meditation_reports()
if __name__ == '__main__':
diff --git a/tox.ini b/tox.ini
index 4ec2939..dbd1652 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,6 @@
commands = bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \
-not \( -type d -name doc -prune \) \
- -not \( -type d -name shocco -prune \) \
-not \( -type f -name localrc -prune \) \
-type f \
-not -name \*~ \
@@ -48,7 +47,15 @@
whitelist_externals = bash
setenv =
TOP_DIR={toxinidir}
- INSTALL_SHOCCO=true
-commands =
- python setup.py build_sphinx
- bash tools/build_docs.sh
+commands =
+ python setup.py build_sphinx
+
+[testenv:venv]
+deps =
+ pbr>=0.6,!=0.7,<1.0
+ sphinx>=1.1.2,<1.2
+ oslosphinx
+ blockdiag
+ sphinxcontrib-blockdiag
+ sphinxcontrib-nwdiag
+commands = {posargs}