Merge "Add aodh and gnocchi to the plugin registry"
diff --git a/README.md b/README.md
index acc3e5a..ee7f0e7 100644
--- a/README.md
+++ b/README.md
@@ -77,361 +77,21 @@
of your hypervisor of choice to reduce testing cycle times. You might even save
enough time to write one more feature before the next feature freeze...
-``stack.sh`` needs to have root access for a lot of tasks, but uses ``sudo``
-for all of those tasks. However, it needs to be not-root for most of its
-work and for all of the OpenStack services. ``stack.sh`` specifically
-does not run if started as root.
+``stack.sh`` needs to have root access for a lot of tasks, but uses
+``sudo`` for all of those tasks. However, it needs to be not-root for
+most of its work and for all of the OpenStack services. ``stack.sh``
+specifically does not run if started as root.
-This is a recent change (Oct 2013) from the previous behaviour of
-automatically creating a ``stack`` user. Automatically creating
-user accounts is not the right response to running as root, so
-that bit is now an explicit step using ``tools/create-stack-user.sh``.
-Run that (as root!) or just check it out to see what DevStack's
-expectations are for the account it runs under. Many people simply
-use their usual login (the default 'ubuntu' login on a UEC image
-for example).
+DevStack will not automatically create the user, but provides a helper
+script in ``tools/create-stack-user.sh``. Run that (as root!) or just
+check it out to see what DevStack's expectations are for the account
+it runs under. Many people simply use their usual login (the default
+'ubuntu' login on a UEC image for example).
# Customizing
-You can override environment variables used in `stack.sh` by creating file
-name `local.conf` with a ``localrc`` section as shown below. It is likely
-that you will need to do this to tweak your networking configuration should
-you need to access your cloud from a different host.
-
- [[local|localrc]]
- VARIABLE=value
-
-See the **Local Configuration** section below for more details.
-
-# Database Backend
-
-Multiple database backends are available. The available databases are defined
-in the lib/databases directory.
-`mysql` is the default database, choose a different one by putting the
-following in the `localrc` section:
-
- disable_service mysql
- enable_service postgresql
-
-`mysql` is the default database.
-
-# RPC Backend
-
-Support for a RabbitMQ RPC backend is included. Additional RPC backends may
-be available via external plugins. Enabling or disabling RabbitMQ is handled
-via the usual service functions and ``ENABLED_SERVICES``.
-
-Example disabling RabbitMQ in ``local.conf``:
-
- disable_service rabbit
-
-# Apache Frontend
-
-Apache web server can be enabled for wsgi services that support being deployed
-under HTTPD + mod_wsgi. By default, services that recommend running under
-HTTPD + mod_wsgi are deployed under Apache. To use an alternative deployment
-strategy (e.g. eventlet) for services that support an alternative to HTTPD +
-mod_wsgi set ``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your
-``local.conf``.
-
-Each service that can be run under HTTPD + mod_wsgi also has an override
-toggle available that can be set in your ``local.conf``.
-
-Keystone is run under HTTPD + mod_wsgi by default.
-
-Example (Keystone):
-
- KEYSTONE_USE_MOD_WSGI="True"
-
-Example (Nova):
-
- NOVA_USE_MOD_WSGI="True"
-
-Example (Swift):
-
- SWIFT_USE_MOD_WSGI="True"
-
-# Swift
-
-Swift is disabled by default. When enabled, it is configured with
-only one replica to avoid being IO/memory intensive on a small
-vm. When running with only one replica the account, container and
-object services will run directly in screen. The others services like
-replicator, updaters or auditor runs in background.
-
-If you would like to enable Swift you can add this to your `localrc` section:
-
- enable_service s-proxy s-object s-container s-account
-
-If you want a minimal Swift install with only Swift and Keystone you
-can have this instead in your `localrc` section:
-
- disable_all_services
- enable_service key mysql s-proxy s-object s-container s-account
-
-If you only want to do some testing of a real normal swift cluster
-with multiple replicas you can do so by customizing the variable
-`SWIFT_REPLICAS` in your `localrc` section (usually to 3).
-
-# Swift S3
-
-If you are enabling `swift3` in `ENABLED_SERVICES` DevStack will
-install the swift3 middleware emulation. Swift will be configured to
-act as a S3 endpoint for Keystone so effectively replacing the
-`nova-objectstore`.
-
-Only Swift proxy server is launched in the screen session all other
-services are started in background and managed by `swift-init` tool.
-
-# Neutron
-
-Basic Setup
-
-In order to enable Neutron in a single node setup, you'll need the
-following settings in your `local.conf`:
-
- disable_service n-net
- enable_service q-svc
- enable_service q-agt
- enable_service q-dhcp
- enable_service q-l3
- enable_service q-meta
- enable_service q-metering
-
-Then run `stack.sh` as normal.
-
-DevStack supports setting specific Neutron configuration flags to the
-service, ML2 plugin, DHCP and L3 configuration files:
-
- [[post-config|/$Q_PLUGIN_CONF_FILE]]
- [ml2]
- mechanism_drivers=openvswitch,l2population
-
- [[post-config|$NEUTRON_CONF]]
- [DEFAULT]
- quota_port=42
-
- [[post-config|$Q_L3_CONF_FILE]]
- [DEFAULT]
- agent_mode=legacy
-
- [[post-config|$Q_DHCP_CONF_FILE]]
- [DEFAULT]
- dnsmasq_dns_servers = 8.8.8.8,8.8.4.4
-
-The ML2 plugin can run with the OVS, LinuxBridge, or Hyper-V agents on compute
-hosts. This is a simple way to configure the ml2 plugin:
-
- # VLAN configuration
- ENABLE_TENANT_VLANS=True
-
- # GRE tunnel configuration
- ENABLE_TENANT_TUNNELS=True
-
- # VXLAN tunnel configuration
- Q_ML2_TENANT_NETWORK_TYPE=vxlan
-
-The above will default in DevStack to using the OVS on each compute host.
-To change this, set the `Q_AGENT` variable to the agent you want to run
-(e.g. linuxbridge).
-
- Variable Name Notes
- ----------------------------------------------------------------------------
- Q_AGENT This specifies which agent to run with the
- ML2 Plugin (Typically either `openvswitch`
- or `linuxbridge`).
- Defaults to `openvswitch`.
- Q_ML2_PLUGIN_MECHANISM_DRIVERS The ML2 MechanismDrivers to load. The default
- is `openvswitch,linuxbridge`.
- Q_ML2_PLUGIN_TYPE_DRIVERS The ML2 TypeDrivers to load. Defaults to
- all available TypeDrivers.
- Q_ML2_PLUGIN_GRE_TYPE_OPTIONS GRE TypeDriver options. Defaults to
- `tunnel_id_ranges=1:1000'.
- Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS VXLAN TypeDriver options. Defaults to
- `vni_ranges=1001:2000`
- Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS VLAN TypeDriver options. Defaults to none.
-
-# Heat
-
-Heat is disabled by default (see `stackrc` file). To enable it explicitly
-you'll need the following settings in your `localrc` section:
-
- enable_service heat h-api h-api-cfn h-api-cw h-eng
-
-Heat can also run in standalone mode, and be configured to orchestrate
-on an external OpenStack cloud. To launch only Heat in standalone mode
-you'll need the following settings in your `localrc` section:
-
- disable_all_services
- enable_service rabbit mysql heat h-api h-api-cfn h-api-cw h-eng
- HEAT_STANDALONE=True
- KEYSTONE_SERVICE_HOST=...
- KEYSTONE_AUTH_HOST=...
-
-# Tempest
-
-If tempest has been successfully configured, a basic set of smoke
-tests can be run as follows:
-
- $ cd /opt/stack/tempest
- $ tox -efull tempest.scenario.test_network_basic_ops
-
-By default tempest is downloaded and the config file is generated, but the
-tempest package is not installed in the system's global site-packages (the
-package install includes installing dependences). So tempest won't run
-outside of tox. If you would like to install it add the following to your
-``localrc`` section:
-
- INSTALL_TEMPEST=True
-
-# DevStack on Xenserver
-
-If you would like to use Xenserver as the hypervisor, please refer
-to the instructions in `./tools/xen/README.md`.
-
-# Additional Projects
-
-DevStack has a hook mechanism to call out to a dispatch script at specific
-points in the execution of `stack.sh`, `unstack.sh` and `clean.sh`. This
-allows upper-layer projects, especially those that the lower layer projects
-have no dependency on, to be added to DevStack without modifying the core
-scripts. Tempest is built this way as an example of how to structure the
-dispatch script, see `extras.d/80-tempest.sh`. See `extras.d/README.md`
-for more information.
-
-# Multi-Node Setup
-
-A more interesting setup involves running multiple compute nodes, with Neutron
-networks connecting VMs on different compute nodes.
-You should run at least one "controller node", which should have a `stackrc`
-that includes at least:
-
- disable_service n-net
- enable_service q-svc
- enable_service q-agt
- enable_service q-dhcp
- enable_service q-l3
- enable_service q-meta
- enable_service neutron
-
-You likely want to change your `localrc` section to run a scheduler that
-will balance VMs across hosts:
-
- 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:
-
- ENABLED_SERVICES=n-cpu,rabbit,neutron,q-agt
- SERVICE_HOST=[IP of controller node]
- MYSQL_HOST=$SERVICE_HOST
- RABBIT_HOST=$SERVICE_HOST
- Q_HOST=$SERVICE_HOST
- MATCHMAKER_REDIS_HOST=$SERVICE_HOST
-
-# Multi-Region Setup
-
-We want to setup two devstack (RegionOne and RegionTwo) with shared keystone
-(same users and services) and horizon.
-Keystone and Horizon will be located in RegionOne.
-Full spec is available at:
-https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat.
-
-In RegionOne:
-
- REGION_NAME=RegionOne
-
-In RegionTwo:
-
- disable_service horizon
- KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
- KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
- REGION_NAME=RegionTwo
-
-# Cells
-
-Cells is a new scaling option with a full spec at:
-http://wiki.openstack.org/blueprint-nova-compute-cells.
-
-To setup a cells environment add the following to your `localrc` section:
-
- enable_service n-cell
-
-Be aware that there are some features currently missing in cells, one notable
-one being security groups. The exercises have been patched to disable
-functionality not supported by cells.
-
-# IPv6
-
-By default, most Openstack services are bound to 0.0.0.0
-and service endpoints are registered as IPv4 addresses.
-A new variable was created to control this behavior, and to
-allow for operation over IPv6 instead of IPv4.
-
-For this, add the following to `local.conf`:
-
- SERVICE_IP_VERSION=6
-
-When set to "6" devstack services will open listen sockets on ::
-and service endpoints will be registered using HOST_IPV6 as the
-address. The default value for this setting is `4`. Dual-mode
-support, for example `4+6` is not currently supported.
-
-
-# Local Configuration
-
-Historically DevStack has used ``localrc`` to contain all local configuration
-and customizations. More and more of the configuration variables available for
-DevStack are passed-through to the individual project configuration files.
-The old mechanism for this required specific code for each file and did not
-scale well. This is handled now by a master local configuration file.
-
-# local.conf
-
-The new config file ``local.conf`` is an extended-INI format that introduces
-a new meta-section header that provides some additional information such
-as a phase name and destination config filename:
-
- [[ <phase> | <config-file-name> ]]
-
-where ``<phase>`` is one of a set of phase names defined by ``stack.sh``
-and ``<config-file-name>`` is the configuration filename. The filename is
-eval'ed in the ``stack.sh`` context so all environment variables are
-available and may be used. Using the project config file variables in
-the header is strongly suggested (see the ``NOVA_CONF`` example below).
-If the path of the config file does not exist it is skipped.
-
-The defined phases are:
-
-* **local** - extracts ``localrc`` from ``local.conf`` before ``stackrc`` is sourced
-* **post-config** - runs after the layer 2 services are configured
- and before they are started
-* **extra** - runs after services are started and before any files
- in ``extra.d`` are executed
-* **post-extra** - runs after files in ``extra.d`` are executed
-
-The file is processed strictly in sequence; meta-sections may be specified more
-than once but if any settings are duplicated the last to appear in the file
-will be used.
-
- [[post-config|$NOVA_CONF]]
- [DEFAULT]
- use_syslog = True
-
- [osapi_v3]
- enabled = False
-
-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.
-
- [[local|localrc]]
- FIXED_RANGE=10.254.1.0/24
- ADMIN_PASSWORD=speciale
- LOGFILE=$DEST/logs/stack.sh.log
-
-Note that ``Q_PLUGIN_CONF_FILE`` is unique in that it is assumed to *NOT*
-start with a ``/`` (slash) character. A slash will need to be added:
-
- [[post-config|/$Q_PLUGIN_CONF_FILE]]
+DevStack can be extensively configured via the configuration file
+`local.conf`. It is likely that you will need to provide and modify
+this file if you want anything other than the most basic setup. Start
+by reading the [configuration guide](doc/source/configuration.rst) for
+details of the configuration file and the many available options.
\ No newline at end of file
diff --git a/clean.sh b/clean.sh
index 74bcaee..78e2a7a 100755
--- a/clean.sh
+++ b/clean.sh
@@ -41,6 +41,7 @@
source $TOP_DIR/lib/tls
source $TOP_DIR/lib/oslo
+source $TOP_DIR/lib/lvm
source $TOP_DIR/lib/horizon
source $TOP_DIR/lib/keystone
source $TOP_DIR/lib/glance
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 90b7d44..983f5c0 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -6,34 +6,15 @@
:local:
:depth: 1
-DevStack has always tried to be mostly-functional with a minimal amount
-of configuration. The number of options has ballooned as projects add
-features, new projects added and more combinations need to be tested.
-Historically DevStack obtained all local configuration and
-customizations from a ``localrc`` file. The number of configuration
-variables that are simply passed-through to the individual project
-configuration files is also increasing. The old mechanism for this
-(``EXTRAS_OPTS`` and friends) required specific code for each file and
-did not scale well.
-
-In Oct 2013 a new configuration method was introduced (in `review
-46768 <https://review.openstack.org/#/c/46768/>`__) to hopefully
-simplify this process and meet the following goals:
-
-- contain all non-default local configuration in a single file
-- be backward-compatible with ``localrc`` to smooth the transition
- process
-- allow settings in arbitrary configuration files to be changed
-
local.conf
==========
-The new configuration file is ``local.conf`` and should reside in the
-root Devstack directory. An example of such ``local.conf`` file
-is provided in the ``devstack/samples`` directory. Copy this file into
-the root Devstack directory and adapt it to your needs. It is a modified INI
-format file that introduces a meta-section header to carry additional
-information regarding the configuration files to be changed.
+DevStack configuration is modified via the file ``local.conf``. It is
+a modified INI format file that introduces a meta-section header to
+carry additional information regarding the configuration files to be
+changed.
+
+A sample is provided in ``devstack/samples``
The new header is similar to a normal INI section header but with double
brackets (``[[ ... ]]``) and two internal fields separated by a pipe
@@ -148,6 +129,15 @@
Setting it here also makes it available for ``openrc`` to set ``OS_AUTH_URL``.
``HOST_IPV6`` is not set by default.
+Historical Notes
+================
+
+Historically DevStack obtained all local configuration and
+customizations from a ``localrc`` file. In Oct 2013 the
+``local.conf`` configuration method was introduced (in `review 46768
+<https://review.openstack.org/#/c/46768/>`__) to simplify this
+process.
+
Configuration Notes
===================
@@ -228,6 +218,86 @@
SYSLOG_HOST=$HOST_IP
SYSLOG_PORT=516
+
+Example Logging Configuration
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For example, non-interactive installs probably wish to save output to
+a file, keep service logs and disable color in the stored files.
+
+ ::
+
+ [[local|localrc]]
+ DEST=/opt/stack/
+ LOGDIR=$DEST/logs
+ LOGFILE=$LOGDIR/stack.sh.log
+ LOG_COLOR=False
+
+Database Backend
+----------------
+
+Multiple database backends are available. The available databases are defined
+in the lib/databases directory.
+`mysql` is the default database, choose a different one by putting the
+following in the `localrc` section:
+
+ ::
+
+ disable_service mysql
+ enable_service postgresql
+
+`mysql` is the default database.
+
+RPC Backend
+-----------
+
+Support for a RabbitMQ RPC backend is included. Additional RPC
+backends may be available via external plugins. Enabling or disabling
+RabbitMQ is handled via the usual service functions and
+``ENABLED_SERVICES``.
+
+Example disabling RabbitMQ in ``local.conf``:
+
+::
+ disable_service rabbit
+
+
+Apache Frontend
+---------------
+
+The Apache web server can be enabled for wsgi services that support
+being deployed under HTTPD + mod_wsgi. By default, services that
+recommend running under HTTPD + mod_wsgi are deployed under Apache. To
+use an alternative deployment strategy (e.g. eventlet) for services
+that support an alternative to HTTPD + mod_wsgi set
+``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your
+``local.conf``.
+
+Each service that can be run under HTTPD + mod_wsgi also has an
+override toggle available that can be set in your ``local.conf``.
+
+Keystone is run under Apache with ``mod_wsgi`` by default.
+
+Example (Keystone)
+
+::
+
+ KEYSTONE_USE_MOD_WSGI="True"
+
+Example (Nova):
+
+::
+
+ NOVA_USE_MOD_WSGI="True"
+
+Example (Swift):
+
+::
+
+ SWIFT_USE_MOD_WSGI="True"
+
+
+
Libraries from Git
------------------
@@ -295,48 +365,6 @@
PIP_UPGRADE=True
-Swift
------
-
-Swift is now used as the back-end for the S3-like object store. When
-enabled Nova's objectstore (``n-obj`` in ``ENABLED_SERVICES``) is
-automatically disabled. Enable Swift by adding it services to
-``ENABLED_SERVICES``
-
- ::
-
- enable_service s-proxy s-object s-container s-account
-
-Setting Swift's 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 number of replicas is set to
-``1`` to reduce the overhead required. To better simulate a production
-deployment set this to ``3`` or more.
-
- ::
-
- SWIFT_REPLICAS=3
-
-The data for Swift is stored in the source tree by default (in
-``$DEST/swift/data``) and can be moved by setting
-``SWIFT_DATA_DIR``. The specified directory will be created if it does
-not exist.
-
- ::
-
- SWIFT_DATA_DIR=$DEST/data/swift
-
-*Note*: Previously just enabling ``swift`` was sufficient to start the
-Swift services. That does not provide proper service granularity,
-particularly in multi-host configurations, and is considered
-deprecated. Some service combination tests now check for specific
-Swift services and the old blanket acceptance will longer work
-correctly.
Service Catalog Backend
-----------------------
@@ -354,47 +382,24 @@
DevStack's default configuration in ``sql`` mode is set in
``files/keystone_data.sh``
-Cinder
-------
-The logical volume group used to hold the Cinder-managed volumes is
-set by ``VOLUME_GROUP``, the logical volume name prefix is set with
-``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set
-with ``VOLUME_BACKING_FILE_SIZE``.
+Guest Images
+------------
+
+Images provided in URLS via the comma-separated ``IMAGE_URLS``
+variable will be downloaded and uploaded to glance by DevStack.
+
+Default guest-images are predefined for each type of hypervisor and
+their testing-requirements in ``stack.sh``. Setting
+``DOWNLOAD_DEFAULT_IMAGES=False`` will prevent DevStack downloading
+these default images; in that case, you will want to populate
+``IMAGE_URLS`` with sufficient images to satisfy testing-requirements.
::
- VOLUME_GROUP="stack-volumes"
- VOLUME_NAME_PREFIX="volume-"
- VOLUME_BACKING_FILE_SIZE=10250M
-
-Multi-host DevStack
--------------------
-
-Running DevStack with multiple hosts requires a custom ``local.conf``
-section for each host. The master is the same as a single host
-installation with ``MULTI_HOST=True``. The slaves have fewer services
-enabled and a couple of host variables pointing to the master.
-
-Master
-~~~~~~
-
-Set ``MULTI_HOST`` to true
- ::
-
- MULTI_HOST=True
-
-Slave
-~~~~~
-
-Set the following options to point to the master
-
- ::
-
- MYSQL_HOST=w.x.y.z
- RABBIT_HOST=w.x.y.z
- GLANCE_HOSTPORT=w.x.y.z:9292
- ENABLED_SERVICES=n-vol,n-cpu,n-net,n-api
+ DOWNLOAD_DEFAULT_IMAGES=False
+ IMAGE_URLS="http://foo.bar.com/image.qcow,"
+ IMAGE_URLS+="http://foo.bar.com/image2.qcow"
IP Version
----------
@@ -447,29 +452,163 @@
HOST_IPV6=${some_local_ipv6_address}
-Examples
-========
+Multi-node setup
+~~~~~~~~~~~~~~~~
-- Eliminate a Cinder pass-through (``CINDER_PERIODIC_INTERVAL``):
+See the :doc:`multi-node lab guide<guides/multinode-lab>`
- ::
+Projects
+--------
- [[post-config|$CINDER_CONF]]
- [DEFAULT]
- periodic_interval = 60
+Neutron
+~~~~~~~
-- Sample ``local.conf`` with screen logging enabled:
+See the :doc:`neutron configuration guide<guides/neutron>` for
+details on configuration of Neutron
- ::
- [[local|localrc]]
- FIXED_RANGE=10.254.1.0/24
- NETWORK_GATEWAY=10.254.1.1
- LOGDAYS=1
- LOGDIR=$DEST/logs
- LOGFILE=$LOGDIR/stack.sh.log
- ADMIN_PASSWORD=quiet
- DATABASE_PASSWORD=$ADMIN_PASSWORD
- RABBIT_PASSWORD=$ADMIN_PASSWORD
- SERVICE_PASSWORD=$ADMIN_PASSWORD
- SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50
+Swift
+~~~~~
+
+Swift is disabled by default. When enabled, it is configured with
+only one replica to avoid being IO/memory intensive on a small
+VM. When running with only one replica the account, container and
+object services will run directly in screen. The others services like
+replicator, updaters or auditor runs in background.
+
+If you would like to enable Swift you can add this to your `localrc`
+section:
+
+::
+
+ enable_service s-proxy s-object s-container s-account
+
+If you want a minimal Swift install with only Swift and Keystone you
+can have this instead in your `localrc` section:
+
+::
+
+ disable_all_services
+ enable_service key mysql s-proxy s-object s-container s-account
+
+If you only want to do some testing of a real normal swift cluster
+with multiple replicas you can do so by customizing the variable
+`SWIFT_REPLICAS` in your `localrc` section (usually to 3).
+
+Swift S3
+++++++++
+
+If you are enabling `swift3` in `ENABLED_SERVICES` DevStack will
+install the swift3 middleware emulation. Swift will be configured to
+act as a S3 endpoint for Keystone so effectively replacing the
+`nova-objectstore`.
+
+Only Swift proxy server is launched in the screen session all other
+services are started in background and managed by `swift-init` tool.
+
+Heat
+~~~~
+
+Heat is disabled by default (see `stackrc` file). To enable it
+explicitly you'll need the following settings in your `localrc`
+section
+
+::
+
+ enable_service heat h-api h-api-cfn h-api-cw h-eng
+
+Heat can also run in standalone mode, and be configured to orchestrate
+on an external OpenStack cloud. To launch only Heat in standalone mode
+you'll need the following settings in your `localrc` section
+
+::
+
+ disable_all_services
+ enable_service rabbit mysql heat h-api h-api-cfn h-api-cw h-eng
+ HEAT_STANDALONE=True
+ KEYSTONE_SERVICE_HOST=...
+ KEYSTONE_AUTH_HOST=...
+
+Tempest
+~~~~~~~
+
+If tempest has been successfully configured, a basic set of smoke
+tests can be run as follows:
+
+::
+
+ $ cd /opt/stack/tempest
+ $ tox -efull tempest.scenario.test_network_basic_ops
+
+By default tempest is downloaded and the config file is generated, but the
+tempest package is not installed in the system's global site-packages (the
+package install includes installing dependences). So tempest won't run
+outside of tox. If you would like to install it add the following to your
+``localrc`` section:
+
+::
+
+ INSTALL_TEMPEST=True
+
+
+Xenserver
+~~~~~~~~~
+
+If you would like to use Xenserver as the hypervisor, please refer to
+the instructions in `./tools/xen/README.md`.
+
+Cells
+~~~~~
+
+`Cells <http://wiki.openstack.org/blueprint-nova-compute-cells>`__ is
+an alternative scaling option. To setup a cells environment add the
+following to your `localrc` section:
+
+::
+
+ enable_service n-cell
+
+Be aware that there are some features currently missing in cells, one
+notable one being security groups. The exercises have been patched to
+disable functionality not supported by cells.
+
+Cinder
+~~~~~~
+
+The logical volume group used to hold the Cinder-managed volumes is
+set by ``VOLUME_GROUP``, the logical volume name prefix is set with
+``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set
+with ``VOLUME_BACKING_FILE_SIZE``.
+
+ ::
+
+ VOLUME_GROUP="stack-volumes"
+ VOLUME_NAME_PREFIX="volume-"
+ VOLUME_BACKING_FILE_SIZE=10250M
+
+
+Keystone
+~~~~~~~~
+
+Multi-Region Setup
+++++++++++++++++++
+
+We want to setup two devstack (RegionOne and RegionTwo) with shared
+keystone (same users and services) and horizon. Keystone and Horizon
+will be located in RegionOne. Full spec is available at:
+`<https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat>`__.
+
+In RegionOne:
+
+::
+
+ REGION_NAME=RegionOne
+
+In RegionTwo:
+
+::
+
+ disable_service horizon
+ KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
+ KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
+ REGION_NAME=RegionTwo
diff --git a/doc/source/guides/single-vm.rst b/doc/source/guides/single-vm.rst
index c2ce1a3..515cd50 100644
--- a/doc/source/guides/single-vm.rst
+++ b/doc/source/guides/single-vm.rst
@@ -78,6 +78,11 @@
As DevStack will refuse to run as root, this configures ``cloud-init``
to create a non-root user and run the ``start.sh`` script as that user.
+If you are using cloud-init and you have not
+`enabled custom logging <../configuration.html#enable-logging>`_ of the stack
+output, then the stack output can be found in
+``/var/log/cloud-init-output.log`` by default.
+
Launching By Hand
-----------------
diff --git a/exercises/aggregates.sh b/exercises/aggregates.sh
index 01d548d..808ef76 100755
--- a/exercises/aggregates.sh
+++ b/exercises/aggregates.sh
@@ -31,18 +31,13 @@
EXERCISE_DIR=$(cd $(dirname "$0") && pwd)
TOP_DIR=$(cd $EXERCISE_DIR/..; pwd)
-# Import common functions
-source $TOP_DIR/functions
-
-# Import configuration
-source $TOP_DIR/openrc
+# Test as the admin user
+# note this imports stackrc/functions, etc
+. $TOP_DIR/openrc admin admin
# Import exercise configuration
source $TOP_DIR/exerciserc
-# Test as the admin user
-. $TOP_DIR/openrc admin admin
-
# If nova api is not enabled we exit with exitcode 55 so that
# the exercise is skipped
is_service_enabled n-api || exit 55
diff --git a/functions-common b/functions-common
index f6a5253..446de53 100644
--- a/functions-common
+++ b/functions-common
@@ -591,7 +591,7 @@
host_ip=""
# Find the interface used for the default route
host_ip_iface=${host_ip_iface:-$(ip -f $af route | awk '/default/ {print $5}' | head -1)}
- local host_ips=$(LC_ALL=C ip -f $af addr show ${host_ip_iface} | awk /$af'/ {split($2,parts,"/"); print parts[1]}')
+ local host_ips=$(LC_ALL=C ip -f $af addr show ${host_ip_iface} | sed /temporary/d |awk /$af'/ {split($2,parts,"/"); print parts[1]}')
local ip
for ip in $host_ips; do
# Attempt to filter out IP addresses that are part of the fixed and
diff --git a/inc/ini-config b/inc/ini-config
index 8e7c018..58386e2 100644
--- a/inc/ini-config
+++ b/inc/ini-config
@@ -15,30 +15,40 @@
# ================
# Append a new option in an ini file without replacing the old value
-# iniadd config-file section option value1 value2 value3 ...
+# iniadd [-sudo] config-file section option value1 value2 value3 ...
function iniadd {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
+ local sudo=""
+ if [ $1 == "-sudo" ]; then
+ sudo="-sudo "
+ shift
+ fi
local file=$1
local section=$2
local option=$3
shift 3
local values="$(iniget_multiline $file $section $option) $@"
- iniset_multiline $file $section $option $values
+ iniset_multiline $sudo $file $section $option $values
$xtrace
}
# Comment an option in an INI file
-# inicomment config-file section option
+# inicomment [-sudo] config-file section option
function inicomment {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
+ local sudo=""
+ if [ $1 == "-sudo" ]; then
+ sudo="sudo "
+ shift
+ fi
local file=$1
local section=$2
local option=$3
- sed -i -e "/^\[$section\]/,/^\[.*\]/ s|^\($option[ \t]*=.*$\)|#\1|" "$file"
+ $sudo sed -i -e "/^\[$section\]/,/^\[.*\]/ s|^\($option[ \t]*=.*$\)|#\1|" "$file"
$xtrace
}
@@ -95,10 +105,15 @@
# in the argument list. Doing that will cause incorrect configuration
# if spaces are used in the config values.
#
-# iniadd_literal config-file section option value
+# iniadd_literal [-sudo] config-file section option value
function iniadd_literal {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
+ local sudo=""
+ if [ $1 == "-sudo" ]; then
+ sudo="sudo "
+ shift
+ fi
local file=$1
local section=$2
local option=$3
@@ -110,7 +125,7 @@
fi
# Add it
- sed -i -e "/^\[$section\]/ a\\
+ $sudo sed -i -e "/^\[$section\]/ a\\
$option = $value
" "$file"
@@ -118,10 +133,15 @@
}
# Remove an option from an INI file
-# inidelete config-file section option
+# inidelete [-sudo] config-file section option
function inidelete {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
+ local sudo=""
+ if [ $1 == "-sudo" ]; then
+ sudo="sudo "
+ shift
+ fi
local file=$1
local section=$2
local option=$3
@@ -132,16 +152,22 @@
fi
# Remove old values
- sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
+ $sudo sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
$xtrace
}
# Set an option in an INI file
-# iniset config-file section option value
+# iniset [-sudo] config-file section option value
+# - if the file does not exist, it is created
function iniset {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
+ local sudo=""
+ if [ $1 == "-sudo" ]; then
+ sudo="sudo "
+ shift
+ fi
local file=$1
local section=$2
local option=$3
@@ -154,26 +180,31 @@
if ! grep -q "^\[$section\]" "$file" 2>/dev/null; then
# Add section at the end
- echo -e "\n[$section]" >>"$file"
+ echo -e "\n[$section]" | $sudo tee --append "$file" > /dev/null
fi
if ! ini_has_option "$file" "$section" "$option"; then
# Add it
- sed -i -e "/^\[$section\]/ a\\
+ $sudo sed -i -e "/^\[$section\]/ a\\
$option = $value
" "$file"
else
local sep=$(echo -ne "\x01")
# Replace it
- sed -i -e '/^\['${section}'\]/,/^\[.*\]/ s'${sep}'^\('${option}'[ \t]*=[ \t]*\).*$'${sep}'\1'"${value}"${sep} "$file"
+ $sudo sed -i -e '/^\['${section}'\]/,/^\[.*\]/ s'${sep}'^\('${option}'[ \t]*=[ \t]*\).*$'${sep}'\1'"${value}"${sep} "$file"
fi
$xtrace
}
# Set a multiple line option in an INI file
-# iniset_multiline config-file section option value1 value2 valu3 ...
+# iniset_multiline [-sudo] config-file section option value1 value2 valu3 ...
function iniset_multiline {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
+ local sudo=""
+ if [ $1 == "-sudo" ]; then
+ sudo="sudo "
+ shift
+ fi
local file=$1
local section=$2
local option=$3
@@ -188,14 +219,14 @@
done
if ! grep -q "^\[$section\]" "$file"; then
# Add section at the end
- echo -e "\n[$section]" >>"$file"
+ echo -e "\n[$section]" | $sudo tee --append "$file" > /dev/null
else
# Remove old values
- sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
+ $sudo sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
fi
# Add new ones
for v in $values; do
- sed -i -e "/^\[$section\]/ a\\
+ $sudo sed -i -e "/^\[$section\]/ a\\
$option = $v
" "$file"
done
@@ -207,10 +238,15 @@
function iniuncomment {
local xtrace=$(set +o | grep xtrace)
set +o xtrace
+ local sudo=""
+ if [ $1 == "-sudo" ]; then
+ sudo="sudo "
+ shift
+ fi
local file=$1
local section=$2
local option=$3
- sed -i -e "/^\[$section\]/,/^\[.*\]/ s|[^ \t]*#[ \t]*\($option[ \t]*=.*$\)|\1|" "$file"
+ $sudo sed -i -e "/^\[$section\]/,/^\[.*\]/ s|[^ \t]*#[ \t]*\($option[ \t]*=.*$\)|\1|" "$file"
$xtrace
}
diff --git a/lib/ceilometer b/lib/ceilometer
index 3df75b7..c6c4c87 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -102,9 +102,6 @@
CEILOMETER_COORDINATION_URL=${CEILOMETER_COORDINATION_URL:-}
CEILOMETER_PIPELINE_INTERVAL=${CEILOMETER_PIPELINE_INTERVAL:-}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,ceilometer
-
# Functions
# ---------
@@ -363,10 +360,10 @@
# start_ceilometer() - Start running processes, including screen
function start_ceilometer {
- run_process ceilometer-acentral "$CEILOMETER_BIN_DIR/ceilometer-agent-central --config-file $CEILOMETER_CONF"
+ run_process ceilometer-acentral "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces central --config-file $CEILOMETER_CONF"
run_process ceilometer-anotification "$CEILOMETER_BIN_DIR/ceilometer-agent-notification --config-file $CEILOMETER_CONF"
run_process ceilometer-collector "$CEILOMETER_BIN_DIR/ceilometer-collector --config-file $CEILOMETER_CONF"
- run_process ceilometer-aipmi "$CEILOMETER_BIN_DIR/ceilometer-agent-ipmi --config-file $CEILOMETER_CONF"
+ run_process ceilometer-aipmi "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces ipmi --config-file $CEILOMETER_CONF"
if [[ "$CEILOMETER_USE_MOD_WSGI" == "False" ]]; then
run_process ceilometer-api "$CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
@@ -381,10 +378,10 @@
# Start the compute agent last to allow time for the collector to
# fully wake up and connect to the message bus. See bug #1355809
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
- run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_CONF" $LIBVIRT_GROUP
+ run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces compute --config-file $CEILOMETER_CONF" $LIBVIRT_GROUP
fi
if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
- run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_CONF"
+ run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces compute --config-file $CEILOMETER_CONF"
fi
# Only die on API if it was actually intended to be turned on
diff --git a/lib/cinder b/lib/cinder
index e5ed2db..26277cc 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -108,9 +108,6 @@
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,cinder
-
# Source the enabled backends
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 7ae9a93..ada56a7 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -92,14 +92,12 @@
# Change bind-address from localhost (127.0.0.1) to any (::) and
# set default db type to InnoDB
- sudo bash -c "source $TOP_DIR/functions && \
- iniset $my_conf mysqld bind-address "$SERVICE_LISTEN_ADDRESS" && \
- iniset $my_conf mysqld sql_mode STRICT_ALL_TABLES && \
- iniset $my_conf mysqld default-storage-engine InnoDB && \
- iniset $my_conf mysqld max_connections 1024 && \
- iniset $my_conf mysqld query_cache_type OFF && \
- iniset $my_conf mysqld query_cache_size 0"
-
+ iniset -sudo $my_conf mysqld bind-address "$SERVICE_LISTEN_ADDRESS"
+ iniset -sudo $my_conf mysqld sql_mode STRICT_ALL_TABLES
+ iniset -sudo $my_conf mysqld default-storage-engine InnoDB
+ iniset -sudo $my_conf mysqld max_connections 1024
+ iniset -sudo $my_conf mysqld query_cache_type OFF
+ iniset -sudo $my_conf mysqld query_cache_size 0
if [[ "$DATABASE_QUERY_LOGGING" == "True" ]]; then
echo_summary "Enabling MySQL query logging"
@@ -115,12 +113,10 @@
# Turn on slow query log, log all queries (any query taking longer than
# 0 seconds) and log all non-indexed queries
- sudo bash -c "source $TOP_DIR/functions && \
- iniset $my_conf mysqld slow-query-log 1 && \
- iniset $my_conf mysqld slow-query-log-file $slow_log && \
- iniset $my_conf mysqld long-query-time 0 && \
- iniset $my_conf mysqld log-queries-not-using-indexes 1"
-
+ iniset -sudo $my_conf mysqld slow-query-log 1
+ iniset -sudo $my_conf mysqld slow-query-log-file $slow_log
+ iniset -sudo $my_conf mysqld long-query-time 0
+ iniset -sudo $my_conf mysqld log-queries-not-using-indexes 1
fi
restart_service $mysql
diff --git a/lib/glance b/lib/glance
index b1b0f32..7be3a84 100644
--- a/lib/glance
+++ b/lib/glance
@@ -75,9 +75,6 @@
GLANCE_SEARCH_PORT_INT=${GLANCE_SEARCH_PORT_INT:-19393}
GLANCE_SEARCH_HOSTPORT=${GLANCE_SEARCH_HOSTPORT:-$GLANCE_SERVICE_HOST:$GLANCE_SEARCH_PORT}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,glance
-
# Functions
# ---------
diff --git a/lib/heat b/lib/heat
index cedddd2..3e6975a 100644
--- a/lib/heat
+++ b/lib/heat
@@ -53,6 +53,8 @@
HEAT_API_HOST=${HEAT_API_HOST:-$HOST_IP}
HEAT_API_PORT=${HEAT_API_PORT:-8004}
+# Support entry points installation of console scripts
+HEAT_BIN_DIR=$(get_python_exec_prefix)
# other default options
if [[ "$HEAT_STANDALONE" = "True" ]]; then
@@ -64,10 +66,6 @@
HEAT_DEFERRED_AUTH=${HEAT_DEFERRED_AUTH:-trusts}
fi
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,heat
-
-
# Functions
# ---------
@@ -190,7 +188,7 @@
# (re)create heat database
recreate_database heat
- $HEAT_DIR/bin/heat-manage db_sync
+ $HEAT_BIN_DIR/heat-manage db_sync
create_heat_cache_dir
}
@@ -227,10 +225,10 @@
# start_heat() - Start running processes, including screen
function start_heat {
- run_process h-eng "$HEAT_DIR/bin/heat-engine --config-file=$HEAT_CONF"
- run_process h-api "$HEAT_DIR/bin/heat-api --config-file=$HEAT_CONF"
- run_process h-api-cfn "$HEAT_DIR/bin/heat-api-cfn --config-file=$HEAT_CONF"
- run_process h-api-cw "$HEAT_DIR/bin/heat-api-cloudwatch --config-file=$HEAT_CONF"
+ run_process h-eng "$HEAT_BIN_DIR/heat-engine --config-file=$HEAT_CONF"
+ run_process h-api "$HEAT_BIN_DIR/heat-api --config-file=$HEAT_CONF"
+ run_process h-api-cfn "$HEAT_BIN_DIR/heat-api-cfn --config-file=$HEAT_CONF"
+ run_process h-api-cw "$HEAT_BIN_DIR/heat-api-cloudwatch --config-file=$HEAT_CONF"
}
# stop_heat() - Stop running processes
diff --git a/lib/horizon b/lib/horizon
index 9fe0aa8..b2539d1 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -35,10 +35,6 @@
# The example file in Horizon repo is used by default.
HORIZON_SETTINGS=${HORIZON_SETTINGS:-$HORIZON_DIR/openstack_dashboard/local/local_settings.py.example}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,horizon
-
-
# Functions
# ---------
diff --git a/lib/ironic b/lib/ironic
index b3ad586..9069d79 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -31,6 +31,7 @@
# Set up default directories
GITDIR["python-ironicclient"]=$DEST/python-ironicclient
+GITDIR["ironic-lib"]=$DEST/ironic-lib
IRONIC_DIR=$DEST/ironic
IRONIC_PYTHON_AGENT_DIR=$DEST/ironic-python-agent
@@ -114,9 +115,6 @@
IRONIC_SERVICE_PORT=${IRONIC_SERVICE_PORT:-6385}
IRONIC_HOSTPORT=${IRONIC_HOSTPORT:-$SERVICE_HOST:$IRONIC_SERVICE_PORT}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,ironic
-
# Enable iPXE
IRONIC_IPXE_ENABLED=$(trueorfalse False IRONIC_IPXE_ENABLED)
IRONIC_HTTP_DIR=${IRONIC_HTTP_DIR:-$IRONIC_DATA_DIR/httpboot}
@@ -191,6 +189,12 @@
die $LINENO "$srv should be enabled for Ironic."
fi
done
+
+ if use_library_from_git "ironic-lib"; then
+ git_clone_by_name "ironic-lib"
+ setup_dev_lib "ironic-lib"
+ fi
+
git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH
setup_develop $IRONIC_DIR
diff --git a/lib/neutron-legacy b/lib/neutron-legacy
old mode 100644
new mode 100755
index d0eb0c0..d1865d8
--- a/lib/neutron-legacy
+++ b/lib/neutron-legacy
@@ -158,8 +158,6 @@
Q_USE_DEBUG_COMMAND=${Q_USE_DEBUG_COMMAND:-False}
# The name of the default q-l3 router
Q_ROUTER_NAME=${Q_ROUTER_NAME:-router1}
-# nova vif driver that all plugins should use
-NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
Q_NOTIFY_NOVA_PORT_STATUS_CHANGES=${Q_NOTIFY_NOVA_PORT_STATUS_CHANGES:-True}
Q_NOTIFY_NOVA_PORT_DATA_CHANGES=${Q_NOTIFY_NOVA_PORT_DATA_CHANGES:-True}
VIF_PLUGGING_IS_FATAL=${VIF_PLUGGING_IS_FATAL:-True}
@@ -328,7 +326,9 @@
# ---------------------------------
# Please refer to ``lib/neutron_plugins/README.md`` for details.
-source $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN
+if [ -f $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN ]; then
+ source $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN
+fi
# Agent loadbalancer service plugin functions
# -------------------------------------------
@@ -358,10 +358,6 @@
Q_USE_SECGROUP=False
fi
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,neutron
-
-
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace
@@ -495,10 +491,9 @@
iniset $NOVA_CONF DEFAULT security_group_api neutron
fi
- # set NOVA_VIF_DRIVER and optionally set options in nova_conf
+ # optionally set options in nova_conf
neutron_plugin_create_nova_conf
- iniset $NOVA_CONF libvirt vif_driver "$NOVA_VIF_DRIVER"
iniset $NOVA_CONF DEFAULT linuxnet_interface_driver "$LINUXNET_VIF_DRIVER"
if is_service_enabled q-meta; then
iniset $NOVA_CONF neutron service_metadata_proxy "True"
@@ -619,16 +614,6 @@
recreate_database $Q_DB_NAME
# Run Neutron db migrations
$NEUTRON_BIN_DIR/neutron-db-manage --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
- for svc in fwaas lbaas vpnaas; do
- if [ "$svc" = "vpnaas" ]; then
- q_svc="q-vpn"
- else
- q_svc="q-$svc"
- fi
- if is_service_enabled $q_svc; then
- $NEUTRON_BIN_DIR/neutron-db-manage --service $svc --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
- fi
- done
}
# install_neutron() - Collect source and prepare
@@ -841,11 +826,11 @@
fi
if [[ "$IP_BRD" != "" ]]; then
- IP_ADD="sudo ip addr del $IP_BRD dev $from_intf"
- IP_DEL="sudo ip addr add $IP_BRD dev $to_intf"
+ IP_DEL="sudo ip addr del $IP_BRD dev $from_intf"
+ IP_ADD="sudo ip addr add $IP_BRD dev $to_intf"
fi
- $IP_ADD; $IP_DEL; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE
+ $IP_DEL; $IP_ADD; $ADD_OVS_PORT; $ADD_DEFAULT_ROUTE
fi
}
diff --git a/lib/neutron_plugins/README.md b/lib/neutron_plugins/README.md
index 4b220d3..f03000e 100644
--- a/lib/neutron_plugins/README.md
+++ b/lib/neutron_plugins/README.md
@@ -16,9 +16,7 @@
``lib/neutron-legacy`` calls the following functions when the ``$Q_PLUGIN`` is enabled
* ``neutron_plugin_create_nova_conf`` :
- set ``NOVA_VIF_DRIVER`` and optionally set options in nova_conf
- e.g.
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
+ optionally set options in nova_conf
* ``neutron_plugin_install_agent_packages`` :
install packages that is specific to plugin agent
e.g.
diff --git a/lib/neutron_plugins/brocade b/lib/neutron_plugins/brocade
index b8166d9..557b94d 100644
--- a/lib/neutron_plugins/brocade
+++ b/lib/neutron_plugins/brocade
@@ -12,7 +12,7 @@
}
function neutron_plugin_create_nova_conf {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
+ :
}
function neutron_plugin_install_agent_packages {
diff --git a/lib/neutron_plugins/ibm b/lib/neutron_plugins/ibm
index 3660a9f..dd5cfa6 100644
--- a/lib/neutron_plugins/ibm
+++ b/lib/neutron_plugins/ibm
@@ -42,7 +42,6 @@
}
function neutron_plugin_create_nova_conf {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
# if n-cpu is enabled, then setup integration bridge
if is_service_enabled n-cpu; then
neutron_setup_integration_bridge
diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2
index 13ffee9..ace5335 100755
--- a/lib/neutron_plugins/ml2
+++ b/lib/neutron_plugins/ml2
@@ -19,7 +19,9 @@
# Default openvswitch L2 agent
Q_AGENT=${Q_AGENT:-openvswitch}
-source $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent
+if [ -f $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent ]; then
+ source $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent
+fi
# List of MechanismDrivers to load
Q_ML2_PLUGIN_MECHANISM_DRIVERS=${Q_ML2_PLUGIN_MECHANISM_DRIVERS:-openvswitch,linuxbridge}
diff --git a/lib/neutron_plugins/nuage b/lib/neutron_plugins/nuage
index 7bce233..9e5307b 100644
--- a/lib/neutron_plugins/nuage
+++ b/lib/neutron_plugins/nuage
@@ -10,7 +10,6 @@
function neutron_plugin_create_nova_conf {
NOVA_OVS_BRIDGE=${NOVA_OVS_BRIDGE:-"br-int"}
iniset $NOVA_CONF neutron ovs_bridge $NOVA_OVS_BRIDGE
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
}
diff --git a/lib/neutron_plugins/ofagent_agent b/lib/neutron_plugins/ofagent_agent
deleted file mode 100644
index 0bc9bff..0000000
--- a/lib/neutron_plugins/ofagent_agent
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-# REVISIT(yamamoto): This file is intentionally left empty
-# in order to keep Q_AGENT=ofagent_agent work.
diff --git a/lib/neutron_plugins/oneconvergence b/lib/neutron_plugins/oneconvergence
index 48a368a..0c570e5 100644
--- a/lib/neutron_plugins/oneconvergence
+++ b/lib/neutron_plugins/oneconvergence
@@ -68,7 +68,6 @@
}
function neutron_plugin_create_nova_conf {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
if ( is_service_enabled n-cpu && ! ( is_service_enabled q-dhcp )) ; then
setup_integration_bridge
fi
diff --git a/lib/nova b/lib/nova
index 6441a89..2afaa81 100644
--- a/lib/nova
+++ b/lib/nova
@@ -64,6 +64,11 @@
# Expect to remove in L or M.
NOVA_API_VERSION=${NOVA_API_VERSION-default}
+# NOVA_V2_LEGACY defines whether we force the Nova v2.0 enpoint onto
+# the Nova v2.0 legacy code base. Remove this option once the Nova
+# v2.0 legacy codebase is removed.
+NOVA_V2_LEGACY=$(trueorfalse False NOVA_V2_LEGACY)
+
if is_suse; then
NOVA_WSGI_DIR=${NOVA_WSGI_DIR:-/srv/www/htdocs/nova}
else
@@ -167,10 +172,6 @@
TEST_FLOATING_POOL=${TEST_FLOATING_POOL:-test}
TEST_FLOATING_RANGE=${TEST_FLOATING_RANGE:-192.168.253.0/29}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,nova
-
-
# Functions
# ---------
@@ -317,6 +318,13 @@
if [[ "$NOVA_API_VERSION" == "v21default" ]]; then
sed -i s/": openstack_compute_api_v2$"/": openstack_compute_api_v21"/ "$NOVA_API_PASTE_INI"
fi
+
+ # For setting up an environment where v2.0 is running on the
+ # v2.0 legacy code base.
+ if [[ "$NOVA_V2_LEGACY" == "True" ]]; then
+ sed -i s@"^/v2: openstack_compute_api_v21_legacy_v2_compatible$"@"/v2: openstack_compute_api_legacy_v2"@ \
+ "$NOVA_API_PASTE_INI"
+ fi
fi
if is_service_enabled n-cpu; then
@@ -354,6 +362,12 @@
sudo mount /cgroup
fi
fi
+
+ # enable nbd for lxc unless you're using an lvm backend
+ # otherwise you can't boot instances
+ if [[ "$NOVA_BACKEND" != "LVM" ]]; then
+ sudo modprobe nbd
+ fi
fi
fi
fi
@@ -411,15 +425,16 @@
nova_api_url="$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST/compute"
fi
- get_or_create_service "nova" "compute" "Nova Compute Service"
- get_or_create_endpoint "compute" \
+ get_or_create_service "nova_legacy" "compute_legacy" \
+ "Nova Compute Service (Legacy 2.0)"
+ get_or_create_endpoint "compute_legacy" \
"$REGION_NAME" \
"$nova_api_url/v2/\$(tenant_id)s" \
"$nova_api_url/v2/\$(tenant_id)s" \
"$nova_api_url/v2/\$(tenant_id)s"
- get_or_create_service "novav21" "computev21" "Nova Compute Service V2.1"
- get_or_create_endpoint "computev21" \
+ get_or_create_service "nova" "compute" "Nova Compute Service"
+ get_or_create_endpoint "compute" \
"$REGION_NAME" \
"$nova_api_url/v2.1/\$(tenant_id)s" \
"$nova_api_url/v2.1/\$(tenant_id)s" \
diff --git a/lib/swift b/lib/swift
index fc736a6..6b61274 100644
--- a/lib/swift
+++ b/lib/swift
@@ -141,10 +141,6 @@
# Toggle for deploying Swift under HTTPD + mod_wsgi
SWIFT_USE_MOD_WSGI=${SWIFT_USE_MOD_WSGI:-False}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,swift
-
-
# Functions
# ---------
@@ -455,6 +451,7 @@
[filter:swift3]
use = egg:swift3#swift3
+location = ${REGION_NAME}
EOF
fi
diff --git a/lib/tempest b/lib/tempest
index be24da6..fb4b0d3 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -361,6 +361,14 @@
iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME
fi
+ # Set the service catalog entry for Tempest to run on. Typically
+ # used to try different compute API version targets. The tempest
+ # default if 'compute', which is typically valid, so only set this
+ # if you want to change it.
+ if [[ -n "$TEMPEST_COMPUTE_TYPE" ]]; then
+ iniset $TEMPEST_CONFIG compute catalog_type $TEMPEST_COMPUTE_TYPE
+ fi
+
# Compute Features
# Run ``verify_tempest_config -ur`` to retrieve enabled extensions on API endpoints
# NOTE(mtreinish): This must be done after auth settings are added to the tempest config
@@ -390,6 +398,10 @@
# neutron.allow_duplicate_networks option was removed from nova in Liberty
# and is now the default behavior.
iniset $TEMPEST_CONFIG compute-feature-enabled allow_duplicate_networks ${NOVA_ALLOW_DUPLICATE_NETWORKS:-True}
+ if is_service_enabled n-cell; then
+ # Cells doesn't support shelving/unshelving
+ iniset $TEMPEST_CONFIG compute-feature-enabled shelve False
+ fi
# Network
iniset $TEMPEST_CONFIG network api_version 2.0
@@ -447,9 +459,6 @@
iniset $TEMPEST_CONFIG scenario large_ops_number ${TEMPEST_LARGE_OPS_NUMBER:-0}
# Telemetry
- # Ceilometer API optimization happened in Juno that allows to run more tests in tempest.
- # Once Tempest retires support for icehouse this flag can be removed.
- iniset $TEMPEST_CONFIG telemetry too_slow_to_test "False"
iniset $TEMPEST_CONFIG telemetry-feature-enabled events "True"
# Object Store
@@ -536,6 +545,11 @@
fi
# ``service_available``
+ #
+ # this tempest service list needs to be all the services that
+ # tempest supports, otherwise we can have an erroneous set of
+ # defaults (something defaulting true in Tempest, but not listed here).
+ TEMPEST_SERVICES="key,glance,nova,neutron,cinder,swift,heat,ceilometer,horizon,sahara,ironic,trove,zaqar"
for service in ${TEMPEST_SERVICES//,/ }; do
if is_service_enabled $service ; then
iniset $TEMPEST_CONFIG service_available $service "True"
@@ -546,7 +560,7 @@
if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then
# Use the ``BOTO_CONFIG`` environment variable to point to this file
- iniset $BOTO_CONF Boto ca_certificates_file $SSL_BUNDLE_FILE
+ iniset -sudo $BOTO_CONF Boto ca_certificates_file $SSL_BUNDLE_FILE
sudo chown $STACK_USER $BOTO_CONF
fi
diff --git a/lib/zaqar b/lib/zaqar
index fdab3a2..aa21aac 100644
--- a/lib/zaqar
+++ b/lib/zaqar
@@ -59,10 +59,6 @@
ZAQAR_SERVICE_PORT=${ZAQAR_SERVICE_PORT:-8888}
ZAQAR_SERVICE_PROTOCOL=${ZAQAR_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
-# Tell Tempest this project is present
-TEMPEST_SERVICES+=,zaqar
-
-
# Functions
# ---------
diff --git a/stack.sh b/stack.sh
index 639f72b..accfd0a 100755
--- a/stack.sh
+++ b/stack.sh
@@ -21,6 +21,10 @@
# Learn more and get the most recent version at http://devstack.org
+# Print the commands being run so that we can see the command that triggers
+# an error. It is also useful for following along as the install occurs.
+set -o xtrace
+
# Make sure custom grep options don't get in the way
unset GREP_OPTIONS
@@ -494,10 +498,6 @@
# Begin trapping error exit codes
set -o errexit
-# Print the commands being run so that we can see the command that triggers
-# an error. It is also useful for following along as the install occurs.
-set -o xtrace
-
# Print the kernel version
uname -a
diff --git a/stackrc b/stackrc
index 156cb1f..ca897a1 100644
--- a/stackrc
+++ b/stackrc
@@ -2,6 +2,11 @@
#
# stackrc
#
+
+# ensure we don't re-source this in the same environment
+[[ -z "$_DEVSTACK_STACKRC" ]] || return 0
+declare -r _DEVSTACK_STACKRC=1
+
# Find the other rc files
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
@@ -78,12 +83,6 @@
# services will rely on the local toggle variable (e.g. ``KEYSTONE_USE_MOD_WSGI``)
ENABLE_HTTPD_MOD_WSGI_SERVICES=True
-# Tell Tempest which services are available. The default is set here as
-# Tempest falls late in the configuration sequence. This differs from
-# ``ENABLED_SERVICES`` in that the project names are used here rather than
-# the service names, i.e.: ``TEMPEST_SERVICES="key,glance,nova"``
-TEMPEST_SERVICES=""
-
# Set the default Nova APIs to enable
NOVA_ENABLED_APIS=ec2,osapi_compute,metadata
@@ -455,6 +454,10 @@
GITREPO["os-brick"]=${OS_BRICK_REPO:-${GIT_BASE}/openstack/os-brick.git}
GITBRANCH["os-brick"]=${OS_BRICK_BRANCH:-master}
+# ironic common lib
+GITREPO["ironic-lib"]=${IRONIC_LIB_REPO:-${GIT_BASE}/openstack/ironic-lib.git}
+GITBRANCH["ironic-lib"]=${IRONIC_LIB_BRANCH:-master}
+
##################
#
@@ -560,40 +563,47 @@
# Set default image based on ``VIRT_DRIVER`` and ``LIBVIRT_TYPE``, either of
# which may be set in ``local.conf``. Also allow ``DEFAULT_IMAGE_NAME`` and
# ``IMAGE_URLS`` to be set in the `localrc` section of ``local.conf``.
-case "$VIRT_DRIVER" in
- openvz)
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-ubuntu-12.04-x86_64}
- IMAGE_URLS=${IMAGE_URLS:-"http://download.openvz.org/template/precreated/ubuntu-12.04-x86_64.tar.gz"};;
- libvirt)
- case "$LIBVIRT_TYPE" in
- lxc) # the cirros root disk in the uec tarball is empty, so it will not work for lxc
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs}
- IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz"};;
- *) # otherwise, use the uec style image (with kernel, ramdisk, disk)
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
- IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz"};;
- esac
- ;;
- vsphere)
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-i386-disk.vmdk}
- IMAGE_URLS=${IMAGE_URLS:-"http://partnerweb.vmware.com/programs/vmdkimage/cirros-0.3.2-i386-disk.vmdk"};;
- xenserver)
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.4-x86_64-disk}
- IMAGE_URLS=${IMAGE_URLS:-"http://ca.downloads.xensource.com/OpenStack/cirros-0.3.4-x86_64-disk.vhd.tgz"}
- IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz";;
- ironic)
- # Ironic can do both partition and full disk images, depending on the driver
- if [[ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]]; then
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-disk}
- else
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec}
- fi
- IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"}
- IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img";;
- *) # Default to Cirros with kernel, ramdisk and disk image
- DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
- IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz"};;
-esac
+DOWNLOAD_DEFAULT_IMAGES=$(trueorfalse True DOWNLOAD_DEFAULT_IMAGES)
+if [[ "$DOWNLOAD_DEFAULT_IMAGES" == "True" ]]; then
+ if [[ -n "$IMAGE_URLS" ]]; then
+ IMAGE_URLS+=","
+ fi
+ case "$VIRT_DRIVER" in
+ openvz)
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-ubuntu-12.04-x86_64}
+ IMAGE_URLS+="http://download.openvz.org/template/precreated/ubuntu-12.04-x86_64.tar.gz";;
+ libvirt)
+ case "$LIBVIRT_TYPE" in
+ lxc) # the cirros root disk in the uec tarball is empty, so it will not work for lxc
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs}
+ IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-rootfs.img.gz";;
+ *) # otherwise, use the uec style image (with kernel, ramdisk, disk)
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
+ IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz";;
+ esac
+ ;;
+ vsphere)
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-i386-disk.vmdk}
+ IMAGE_URLS+="http://partnerweb.vmware.com/programs/vmdkimage/cirros-0.3.2-i386-disk.vmdk";;
+ xenserver)
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.4-x86_64-disk}
+ IMAGE_URLS+="http://ca.downloads.xensource.com/OpenStack/cirros-0.3.4-x86_64-disk.vhd.tgz"
+ IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz";;
+ ironic)
+ # Ironic can do both partition and full disk images, depending on the driver
+ if [[ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]]; then
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-disk}
+ else
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec}
+ fi
+ IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"
+ IMAGE_URLS+=",http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img";;
+ *) # Default to Cirros with kernel, ramdisk and disk image
+ DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
+ IMAGE_URLS+="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec.tar.gz";;
+ esac
+ DOWNLOAD_DEFAULT_IMAGES=False
+fi
# 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
@@ -606,6 +616,13 @@
fi
fi
+# Detect duplicate values in IMAGE_URLS
+for image_url in ${IMAGE_URLS//,/ }; do
+ if [ $(echo "$IMAGE_URLS" | grep -o -F "$image_url" | wc -l) -gt 1 ]; then
+ die $LINENO "$image_url is duplicate, please remove it from IMAGE_URLS."
+ fi
+done
+
# 10Gb default volume backing file size
VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-10250M}
diff --git a/tests/test_ini_config.sh b/tests/test_ini_config.sh
index 3aef6f3..d9cb8d8 100755
--- a/tests/test_ini_config.sh
+++ b/tests/test_ini_config.sh
@@ -71,15 +71,23 @@
EOF
-# Test with missing arguments
+# set TEST_SUDO to test writing to root-owned files
+SUDO_ARG=""
+SUDO=""
+if [ -n "$TEST_SUDO" ]; then
+ SUDO="sudo "
+ SUDO_ARG="-sudo "
+ sudo chown -R root:root ${INI_TMP_ETC_DIR}
+fi
+# Test with missing arguments
BEFORE=$(cat ${TEST_INI})
-iniset ${TEST_INI} aaa
+iniset ${SUDO_ARG} ${TEST_INI} aaa
NO_ATTRIBUTE=$(cat ${TEST_INI})
assert_equal "$BEFORE" "$NO_ATTRIBUTE" "test missing attribute argument"
-iniset ${TEST_INI}
+iniset ${SUDO_ARG} ${TEST_INI}
NO_SECTION=$(cat ${TEST_INI})
assert_equal "$BEFORE" "$NO_SECTION" "missing section argument"
@@ -87,7 +95,7 @@
VAL=$(iniget ${TEST_INI} aaa handlers)
assert_equal "$VAL" "aa, bb" "iniget spaces in option"
-iniset ${TEST_INI} aaa handlers "11, 22"
+iniset ${SUDO_ARG} ${TEST_INI} aaa handlers "11, 22"
VAL=$(iniget ${TEST_INI} aaa handlers)
assert_equal "$VAL" "11, 22" "iniset spaces in option"
@@ -95,7 +103,7 @@
VAL=$(iniget ${TEST_INI} " ccc " spaces)
assert_equal "$VAL" "yes" "iniget with section header space"
-iniset ${TEST_INI} "b b" opt_ion 42
+iniset ${SUDO_ARG} ${TEST_INI} "b b" opt_ion 42
VAL=$(iniget ${TEST_INI} "b b" opt_ion)
assert_equal "$VAL" "42" "iniset with section header space"
@@ -103,7 +111,7 @@
VAL=$(iniget ${TEST_INI} bbb handlers)
assert_equal "$VAL" "ee,ff" "iniget at EOF"
-iniset ${TEST_INI} bbb handlers "33,44"
+iniset ${SUDO_ARG} ${TEST_INI} bbb handlers "33,44"
VAL=$(iniget ${TEST_INI} bbb handlers)
assert_equal "$VAL" "33,44" "inset at EOF"
@@ -122,12 +130,12 @@
fi
# test changing empty option
-iniset ${TEST_INI} ddd empty "42"
+iniset ${SUDO_ARG} ${TEST_INI} ddd empty "42"
VAL=$(iniget ${TEST_INI} ddd empty)
assert_equal "$VAL" "42" "change empty option"
# test pipe in option
-iniset ${TEST_INI} aaa handlers "a|b"
+iniset ${SUDO_ARG} ${TEST_INI} aaa handlers "a|b"
VAL=$(iniget ${TEST_INI} aaa handlers)
assert_equal "$VAL" "a|b" "pipe in option"
@@ -146,23 +154,23 @@
fi
# Test comments
-inicomment ${TEST_INI} aaa handlers
+inicomment ${SUDO_ARG} ${TEST_INI} aaa handlers
VAL=$(iniget ${TEST_INI} aaa handlers)
assert_empty VAL "test inicomment"
# Test multiple line iniset/iniget
-iniset_multiline ${TEST_INI} eee multi bar1 bar2
+iniset_multiline ${SUDO_ARG} ${TEST_INI} eee multi bar1 bar2
VAL=$(iniget_multiline ${TEST_INI} eee multi)
assert_equal "$VAL" "bar1 bar2" "iniget_multiline"
# Test iniadd with exiting values
-iniadd ${TEST_INI} eee multi bar3
+iniadd ${SUDO_ARG} ${TEST_INI} eee multi bar3
VAL=$(iniget_multiline ${TEST_INI} eee multi)
assert_equal "$VAL" "bar1 bar2 bar3" "iniadd with existing values"
# Test iniadd with non-exiting values
-iniadd ${TEST_INI} eee non-multi foobar1 foobar2
+iniadd ${SUDO_ARG} ${TEST_INI} eee non-multi foobar1 foobar2
VAL=$(iniget_multiline ${TEST_INI} eee non-multi)
assert_equal "$VAL" "foobar1 foobar2" "iniadd non-existing values"
@@ -176,7 +184,7 @@
del_no_section"
for x in $del_cases; do
- inidelete ${TEST_INI} $x a
+ inidelete ${SUDO_ARG} ${TEST_INI} $x a
VAL=$(iniget_multiline ${TEST_INI} $x a)
assert_empty VAL "inidelete $x"
if [ "$x" = "del_separate_options" -o \
@@ -191,6 +199,11 @@
fi
done
-rm -rf ${INI_TMP_DIR}
+# test file-creation
+iniset $SUDO_ARG ${INI_TMP_ETC_DIR}/test.new.ini test foo bar
+VAL=$(iniget ${INI_TMP_ETC_DIR}/test.new.ini test foo)
+assert_equal "$VAL" "bar" "iniset created file"
+
+$SUDO rm -rf ${INI_TMP_DIR}
report_results
diff --git a/tests/test_libs_from_pypi.sh b/tests/test_libs_from_pypi.sh
index d10cd0e..cf6ec1c 100755
--- a/tests/test_libs_from_pypi.sh
+++ b/tests/test_libs_from_pypi.sh
@@ -41,7 +41,7 @@
ALL_LIBS+=" python-neutronclient tooz ceilometermiddleware oslo.policy"
ALL_LIBS+=" debtcollector os-brick automaton futurist oslo.service"
ALL_LIBS+=" oslo.cache oslo.reports"
-ALL_LIBS+=" keystoneauth"
+ALL_LIBS+=" keystoneauth ironic-lib"
# Generate the above list with
# echo ${!GITREPO[@]}
diff --git a/tools/create_userrc.sh b/tools/create_userrc.sh
index c2dbe1a..de44abb 100755
--- a/tools/create_userrc.sh
+++ b/tools/create_userrc.sh
@@ -158,12 +158,12 @@
export -n SERVICE_TOKEN SERVICE_ENDPOINT OS_SERVICE_TOKEN OS_SERVICE_ENDPOINT
-EC2_URL=$(openstack endpoint show -f value -c publicurl ec2 || true)
+EC2_URL=$(openstack endpoint list --service ec2 --interface public --os-identity-api-version=3 -c URL -f value || true)
if [[ -z $EC2_URL ]]; then
EC2_URL=http://localhost:8773/
fi
-S3_URL=$(openstack endpoint show -f value -c publicurl s3 || true)
+S3_URL=$(openstack endpoint list --service s3 --interface public --os-identity-api-version=3 -c URL -f value || true)
if [[ -z $S3_URL ]]; then
S3_URL=http://localhost:3333
fi
diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh
index 4fff57f..a601cf2 100755
--- a/tools/fixup_stuff.sh
+++ b/tools/fixup_stuff.sh
@@ -134,6 +134,31 @@
sudo systemctl start iptables
fi
fi
+
+ if [[ "$os_RELEASE" -ge "21" ]]; then
+ # requests ships vendored version of chardet/urllib3, but on
+ # fedora these are symlinked back to the primary versions to
+ # avoid duplication of code on disk. This is fine when
+ # maintainers keep things in sync, but since devstack takes
+ # over and installs later versions via pip we can end up with
+ # incompatible versions.
+ #
+ # The rpm package is not removed to preserve the dependent
+ # packages like cloud-init; rather we remove the symlinks and
+ # force a re-install of requests so the vendored versions it
+ # wants are present.
+ #
+ # Realted issues:
+ # https://bugs.launchpad.net/glance/+bug/1476770
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1253823
+
+ base_path=/usr/lib/python2.7/site-packages/requests/packages
+ if [ -L $base_path/chardet -o -L $base_path/urllib3 ]; then
+ sudo rm -f /usr/lib/python2.7/site-packages/requests/packages/{chardet,urllib3}
+ # install requests with the bundled urllib3 to avoid conflicts
+ pip_install --upgrade --force-reinstall requests
+ fi
+ fi
fi
# The version of pip(1.5.4) supported by python-virtualenv(1.11.4) has
diff --git a/tools/make_cert.sh b/tools/make_cert.sh
index cb93e57..2628b40 100755
--- a/tools/make_cert.sh
+++ b/tools/make_cert.sh
@@ -5,7 +5,7 @@
# Create a CA hierarchy (if necessary) and server certificate
#
# This mimics the CA structure that DevStack sets up when ``tls_proxy`` is enabled
-# but in the curent directory unless ``DATA_DIR`` is set
+# but in the current directory unless ``DATA_DIR`` is set
ENABLE_TLS=True
DATA_DIR=${DATA_DIR:-`pwd`/ca-data}
diff --git a/tools/xen/README.md b/tools/xen/README.md
index 61694e9..6212cc5 100644
--- a/tools/xen/README.md
+++ b/tools/xen/README.md
@@ -94,11 +94,6 @@
XENAPI_CONNECTION_URL="http://address_of_your_xenserver"
VNCSERVER_PROXYCLIENT_ADDRESS=address_of_your_xenserver
- # Download a vhd and a uec image
- IMAGE_URLS="\
- https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz,\
- http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-uec.tar.gz"
-
# Explicitly set virt driver
VIRT_DRIVER=xenserver