Compare commits

...

92 Commits

Author SHA1 Message Date
Matt Riedemann ea32a648e4 Call sudo with -H in pip_install
Commit 7aa7699acb was an incomplete
cherry pick since it missed the part that added -H to sudo pip install.

This is similar to what was added in change
If791b9b25d6a4280dab19117004184e57e78d038.

This is needed on stable/icehouse only since the change was made in
Kilo originally and backported to stable/juno.  This should fix grenade
against stable/juno changes where the 'old' side is stable/icehouse.

Change-Id: Ia52823ec2e322f78d407993010eb04adf39a242c
Closes-Bug: #1463149
2015-06-08 12:31:13 -07:00
Jeremy Stanley e842c13fa5 Stop installing nose and pylint from distros
The distro packages of nose and pylint depend on python-setuptools
on some platforms, and on some of those platforms (at least CentOS
6.x) you can't resolve dependencies on python-setuptools properly if
you've forcibly removed it already (as we do on our CI workers). It
appears that any current upstream use of these tools in relation to
DevStack-based testing is now relying on tox and pip to obtain them
instead.

Conflicts:
	files/debs/swift
	files/rpms-suse/general
	files/rpms/general
	files/rpms/horizon

Change-Id: Ibd16ac550c90364115caf57fae4f5f4cb5d5f238
(cherry picked from commit 091b42b7da)
2015-05-08 18:05:02 +00:00
Jenkins 1f1a48ff2f Merge "Always defines tempest_roles as Member" into stable/icehouse 2015-03-26 17:13:17 +00:00
Sean Dague 1961c33c8f Always defines tempest_roles as Member
Because tests might force the auth version to v3, we always need
to have Member in the list of roles.

Backported from: 72f026b60d

Change-Id: I06fd043e1b31ae0e5e33f4dcf898fb58f2907267
(cherry picked from commit 3d54dc9969)
2015-03-25 22:13:31 -04:00
Joseph Lanoux cea2ab3668 Update default Cirros to 0.3.2
Update the default Cirros version to 0.3.2 in order for the hostname to be set
to the server name.

Fixes bug 1435943

Change-Id: I6bfe1b1dfbae3d45ecd1643582916fc1441bf78f
2015-03-24 17:00:55 +00:00
Abhishek Chanda d795232370 Take an optional rabbit user name as input
Newer versions of rabbitmq (3.3 and later) do not allow the 'guest'
user to access on non-local interfaces.

- Added a new config RABBIT_USERID which defaults to stackrabbit
- Invoked config scripts using that variable

Adopted from:
https://review.openstack.org/#/c/107779/

Backported to stable/icehouse from:
d5b74c688f Take an optional rabbit user name as input
https://review.openstack.org/141156

Conflicts:
	lib/keystone
	lib/rpc_backend
	lib/trove

Change-Id: I034f3eda09827451b5437c430049aa2ebfd67b2e
Closes-Bug: #1343354
Co-Authored-By: Scott Moser <smoser@ubuntu.com>
2015-03-16 14:25:45 +01:00
Jenkins 33680e3689 Merge "Ensure quoting of selected API extensions" into stable/icehouse 2015-03-12 15:08:17 +00:00
Jenkins 444274e8a1 Merge "Don't use packaged unittest2" into stable/icehouse 2015-03-11 15:56:06 +00:00
Jenkins 8c528042c4 Merge "Stop installing unittest2 from deb packages" into stable/icehouse 2015-03-11 03:26:18 +00:00
Ian Wienand 6b1198b830 Don't use packaged unittest2
Let pip install unittest2; pip installation can conflict with the
packaged version.

Cherry-picked from b0595235a2
Partial-Bug: #1430592

Conflicts:
	files/rpms-suse/general
	files/rpms/general

Change-Id: I08a00b92c3578abfdb0300a37eeda117d4c76e92
2015-03-11 12:24:35 +11:00
Joe Gordon db7581cbff Stop installing unittest2 from deb packages
The version installed is conflicting with the version required in
testtools-1.7

While a better solution is to dig through and figure out what is causing
the transitive floating dependency that installs testtools 1.7
this should fix the issue for stable/icehouse. And we need to fix
stable/icehouse to fix stable/juno (because grenade) which in tern is
needed to unbreak master branch.

Change-Id: Ib193e18afbb60c43d8dd66444bbf367689837182
Partial-Bug: #1430592
2015-03-10 17:26:21 -07:00
Ryan Hsu ed04926923 Pin python-openstackclient version to 0.4.1
Currently, stable/icehouse devstack uses the latest version of
python-openstackclient which uses the new oslo form of imports
with underscores (e.g. import oslo_config). The new oslo
libraries that contain the new underscore imports are not used
in stable/icehouse so we need to pin python-openstackclient to
0.4.1.

Closes-Bug: #1427823
Change-Id: I363251c8d32a33e81a25c7279a202baf0eeb5cd3
2015-03-09 10:57:27 -07:00
Ian Wienand c120998e43 Ensure quoting of selected API extensions
Ensure quoting of selected API extensions so the argument makes it to
iniset.

Change-Id: I7c80e3bfe4962c3e8c94736af21ff215cd98f7f3
2015-03-03 11:17:57 +11:00
Ihar Hrachyshka 397f7de54d Install openstackclient after other services
Let's see whether openstackclient will trigger unneeded version bump for
clients if its installation is put below all other services that are
expected to intall client libraries on proper versions on their own.

Conflicts:
	stack.sh

Change-Id: Ifa774219b7057112fc794a5e3d93bc963c55ba90
(cherry picked from commit 1ffa33210d)
2015-02-26 23:52:51 +01:00
Adam Gandelman b947896751 Unwedge stable/icehouse by manually installing a capped novaclient
Install novaclient prior to OSC, as per GR.  This avoids OSC's
uncapped requirements pulling in a newer novaclient, which requires
a keystoneclient version conflicting with stable/icehouse.

This can be removed once work is complete to install OSC into a
venv.

Change-Id: Id43b249f3d685ec0ffe0a892fe8461a2ab0415db
Related-bug: #1423753
2015-02-20 07:09:22 -08:00
Joe Gordon 44ef0eebac Stop installing tempest
We run tempest inside of tox so no nee to install it. By not installing
it we decouple one more thing from the requirements sync.

Without this patch, due to branchless tempest, tempest must work with
master and all stable branch global requirements.

Although installing tempest should work on master, don't install it
anyway to make the user experience more uniform across master and
stable branches.

Note: Long term we can install this inside of a virtualenv
(I92648fffc1ad6af53006a0970722fd15f4e79dc2) but that logic hasn't landed
yet and installing tempest is breaking us. So leave moving this to a
virtualenv for a later patch.

Conflicts:
	lib/tempest

Change-Id: I78d51f04ed01da4ce8aa0e127be028f969d3b4f8
(cherry picked from commit 1368b98669)
2015-02-09 15:08:07 -08:00
Sean Dague ace3bdbbec disable boto testing in stable/icehouse
due to incompatibilities between stable/icehouse ec2 support and
latest boto, this is currently no longer testable with latest
tempest. Disable this section for now.

Change-Id: I00cc49dbde5119df91582c560d0ef829f546caa7
2015-02-09 18:00:03 -05:00
Ihar Hrachyshka e1d57fff96 Removed pycadf version enforcement
Proper cap is in requirements [1] and both affected projects (keystone
[2] and nova [3]), so removing the hack from devstack.

[1]: I824c5cd9a1fa8252acf2a000cf1f645f302be0b7
[2]: Ie64bd740f55b89e992724aa195841b07d7b66dbc
[3]: I5cf5df1ecea3a0db1a7503c0689acbb3bc8ffd58

Change-Id: I52aab6adf494b3c2f020daf636bb72602139dc8f
2015-01-27 10:23:54 +01:00
Jenkins 9ad08ba1f0 Merge "XenAPI: Always add Cirros euc image" into stable/icehouse 2015-01-21 08:12:52 +00:00
Dean Troyer 36ca8fbf8b Unwedge stable/icehouse gate by capping recent releases
python-openstackclient and pycadf both released versions that included the
bump of oslo.serialization to >=1.2.0, which is greater than the max version
in stable/icehouse, so boom.

In order to fix these the following needs to be done:
* manually cap python-openstackclient in DevStack to 1.0.1
* cap pycadf in keystone and nova to 0.6.0

With the gate wedged as such, this review does the first of these, then
forcibly re-installs pycadf after both keystone and nova are installed
to foce version 0.6.0.  This should unwedge things long enough to get
proper caps into global-requirements and keysotne and nova.

Closes-bug: #1412627
Change-Id: Id5a53eaf3da86932999d62e51d07f7015b0ab53a
2015-01-20 01:49:06 -06:00
Dean Troyer de1fd97a42 Remove python-migrate
python-migrate pulls in python-decorator on Ubuntu and something allows
that (version 3.3.2) to not get upgraded to 3.4.0 which is on our
requirements.txt.

See if we can get migrate from pip...

Change-Id: Iacf2f67a33fb82895cef8b1af2d1b701a020efe3
2015-01-17 22:46:55 -06:00
Jenkins 301144b527 Merge "XenAPI: workaround for unsupp. associative arrays" into stable/icehouse 2015-01-08 03:00:44 +00:00
Yves-Gwenael Bourhis afd4ba425d Do not modify rsyslog files if rsyslog is not used.
Swift was missing an 'if [[ $SYSLOG != "False" ]]' statement which is used
by other services, and therefor failed with a 'No such file or directory'
error when 'SYSLOG=False' was set in localrc.

Closes-Bug: 1308461

Change-Id: I8655a955ebb322516d92bee418b93d4cc23bdc5c
(cherry picked from commit f894c2ab80)
2015-01-07 07:06:18 +00:00
Jenkins ad3817dae8 Merge "Backport install_pip.sh from master" into stable/icehouse 2014-12-31 21:27:23 +00:00
Jeremy Stanley 92144cc785 Revert "Temporarily pre-create ~stack/.cache for pip 6"
This reverts commit 0caf2e4dd2.

Turns out the problem was with a "sideways" grenade job in
stable/juno, so no amount of workaround in devstack stable/icehouse
is going to help anyway.

Change-Id: Ieca3df91468b454d3bfae438f95710859fd8f1a0
2014-12-30 19:26:39 +00:00
Jeremy Stanley 0caf2e4dd2 Temporarily pre-create ~stack/.cache for pip 6
* tools/create-stack-user.sh: Add a ~stack/.cache directory owned by
the stack user and group. This is intended as a temporary workaround
to be able to add -H to sudo pip calls in grenade and devstack
stable branches, and can then be reverted once those land.

Change-Id: Ie74130beef13a0d9485bb962d86188bb64cce022
Co-Authored-By: Adam Gandelman <adamg@ubuntu.com>
2014-12-30 16:11:30 +00:00
Monty Taylor 31d0649d4b Backport install_pip.sh from master
There are several improvements to install_pip.sh in master. All of these
have to do with the general state of pip upstream and are not something
that have anything to do with icehouse. For sanity, just backport the
entire file.

Change-Id: I9996bbc76ea81dd5bdded3bc8a5bf0542ade95f1
Closes-Bug: 1405579
Closes-bug: #1405626
Related-bug: #1405732
2014-12-29 11:28:16 -06:00
Jeremy Stanley 7aa7699acb Install prettytable>=0.7 to satisfy pip 6/PEP 440
Change-Id: I2134c7d8f58f8b83f33150c9ed86d87f8ccba2f3
(cherry picked from commit 1a89f8cdf4)
2014-12-22 17:19:42 +00:00
Bob Ball 0070dbf05d XenAPI: Always add Cirros euc image
Some tests, such as test_minimum_basic_scenario, assume qcow and if
a qcow image does not exit, falls back to the euc image.
This change ensures these tests work in the stock XenServer environment.

Change-Id: I718f178f7e5e0fa4eebd17a49caf5254124092e3
2014-12-21 21:35:51 +00:00
Mate Lakat fa145efdc7 XenAPI: workaround for unsupp. associative arrays
Dom0's bash does not support associative arrays, however we source
`functions` and therefore our scripts fail. This change breaks the
dependency of dom0 tools on domU functions.

The associative arrays change was backported to Icehouse, breaking
XenAPI.  This fixes that breakage

Fixes bug: 1379804

Change-Id: I229e2d5f07070a9236ec612d4032c94c4361a9f6
2014-12-21 21:35:24 +00:00
Clark Boylan 55a6f3ae67 Install setuptools<8.0
New setuptools (>=8.0) breaks with versions used in older versions of
things. Specifically .gshortsha1 source identifiers do not parse and are
sorted as coming before all other versions. Using <8.0 at least unwedges
us then we can work on backporting changes to use newer pbr which will
use +gshortsha1 which sorts properly.

Change-Id: Iae98d9d7e97b81955cafe1b88022133e6902e551
2014-12-13 12:57:44 -08:00
Matthew Treinish 9ad198337d Hard code icehouse service extension lists
This commit adds the hard coded service extension lists for icehouse
in the tempest config files. To enable gating with tempest master on
all supported branches the extension list has to be explicit on stable
branches to ensure we don't attempt to run tests for new extensions on
stable branch services. This commit adds these lists for the icehouse
branch.

Implements blueprint branchless-tempest-extensions

Change-Id: I14b4301f9211529e5ff6fe56f65392c1d198a18a
2014-12-08 21:56:51 +00:00
Jenkins 77ab54d3a6 Merge "Actually enable new feature of container-sync" into stable/icehouse 2014-12-08 01:34:15 +00:00
Sean Dague e5f8d21aae Fix lib/oslo to only reference things which exist
The backport of the install from libs infrastructure left some
unwanted bits in lib/oslo that cause cryptic build issues. Remove
that.

Change-Id: If56f64f1305a206e5360ad9b5e3e41db4d60d576
2014-12-05 10:18:16 -05:00
Daisuke Morita 81dcbbdca8 Actually enable new feature of container-sync
I modified devstack to run newer version of container-sync in
commit d03915f, and cherry-picked to stable/icehouse.
However, $SWIFT_SERVICE_PROTOCOL variable is introduced after
stable/icehouse (commit 18d4778), therefore my cherry-pick patch did
not enable container-sync feature.

This patch replaces this variable with string value "http", so now
icehouse swift deployed by devstack works appropriately.

Change-Id: I3b509312846d29a5d14607d5eb561eb9545b28a5
Closes-Bug: 1378646
2014-11-26 20:57:12 +09:00
Adam Gandelman 279a6b32d8 Source functions from stackrc
stackrc now requires GITREPO, GITBRANCH, GITDIR and has been
dependent on functions for a while (is_package_installed).  Ensure
we source the required functions file when stackrc is loaded.  Avoids
unexpected issues in grenade where they may or may not have been loaded
depending on the configuration.

Closes-bug: #1377274

Change-Id: I5027cfad07af0de7ff39f424601d6f7ec5dcadae
(cherry picked from commit 0e4cd03828)
2014-11-24 13:32:49 -08:00
Sean Dague 1c2698dbac use released library versions by default
This patch provides a new path for installing libraries in devstack so
that it's possible to either test with upstream released libraries, or
with git versions of individual libraries.

Libraries are added by name to 3 associative arrays GITREPO,
GITBRANCH, GITDIR. When we get to the library install phase we inspect
LIBS_FROM_GIT and look for libraries by name (i.e. "oslo.config") and
if they exist we'll clone and install those libraries from
git. Otherwise we won't, and just let pip pull them as dependencies
when it needs them.

This patch provides the conversion of the oslo libraries, including
pbr.

Devstack-gate jobs for these libraries will need to change to support
actually forward testing their content.

restructure stackrc into groupings

in order to support installing from stable libraries we first need to
actually sort out all the categories our giant list of git repos fit
into. This will make it much easier to not lose one in the process.

support installing clients and supporting libraries at released versions

expand the devstack support for libraries from released versions to
support python-* clients and supporting libraries. This is a collapse
of the master patch series that took a while to get correct.

(This is a collapsed patchset for backport to make backport fixups easier)

add unit tests for GIT* definitions

This adds unit tests for all the GIT* definitions, ensuring that for
libraries we think should be defined, they are. It exposed a bug in
glance_store definitions in the process.

The GITDIR definition for python-openstackclient is moved to stackrc
for testability.

Conflicts:
	lib/glance

Change-Id: I26fac0ccf8fd4818e24618d56bf04b32306f88f6
2014-11-21 16:24:53 -05:00
Sean Dague ef7470e5da make run_tests.sh run devstack unit tests
run_tests.sh was created as an entry point for bashate. We stopped
using it now that we know how to run bashate directly in the gate.
We lost running an unrelated bashate test when that happened.

Devstack does have unit tests. We don't run them. We should.
Especially when working on things like the LIBS_FROM_GIT which is
sufficiently tricky that we really need to add unit tests to ensure
that we don't break it.

Conflicts:
	run_tests.sh

Change-Id: Ife067855569e2eae4c085471d326e8086de37332
(cherry picked from commit 9f20ea1382)
2014-11-20 13:39:26 -05:00
Davanum Srinivas e8fb615a4d Set xml_api_v2 for Compute tests
Nova XML V2  api support is being removed in Kilo, so we need to
enable here to ensure that the API is still tested in this stable release.

Change-Id: I85ca8f5a7140a2637e64e980015ee30b2a23a46d
2014-11-17 10:36:58 -05:00
Jenkins 0b05258913 Merge "Enable Swift's newer feature of container-sync" into stable/icehouse 2014-10-31 11:23:21 +00:00
Jenkins fa9c672ce6 Merge "Reserve Keystone ports from the ephemeral range" into stable/icehouse 2014-10-31 00:55:00 +00:00
Daisuke Morita 0547e43824 Enable Swift's newer feature of container-sync
Newer version of container-sync feature is introduced in Swift ver. 1.12.0.

The spec:
http://docs.openstack.org/developer/swift/overview_container_sync.html

Before this commit, Devstack does not configure any realm used in
container-sync, therefore this feature does not work.
To test this feature in CI system, moreover to show the sample
configuration of realms, Devstack now edits realms configuration file.

Change-Id: I9f1e3224403e08e725a989162729470357fe90b0
Closes-Bug: 1378646
(cherry picked from commit d03915f9c0)
2014-10-30 10:01:55 +00:00
Jenkins 9e28fa92d3 Merge "Add identity_feature_enabled.xml_api config" into stable/icehouse 2014-10-28 03:15:47 +00:00
Joe Gordon 40b4f04862 Move to download.fedoraproject.org
download.fedoraproject.org is the mirror system, while
dl.fedoraproject.org is just one system. We have seen performance issues
with dl.fedoraproject.org and using download.fedoraproject.org was a
recommended as a solution by the folks at #fedora-admin.
Local testing on a rackspace server with dl.fedoraproject.org got about
70K/s while download.fedoraproject.org got over 1M/s

Note this is not a cherry-pick of I318d8844cfcfbc42c1e552e443c6b793d20f321f, because that wouldn't work

Change-Id: Ic68efcef0ed62f7867114d6992aee1610d6e8eb9
Related-Bug: #1383928
2014-10-23 10:59:42 -07:00
Mark McClain c83aec452b set xml_api flag for Network tests
XML api support is being removed in Kilo, so we need to enable here to
ensure that the API is still tested in this stable release.

Change-Id: Iaf0cb93fda607c62911c57132eced14a33f94f97
2014-10-22 17:29:03 -04:00
Morgan Fainberg 80cad72055 Reserve Keystone ports from the ephemeral range
Reserve Keystone ports from the ephemeral range as early as reasonably
possible in the fixup_stuff.sh process to reduce the likelihood that the
port will be in use. This does not completely resolve the issue
where Keystone's IANA assigned port falls into Linux's ephemeral
range, but this should reduce the occurrences. The default ports
are 35357 and 35358.

Change-Id: I8cfb53d8f90c1ff1fb1083c59fefabca3d14323b
Partial-Bug: #1253482
(cherry picked from commit 6cae83efd7)
2014-10-22 11:04:23 +00:00
Lance Bragstad 8208398568 Add identity_feature_enabled.xml_api config
This change allows us to continue to test identity XML support for
stable icehouse. XML support in Keystone has been deprecated and staged
for removal in Kilo.

Change-Id: Ibb402640c5b744f1ea38ce548994079996c72508
2014-10-10 19:37:45 +00:00
Jenkins 1921be9226 Merge "debian: do not enable grizzly repository from gplhost" into stable/icehouse 2014-10-02 18:29:01 +00:00
Jenkins 99f796ce27 Merge "ceilometer compute agent not started correctly" into stable/icehouse 2014-10-02 16:11:12 +00:00
Jenkins ef5de91c69 Merge "Replace screen_it() with run_process() throughout" into stable/icehouse 2014-10-02 13:21:01 +00:00
Jenkins e621646099 Merge "Run processes without screen" into stable/icehouse 2014-10-02 13:20:34 +00:00
gordon chung 42e9058901 ceilometer compute agent not started correctly
command isn't properly parsed after switch to run_process. this
patch corrects the regression

Change-Id: Ib28d4bbf6f150854fc5aa04e3fa4eed92005ce19
Closes-Bug: #1370673
(cherry picked from commit bdeea69d72)
2014-10-01 15:56:27 -04:00
Chris Dent da6648a6fe Replace screen_it() with run_process() throughout
run_process will use screen if USE_SCREEN=True (the default),
otherwise it will simply start the requested service. Therefore
wherever screen_it used, run_process can be instead.

Where stop_screen was found it has been replaced with stop_process.

A tail_log function has been added which will tail a logfile in a
screen if USE_SCREEN is True.

lib/template has been updated to reflect the use of the new
functions.

When using sg the quoting in run_process gets very complicated.
To get around this run_process and the functions it calls accepts
an optional third argument. If set it is a group to be used with sg.

Conflicts:
	functions-common
	lib/ceilometer
	lib/keystone
	lib/neutron
	lib/sahara
	lib/zaqar
	stack.sh

Change-Id: Ia3843818014f7c6c7526ef3aa9676bbddb8a85ca
(cherry picked from commit 2f27a0ed3c)
2014-10-01 15:56:27 -04:00
Dean Troyer 9a0502b592 Run processes without screen
This introduces new run_process() and screen_service() functions and sets the
groundwork to change how DevStack starts services.  screen_service() is simply a
direct call to the screen portion of the old screen_it() function and is intended
to run commands that only need to run under screen, such as log file watchers.

run_process() is a replacement for screen_it() (which remains until all of the
services are updated).  The usage is similar but requires updates to every current
screen_it() call to remove everything that requires the command to be interpreted
by a shell.

The old run_process() and _run_process() functions are still present as
old_run_process() and _old_run_process() to support the deprecated screen_it()
function.  These will all go away in the future once all services have been
confirmed to have been changed over.

There is a similar new set of stop process functions stop_process() and
screen_stop_service().  The old screen_stop() will also remain for the deprecation
period.

As an initial test/demostration this review also includes the changes for
lib/cinder to demonstrate what is required for every service.

I included the scripts I used to test this; tests/fake-service.sh and
tests/run-process.sh are quite rough around the edges and may bite.  They should
mature into productive members of the testing ecosystem someday.

Conflicts:
	functions-common
	lib/cinder

Change-Id: I03322bf0208353ebd267811735c66f13a516637b
(cherry picked from commit 3159a821c2)
2014-10-01 15:56:27 -04:00
Monty Taylor aefc90462d Add docs environment to tox.ini
As per the governance resolution https://review.openstack.org/119875,
projects should have a docs environment in their tox.ini testing
interface. Add one.

Change-Id: Ib3548bc23713e120089ae29b5c4e851de48cf8d3
(cherry picked from commit 81fa6c7b4b)
2014-09-30 11:38:27 -04:00
Ian Wienand 3fc59dcd72 Fix tools/xen/functions for bashate errors
Change I205d675ff231c0403dd135eacc8d57b45317859f modified the matching
for bashate and it has started running on this file, whereas before it
wasn't.  This fixes the errors it is now picking up.

(cherry picked from commit 62cae13d7e)

(We need to squash these 2 patches together to pass tests)

Use tox for bashate testing

Create a tox.ini file to install bashate into a virtualenv for running
tests. It can be run with a command such as "tox -v -ebashate". The find
command being used is equivalent to the default list of files discovered
by bashate plus the exclusion of the .tox/ directory. Also add the .tox/
directory to the .gitignore file.

Conflicts:
	.gitignore

Change-Id: I7876b5c94d90f15e3b0228999c0750bfbebcaa1c
(cherry picked from commit 0c256abd76)
2014-09-30 11:37:54 -04:00
Jenkins c3f498d36a Merge "Fix Swift config for Ceilometer usage" into stable/icehouse 2014-08-30 11:10:49 +00:00
Kevin Benton 10fb071ebb Don't set tunnel_types on VLAN network type
The current code sets tunnel types for the neutron agent
even when the network type is 'vlan'. This results in the
agent not starting because 'vlan' is not a valid tunnel type.
This patch changes it so tunnel_types is not populated when
vlans are used.

This bug just now surfaced because of commit
8feaf6c951 requiring Q_ML2_TENANT_NETWORK_TYPE
to be set to avoid being set to the 'local' type.

Conflicts:
	lib/neutron_plugins/ml2

Change-Id: If2bc57b36dad2bfb34df573581acce176604812e
(cherry picked from commit e3cfbf1580)
2014-08-28 18:29:23 -07:00
Jenkins a09603233e Merge "Adds support for Hyper-V image formats" into stable/icehouse 2014-08-25 13:07:12 +00:00
Alessandro Pilotti ef2cc30ada Adds support for Hyper-V image formats
Adds support for VHD and VHDX image formats, including gz compression.

Note: variables naming case changed to match the target branch

(cherry picked from ca8239449f)

Change-Id: I9b143c9883b947397b435a671f13703f78019d23
Closes-bug: #1353726
2014-08-23 13:01:12 +03:00
Dina Belova 0b0f1fa3c7 Fix Swift config for Ceilometer usage
Ceilometer filter was previously removed from the Swift
configuration to avoid useless Ceilometer logs in the Swift
ones. This was fixed by setting only warning log level for
this Ceilometer part of the pipeline to keep only important
ones.

that is needed in stable/icehouse to allow swift+ceilometer
in devstack and devstack gate (otherwise grenade job, that is
using stable/icehouse devstack, won't pass the gate)

Change-Id: I8c41355bb98dbf3bb59ec792221b05ea936086b7
Partial-Bug: #1294789
(cherry picked from commit eedfdee060)
2014-08-22 15:19:36 +04:00
Jenkins 7dba81dfeb Merge "add is_keystone_enabled" into stable/icehouse 2014-08-06 12:23:25 +00:00
Jenkins bed8af63fb Merge "Make sure tox is installed when setting up tempest" into stable/icehouse 2014-07-26 19:51:07 +00:00
Attila Fazekas 7620ce462a Add conntrack-tools to nova dependencies
'Error deleting conntrack entries' appears in all
n-net. Adding conntrack-tools/conntrack as nova dependency,
in order to eliminate this issue.

This is needed to fix this issue in the grenade case.

Change-Id: Ief9deeb3349a07e22fb365e58f3368c847f845ef
(cherry picked from commit 40f4438f9b)
2014-07-25 14:31:30 -07:00
Gonéri Le Bouder 76bafd33bb debian: do not enable grizzly repository from gplhost
There is not reason to enable this additional repository anymore.
All the important packages are either in wheezy or wheezy-backports.

Change-Id: I47af16ba6b507fc929b0d2948c757f4060ba93a5
(cherry picked from commit 5420992a2c)
2014-07-25 17:47:46 +02:00
Joe Gordon f0dcecd4b0 Make sure tox is installed when setting up tempest
Partial backport of I8008837d2fae6cebeeeb051b63066279ca477e01

In order to make grenade easier to run outside of the gate make sure tox
is installed when tempest is set up. Currently one has to install tox
manually to get grenade to work.

Change-Id: Ie20de0c523cf1c31683fe69fa88f73705bed06b9
2014-07-23 21:38:41 -07:00
Sean Dague b24e52a439 add is_keystone_enabled
This is missing, and makes logic much harder for the grenade use
case.

Change-Id: Ib6670096d190e69273256b87e6a67e2b46945a0d
(cherry picked from commit 4f3b66f538)
2014-07-23 16:46:05 -04:00
Sean Dague babc48573a stop leaking service as a global var
the tls code was leaking out $service as a global variable, which
was causing all manner of confusing errors in grenade trying to
use that variable name. All lower case vars should be localize.

Change-Id: I74fa597f20ee7c714cab83490b42d874ea93db02
(cherry picked from commit f0bd8dbe37)
2014-07-23 15:15:52 -04:00
Jenkins 9b76761618 Merge "Remove sshd reconfig from lib/ironic" into stable/icehouse 2014-07-22 16:37:03 +00:00
Adam Gandelman 87b6fe407e Remove sshd reconfig from lib/ironic
The sshd reconfiguration to listen on port 2222 provides no
benefit and complicates deployment on some systems.  This removes
the reconfiguration and instead just confirms SSH connectivity.
Default SSH host and ports are left configurable, but the port now
reflects the default 22.

Change-Id: Iaf7c71854c3741a505a79037ffb8c86ace74fc27
(cherry picked from commit 867651049a)
2014-07-15 13:14:27 -07:00
Henry Gessau 03e55fb439 Do not install openvswitch-datapath-dkms on Ubuntu 14.04
Change-Id: I8c58d998011427a202c79c45b87b5eca5ceaaa71
Closes-bug: #1331111
(cherry picked from commit c48afe4bc0)
2014-07-09 16:01:47 +00:00
Sean Dague fa78b551eb Revert "Build retry loop for screen sessions"
This reverts commit cd0fba6c38.

It appears that this isn't actually making things better, and
possibly increasing failure rates. Revert to go back to the
tried and true model of just sleeping a lot.

Change-Id: Ie630f72d91f16160fa12b3892e5c74378d244cea
2014-06-28 07:32:36 -04:00
Sean Dague cd0fba6c38 Build retry loop for screen sessions
There is a timing window where we might lose the commands being
stuffed into screen because bash is spawning. In those cases, loop
around and try building screen sessions again.

Change-Id: I49247de06bbd59424cb10fb9a8db145907be5138
Related-Bug: #1331274
(cherry picked from commit 0afa912e99)
2014-06-26 18:39:16 -04:00
Sean Dague 85a8d78092 retry apt operations to avoid network issues
One of the major gate failures is do to something being wrong with
the apt mirrors. The Acquire group provides an implicit retry on
network operations which seems like it might be helpful here.

Ref: http://linux.die.net/man/5/apt.conf

Change-Id: I099f47ed86ad6a3d4296bff4cce75e7f7d946d27
Related-Bug: #1286635
(cherry picked from commit e83f7785a7)
2014-06-24 10:55:43 -04:00
Jenkins 89eb154ff9 Merge "Add support for django_openstack_auth" into stable/icehouse 2014-06-23 17:31:31 +00:00
Zhenguo Niu ea796c0598 Add support for django_openstack_auth
It would be useful for development, reviewing and testing to add
support for django_openstack_auth to devstack.

This change adds the integration tests to the openstack_auth
list of test: https://review.openstack.org/#/c/86528/

(Use setup_install instead)

Change-Id: Ifbd336b83f6b2beb23996b599ec820232c13efdd
Closes-Bug: #1262121
(cherry picked from commit e385d1e030)
2014-06-23 08:18:55 -04:00
Ryota MIBU e2738d365a Fix unsubstituted filename creation
Since merge_config_file() tries to create an unsubstituted config file,
stack.sh fails due to permission denied in the file creation when you
use '[[post-config|/$Q_PLUGIN_CONF_FILE]]' and the file does not exist.

This patch deletes unnecessary 'touch' command, because the file will
be made by 'iniset' function in the next command line with evaled
string from 'configfile'.

This patch also fixes merge_config_group() to use evaled 'configfile'
when it checks the directory of the config file exists.

Change-Id: I608847a34143b5c6a1708c180186dd88a32dd44b
Closes-bug: #1294213
(cherry picked from commit 410f5c0016)
2014-06-20 23:14:05 +09:00
Jenkins 8b7a7ae3ac Merge "Insert required iptables rules for Ironic" into stable/icehouse 2014-06-20 03:32:00 +00:00
Jenkins acd3dfd1bf Merge "Bump minimum default RAM for Ironic nodes to 1GB" into stable/icehouse 2014-06-18 18:52:27 +00:00
Jenkins 4a412dfdc8 Merge "Cut the heat flavor" into stable/icehouse 2014-06-18 18:52:25 +00:00
Adam Gandelman cd1cf1b417 Bump minimum default RAM for Ironic nodes to 1GB
Set the default RAM for Ironic BM VMs to 1GB to ensure DIB produced deployment
ramdisks function correctly across older and newer kernels, regardless of
rootfstype.

Change-Id: Ifc15a4430aa63c3599e7fd76f5116dc7b728ead0
Closes-bug: #1311987
(cherry picked from commit 74eafa4b49)
2014-06-17 14:42:20 -07:00
Adam Gandelman 207284a6a6 Insert required iptables rules for Ironic
Devstack gate slaves have locked down local iptables firewalls.
Ironic nodes boot on an 'external' network and require TFTP
and Ironic API access back to the node via its HOST_IP.  This inserts
the required rules to the top of the INPUT chain.

Change-Id: I2e5dfa2346d45fdd549a3a3fbc255f190195cdd6
(cherry picked from commit c1f0db2b1d)
2014-06-17 14:37:20 -07:00
Attila Fazekas 515e728244 Cut the heat flavor
1024Mb memory is too much for single instance.
approximately 4 GiB memory used even without a booted VM.

The heat auto-scaling scenario needs to boot 3 VM
(currently disabled), if any other test running in parallel
and boots up a vm it would easily can cause OOM an
issue.

The heat-slow job can work with 128 MiB instance memory,
but this change reduces it just to 512 MiB (safer for the guest),
and enough to avoid OOM issues on the host,
and let us to heve more vm at the same time.

The m1.tiny flavor is not good because now it has a hard coded
1 GiB disk limit and the f20 image requires 2 GiB.
Setting the disk size to '0' -> automatically use the virtual size
of the image.

Using multiple cores does not really helps in boot time :(,
but it might cause higher host load. (More locking)
Reducing the core number to 1.

Change-Id: Ice7c1253d15e91fd1c02bc8c6809335aaebfff4a
(cherry picked from commit 51557a5025)
2014-06-17 18:43:45 +00:00
Mauro S. M. Rodrigues cda90647e1 Add $TOP_DIR to the path when calling tools' scripts
The missing reference to $TOP_DIR prevent us to run stack.sh from a different
directory.

Cherry-pick of dae1152518
Change-Id: Ie15b89734264789bef9a8efcfdbbf2cdb89c936e
2014-06-17 18:38:58 +00:00
Sean Dague 730353b17f convert devstack from awk to outfilter
The complexity of the awk script was pretty high, and it would
be good to do it in summaries as well, which starts to get a bit
squirelly. Instead bring over the outfilter.py from grenade and
use it for the timestamping.

Any additional overhead from python should be offset from not
shelling out to date on every line of output.

(cherry picked from commit 62cb563ddc)

Conflicts:
	stack.sh

Change-Id: Ic2b86ddba3e7f6520a0fd35599b01143936c6deb
2014-06-16 16:21:18 -04:00
Sean Dague ca6446e3f2 double the screen sleep timeout
HP Cloud 1.1 is quite slow per core. So much so that grenade is
often failing to start services because bash in a screen session
isn't ready in 1.5s. Double this to 3s to try to decrease failures
in the gate.

We should instead do this via some readiness check to decrease
races.

(cherry picked from commit 43d8f1cddd)

Change-Id: I2b066a687916742e966190f00b5b06a795d4a014
2014-06-16 16:20:41 -04:00
Sean Dague 75654fe30a a more proper default nic selection criteria
look at all interfaces that ip link shows as being up, then filter
them for ^e or ^p devices. Should hold even after the bridges get
built.

Change-Id: If6b1e623f9d146c2430dc8a4a007997290b90846
2014-06-06 11:51:57 -04:00
Sean Dague e41cd06e16 make get-pip.py download failures more clear
curl dying ends up being a really unclear failure condition, and
hard to fingerprint in the gate. We should make this much more
explicit when we die.

Also, don't trust the upstream filename, because all the rest of
our logic would break if it changes anyway.

Change-Id: Ibc2a96b33471d24c597af0d7af896fb10523156f
2014-06-06 11:50:43 -04:00
Sean Dague 662567c8de be opinionated: only use get-pip.py
get-pip.py is now on a CDN, and is the prefered way to get pip.

Remove the default path of using pip tarballs from pypi and use
get-pip.py on from here on.

Closes-Bug: #1326539

Change-Id: I0661f7c6913ba6b3e1d00b30e22740d150bfd060
(cherry picked from commit 7b63c5ec9e)
2014-06-05 15:10:58 -04:00
Dean Troyer d4fe50feb7 Add CirrOS 0.3.2 to image list
In order to change the default in master we need to pre-cache the new image
in the previous release due to Grenade-reasons.

Change-Id: Ic76e6c13418171555135dd7b9440ce031aa8d259
2014-05-16 10:58:19 -05:00
Joe Gordon d9b2f2a58a Don't use deprecated nova libvirt conf names
libvirt_cpu_mode was renamed to libvirt.cpu_mode
libvirt_type was renamed to libvirt.virt_type

This patch is needed before I346ee0248c03e60716bd7dc4a5ee4493610867cb can
land.

Backported to stable/icehouse so that grenade will work, since we use
nova.conf set by old (stable/icehouse) when upgrading to new. Also this
config was deprecated in icehouse.

Change-Id: Ie8a39147ece3a3c86f4b146fa0af3641b1079319
(cherry picked from commit 1cd8efc890)
2014-04-24 14:38:31 -07:00
Sean Dague ea548cd5ce open stable/icehouse
stable icehouse devstack cut, with all repositories flipped over

Change-Id: Iab15290eebabecc1ccd04361652895b3eeb3b370
2014-04-17 09:14:56 -04:00
64 changed files with 1441 additions and 608 deletions
+3
View File
@@ -6,6 +6,9 @@ proto
src
localrc
local.sh
.tox
.stackenv
accrc
files/*.gz
files/*.qcow2
files/images
+1
View File
@@ -2,3 +2,4 @@
host=review.openstack.org
port=29418
project=openstack-dev/devstack.git
defaultbranch=stable/icehouse
+1
View File
@@ -48,3 +48,4 @@ Vishvananda Ishaya <vishvananda@gmail.com>
Yun Mao <yunmao@gmail.com>
Yong Sheng Gong <gongysh@cn.ibm.com>
Zhongyue Luo <lzyeval@gmail.com>
Zhenguo Niu <niu.zglinux@gmail.com>
+1 -1
View File
@@ -265,7 +265,7 @@ you'll need the following settings in your `localrc` section:
If tempest has been successfully configured, a basic set of smoke tests can be run as follows:
$ cd /opt/stack/tempest
$ nosetests tempest/scenario/test_network_basic_ops.py
$ tox -efull tempest.scenario.test_network_basic_ops
# DevStack on Xenserver
-1
View File
@@ -11,7 +11,6 @@ if is_service_enabled trove; then
cleanup_trove
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring Trove"
configure_troveclient
configure_trove
if is_service_enabled key; then
-2
View File
@@ -1,5 +1,4 @@
bridge-utils
pylint
python-setuptools
screen
unzip
@@ -10,7 +9,6 @@ lsof # useful when debugging
openssh-server
openssl
python-virtualenv
python-unittest2
iputils-ping
wget
curl
-3
View File
@@ -10,12 +10,9 @@ python-xattr
python-sqlalchemy
python-webob
python-kombu
pylint
python-eventlet
python-nose
python-sphinx
python-mox
python-kombu
python-coverage
python-cherrypy3 # why?
python-migrate
+1
View File
@@ -1,3 +1,4 @@
iptables
libguestfs0
libvirt-bin
openssh-client
+1 -1
View File
@@ -1,5 +1,6 @@
dnsmasq-base
dnsmasq-utils # for dhcp_release
conntrack
kpartx
parted
iputils-arping
@@ -25,7 +26,6 @@ qpidd # dist:precise NOPRIME
socat # used by ajaxterm
python-mox
python-paste
python-migrate
python-greenlet
python-libvirt # NOPRIME
python-libxml2
-1
View File
@@ -7,7 +7,6 @@ python-coverage
python-eventlet
python-greenlet
python-netifaces
python-nose
python-pastedeploy
python-simplejson
python-webob
-2
View File
@@ -12,9 +12,7 @@ openssh
openssl
psmisc
python-cmd2 # dist:opensuse-12.3
python-pylint
python-setuptools # instead of python-distribute; dist:sle11sp2
python-unittest2
screen
tar
tcpdump
-2
View File
@@ -14,7 +14,5 @@ python-dateutil
python-eventlet
python-kombu
python-mox
python-nose
python-pylint
python-sqlalchemy-migrate
python-xattr
+1
View File
@@ -1,6 +1,7 @@
curl
dnsmasq
dnsmasq-utils # dist:opensuse-12.3
conntrack-tools
ebtables
gawk
genisoimage # required for config_drive
-1
View File
@@ -9,7 +9,6 @@ python-devel
python-eventlet
python-greenlet
python-netifaces
python-nose
python-simplejson
python-xattr
sqlite3
-2
View File
@@ -10,10 +10,8 @@ openssl-devel # to rebuild pyOpenSSL if needed
libxml2-devel # dist:rhel6 [2]
libxslt-devel # dist:rhel6 [2]
psmisc
pylint
python-setuptools
python-prettytable # dist:rhel6 [1]
python-unittest2
python-virtualenv
python-devel
screen
-2
View File
@@ -2,7 +2,6 @@ Django
gcc
httpd # NOPRIME
mod_wsgi # NOPRIME
pylint
python-anyjson
python-BeautifulSoup
python-boto
@@ -14,7 +13,6 @@ python-httplib2
python-kombu
python-migrate
python-mox
python-nose
python-paste #dist:f19,f20
python-paste-deploy #dist:f19,f20
python-routes
+2
View File
@@ -1,6 +1,8 @@
iptables
libguestfs
libvirt
libvirt-python
net-tools
openssh-clients
openvswitch
python-libguestfs
+1
View File
@@ -1,6 +1,7 @@
MySQL-python
curl
dnsmasq-utils # for dhcp_release
conntrack-tools
ebtables
gawk
genisoimage # required for config_drive
-1
View File
@@ -7,7 +7,6 @@ python-coverage
python-eventlet
python-greenlet
python-netifaces
python-nose
python-paste-deploy # dist:f19,f20,rhel7
python-simplejson
python-webob
+9
View File
@@ -283,6 +283,15 @@ function upload_image {
DISK_FORMAT=iso
CONTAINER_FORMAT=bare
;;
*.vhd|*.vhdx|*.vhd.gz|*.vhdx.gz)
local extension="${IMAGE_FNAME#*.}"
IMAGE_NAME=$(basename "$IMAGE" ".$extension")
DISK_FORMAT=vhd
CONTAINER_FORMAT=bare
if [ "${IMAGE_FNAME##*.}" == "gz" ]; then
UNPACK=zcat
fi
;;
*) echo "Do not know what to do with $IMAGE_FNAME"; false;;
esac
+231 -52
View File
@@ -36,6 +36,11 @@
XTRACE=$(set +o | grep xtrace)
set +o xtrace
# Global Config Variables
declare -A GITREPO
declare -A GITBRANCH
declare -A GITDIR
# Config Functions
# ================
@@ -577,6 +582,18 @@ function git_clone {
cd $orig_dir
}
# A variation on git clone that lets us specify a project by it's
# actual name, like oslo.config. This is exceptionally useful in the
# library installation case
function git_clone_by_name {
local name=$1
local repo=${GITREPO[$name]}
local dir=${GITDIR[$name]}
local branch=${GITBRANCH[$name]}
git_clone $repo $dir $branch
}
# git can sometimes get itself infinitely stuck with transient network
# errors or other issues with the remote end. This wraps git in a
# timeout/retry loop and is intended to watch over non-local git
@@ -982,11 +999,15 @@ function zypper_install {
# _run_process() is designed to be backgrounded by run_process() to simulate a
# fork. It includes the dirty work of closing extra filehandles and preparing log
# files to produce the same logs as screen_it(). The log filename is derived
# from the service name and global-and-now-misnamed SCREEN_LOGDIR
# _run_process service "command-line"
# from the service name and global-and-now-misnamed ``SCREEN_LOGDIR``
# Uses globals ``CURRENT_LOG_TIME``, ``SCREEN_LOGDIR``, ``SCREEN_NAME``, ``SERVICE_DIR``
# If an optional group is provided sg will be used to set the group of
# the command.
# _run_process service "command-line" [group]
function _run_process {
local service=$1
local command="$2"
local group=$3
# Undo logging redirections and close the extra descriptors
exec 1>&3
@@ -995,15 +1016,23 @@ function _run_process {
exec 6>&-
if [[ -n ${SCREEN_LOGDIR} ]]; then
exec 1>&${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log 2>&1
ln -sf ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log ${SCREEN_LOGDIR}/screen-${1}.log
exec 1>&${SCREEN_LOGDIR}/screen-${service}.${CURRENT_LOG_TIME}.log 2>&1
ln -sf ${SCREEN_LOGDIR}/screen-${service}.${CURRENT_LOG_TIME}.log ${SCREEN_LOGDIR}/screen-${service}.log
# TODO(dtroyer): Hack to get stdout from the Python interpreter for the logs.
export PYTHONUNBUFFERED=1
fi
exec /bin/bash -c "$command"
die "$service exec failure: $command"
# Run under ``setsid`` to force the process to become a session and group leader.
# The pid saved can be used with pkill -g to get the entire process group.
if [[ -n "$group" ]]; then
setsid sg $group "$command" & echo $! >$SERVICE_DIR/$SCREEN_NAME/$service.pid
else
setsid $command & echo $! >$SERVICE_DIR/$SCREEN_NAME/$service.pid
fi
# Just silently exit this process
exit 0
}
# Helper to remove the ``*.failure`` files under ``$SERVICE_DIR/$SCREEN_NAME``.
@@ -1030,59 +1059,71 @@ function is_running {
return $RC
}
# run_process() launches a child process that closes all file descriptors and
# then exec's the passed in command. This is meant to duplicate the semantics
# of screen_it() without screen. PIDs are written to
# $SERVICE_DIR/$SCREEN_NAME/$service.pid
# run_process service "command-line"
# Run a single service under screen or directly
# If the command includes shell metachatacters (;<>*) it must be run using a shell
# If an optional group is provided sg will be used to run the
# command as that group.
# run_process service "command-line" [group]
function run_process {
local service=$1
local command="$2"
local group=$3
# Spawn the child process
_run_process "$service" "$command" &
echo $!
if is_service_enabled $service; then
if [[ "$USE_SCREEN" = "True" ]]; then
screen_service "$service" "$command" "$group"
else
# Spawn directly without screen
_run_process "$service" "$command" "$group" &
fi
fi
}
# Helper to launch a service in a named screen
# screen_it service "command-line"
function screen_it {
# Uses globals ``CURRENT_LOG_TIME``, ``SCREEN_NAME``, ``SCREEN_LOGDIR``,
# ``SERVICE_DIR``, ``USE_SCREEN``
# screen_service service "command-line" [group]
# Run a command in a shell in a screen window, if an optional group
# is provided, use sg to set the group of the command.
function screen_service {
local service=$1
local command="$2"
local group=$3
SCREEN_NAME=${SCREEN_NAME:-stack}
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
USE_SCREEN=$(trueorfalse True $USE_SCREEN)
if is_service_enabled $1; then
if is_service_enabled $service; then
# Append the service to the screen rc file
screen_rc "$1" "$2"
screen_rc "$service" "$command"
if [[ "$USE_SCREEN" = "True" ]]; then
screen -S $SCREEN_NAME -X screen -t $1
screen -S $SCREEN_NAME -X screen -t $service
if [[ -n ${SCREEN_LOGDIR} ]]; then
screen -S $SCREEN_NAME -p $1 -X logfile ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log
screen -S $SCREEN_NAME -p $1 -X log on
ln -sf ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log ${SCREEN_LOGDIR}/screen-${1}.log
fi
# sleep to allow bash to be ready to be send the command - we are
# creating a new window in screen and then sends characters, so if
# bash isn't running by the time we send the command, nothing happens
sleep 1.5
NL=`echo -ne '\015'`
# This fun command does the following:
# - the passed server command is backgrounded
# - the pid of the background process is saved in the usual place
# - the server process is brought back to the foreground
# - if the server process exits prematurely the fg command errors
# and a message is written to stdout and the service failure file
# The pid saved can be used in screen_stop() as a process group
# id to kill off all child processes
screen -S $SCREEN_NAME -p $1 -X stuff "$2 & echo \$! >$SERVICE_DIR/$SCREEN_NAME/$1.pid; fg || echo \"$1 failed to start\" | tee \"$SERVICE_DIR/$SCREEN_NAME/$1.failure\"$NL"
else
# Spawn directly without screen
run_process "$1" "$2" >$SERVICE_DIR/$SCREEN_NAME/$1.pid
if [[ -n ${SCREEN_LOGDIR} ]]; then
screen -S $SCREEN_NAME -p $service -X logfile ${SCREEN_LOGDIR}/screen-${service}.${CURRENT_LOG_TIME}.log
screen -S $SCREEN_NAME -p $service -X log on
ln -sf ${SCREEN_LOGDIR}/screen-${service}.${CURRENT_LOG_TIME}.log ${SCREEN_LOGDIR}/screen-${service}.log
fi
# sleep to allow bash to be ready to be send the command - we are
# creating a new window in screen and then sends characters, so if
# bash isn't running by the time we send the command, nothing happens
sleep 3
NL=`echo -ne '\015'`
# This fun command does the following:
# - the passed server command is backgrounded
# - the pid of the background process is saved in the usual place
# - the server process is brought back to the foreground
# - if the server process exits prematurely the fg command errors
# and a message is written to stdout and the service failure file
# The pid saved can be used in stop_process() as a process group
# id to kill off all child processes
if [[ -n "$group" ]]; then
command="sg $group '$command'"
fi
screen -S $SCREEN_NAME -p $service -X stuff "$command & echo \$! >$SERVICE_DIR/$SCREEN_NAME/${service}.pid; fg || echo \"$service failed to start\" | tee \"$SERVICE_DIR/$SCREEN_NAME/${service}.failure\"$NL"
fi
}
@@ -1117,21 +1158,42 @@ function screen_rc {
# If a PID is available use it, kill the whole process group via TERM
# If screen is being used kill the screen window; this will catch processes
# that did not leave a PID behind
# screen_stop service
function screen_stop {
# Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``, ``USE_SCREEN``
# screen_stop_service service
function screen_stop_service {
local service=$1
SCREEN_NAME=${SCREEN_NAME:-stack}
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
USE_SCREEN=$(trueorfalse True $USE_SCREEN)
if is_service_enabled $1; then
if is_service_enabled $service; then
# Clean up the screen window
screen -S $SCREEN_NAME -p $service -X kill
fi
}
# Stop a service process
# If a PID is available use it, kill the whole process group via TERM
# If screen is being used kill the screen window; this will catch processes
# that did not leave a PID behind
# Uses globals ``SERVICE_DIR``, ``USE_SCREEN``
# stop_process service
function stop_process {
local service=$1
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
USE_SCREEN=$(trueorfalse True $USE_SCREEN)
if is_service_enabled $service; then
# Kill via pid if we have one available
if [[ -r $SERVICE_DIR/$SCREEN_NAME/$1.pid ]]; then
pkill -TERM -P -$(cat $SERVICE_DIR/$SCREEN_NAME/$1.pid)
rm $SERVICE_DIR/$SCREEN_NAME/$1.pid
if [[ -r $SERVICE_DIR/$SCREEN_NAME/$service.pid ]]; then
pkill -g $(cat $SERVICE_DIR/$SCREEN_NAME/$service.pid)
rm $SERVICE_DIR/$SCREEN_NAME/$service.pid
fi
if [[ "$USE_SCREEN" = "True" ]]; then
# Clean up the screen window
screen -S $SCREEN_NAME -p $1 -X kill
screen_stop_service $service
fi
fi
}
@@ -1165,6 +1227,91 @@ function service_check {
fi
}
# Tail a log file in a screen if USE_SCREEN is true.
function tail_log {
local service=$1
local logfile=$2
USE_SCREEN=$(trueorfalse True $USE_SCREEN)
if [[ "$USE_SCREEN" = "True" ]]; then
screen_service "$service" "sudo tail -f $logfile"
fi
}
# Deprecated Functions
# --------------------
# _old_run_process() is designed to be backgrounded by old_run_process() to simulate a
# fork. It includes the dirty work of closing extra filehandles and preparing log
# files to produce the same logs as screen_it(). The log filename is derived
# from the service name and global-and-now-misnamed ``SCREEN_LOGDIR``
# Uses globals ``CURRENT_LOG_TIME``, ``SCREEN_LOGDIR``, ``SCREEN_NAME``, ``SERVICE_DIR``
# _old_run_process service "command-line"
function _old_run_process {
local service=$1
local command="$2"
# Undo logging redirections and close the extra descriptors
exec 1>&3
exec 2>&3
exec 3>&-
exec 6>&-
if [[ -n ${SCREEN_LOGDIR} ]]; then
exec 1>&${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log 2>&1
ln -sf ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log ${SCREEN_LOGDIR}/screen-${1}.log
# TODO(dtroyer): Hack to get stdout from the Python interpreter for the logs.
export PYTHONUNBUFFERED=1
fi
exec /bin/bash -c "$command"
die "$service exec failure: $command"
}
# old_run_process() launches a child process that closes all file descriptors and
# then exec's the passed in command. This is meant to duplicate the semantics
# of screen_it() without screen. PIDs are written to
# ``$SERVICE_DIR/$SCREEN_NAME/$service.pid`` by the spawned child process.
# old_run_process service "command-line"
function old_run_process {
local service=$1
local command="$2"
# Spawn the child process
_old_run_process "$service" "$command" &
echo $!
}
# Compatibility for existing start_XXXX() functions
# Uses global ``USE_SCREEN``
# screen_it service "command-line"
function screen_it {
if is_service_enabled $1; then
# Append the service to the screen rc file
screen_rc "$1" "$2"
if [[ "$USE_SCREEN" = "True" ]]; then
screen_service "$1" "$2"
else
# Spawn directly without screen
old_run_process "$1" "$2" >$SERVICE_DIR/$SCREEN_NAME/$1.pid
fi
fi
}
# Compatibility for existing stop_XXXX() functions
# Stop a service in screen
# If a PID is available use it, kill the whole process group via TERM
# If screen is being used kill the screen window; this will catch processes
# that did not leave a PID behind
# screen_stop service
function screen_stop {
# Clean up the screen window
stop_process $1
}
# Python Functions
# ================
@@ -1209,7 +1356,7 @@ function pip_install {
CMD_PIP=$DEST/.venv/bin/pip
SUDO_PIP="env"
else
SUDO_PIP="sudo"
SUDO_PIP="sudo -H"
CMD_PIP=$(get_pip_command)
fi
@@ -1239,6 +1386,37 @@ function pip_install {
&& $SUDO_PIP rm -rf ${pip_build_tmp}
}
# should we use this library from their git repo, or should we let it
# get pulled in via pip dependencies.
function use_library_from_git {
local name=$1
local enabled=1
[[ ,${LIBS_FROM_GIT}, =~ ,${name}, ]] && enabled=0
return $enabled
}
# setup a library by name. If we are trying to use the library from
# git, we'll do a git based install, otherwise we'll punt and the
# library should be installed by a requirements pull from another
# project.
function setup_lib {
local name=$1
local dir=${GITDIR[$name]}
setup_install $dir
}
# setup a library by name in editiable mode. If we are trying to use
# the library from git, we'll do a git based install, otherwise we'll
# punt and the library should be installed by a requirements pull from
# another project.
#
# use this for non namespaced libraries
function setup_dev_lib {
local name=$1
local dir=${GITDIR[$name]}
setup_develop $dir
}
# this should be used if you want to install globally, all libraries should
# use this, especially *oslo* ones
function setup_install {
@@ -1429,6 +1607,7 @@ function is_service_enabled {
# are implemented
[[ ${service} == n-cell-* && ${ENABLED_SERVICES} =~ "n-cell" ]] && enabled=0
[[ ${service} == n-cpu-* && ${ENABLED_SERVICES} =~ "n-cpu" ]] && enabled=0
[[ ${service} == "nova" && ${ENABLED_SERVICES} =~ "n-" ]] && enabled=0
[[ ${service} == "cinder" && ${ENABLED_SERVICES} =~ "c-" ]] && enabled=0
[[ ${service} == "ceilometer" && ${ENABLED_SERVICES} =~ "ceilometer-" ]] && enabled=0
+19 -17
View File
@@ -35,8 +35,9 @@ set +o xtrace
# --------
# Set up default directories
GITDIR["python-ceilometerclient"]=$DEST/python-ceilometerclient
CEILOMETER_DIR=$DEST/ceilometer
CEILOMETERCLIENT_DIR=$DEST/python-ceilometerclient
CEILOMETER_CONF_DIR=/etc/ceilometer
CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf
CEILOMETER_API_LOG_DIR=/var/log/ceilometer-api
@@ -123,12 +124,6 @@ function cleanup_ceilometer {
fi
}
# configure_ceilometerclient() - Set config files, create data dirs, etc
function configure_ceilometerclient {
setup_develop $CEILOMETERCLIENT_DIR
sudo install -D -m 0644 -o $STACK_USER {$CEILOMETERCLIENT_DIR/tools/,/etc/bash_completion.d/}ceilometer.bash_completion
}
# configure_ceilometer() - Set config files, create data dirs, etc
function configure_ceilometer {
setup_develop $CEILOMETER_DIR
@@ -230,21 +225,28 @@ function install_ceilometer {
# install_ceilometerclient() - Collect source and prepare
function install_ceilometerclient {
git_clone $CEILOMETERCLIENT_REPO $CEILOMETERCLIENT_DIR $CEILOMETERCLIENT_BRANCH
if use_library_from_git "python-ceilometerclient"; then
git_clone_by_name "python-ceilometerclient"
setup_dev_lib "python-ceilometerclient"
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-ceilometerclient"]}/tools/,/etc/bash_completion.d/}ceilometer.bash_completion
fi
}
# start_ceilometer() - Start running processes, including screen
function start_ceilometer {
run_process ceilometer-acentral "ceilometer-agent-central --config-file $CEILOMETER_CONF"
run_process ceilometer-anotification "ceilometer-agent-notification --config-file $CEILOMETER_CONF"
run_process ceilometer-collector "ceilometer-collector --config-file $CEILOMETER_CONF"
run_process ceilometer-api "ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
# 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
screen_it ceilometer-acompute "cd ; sg $LIBVIRT_GROUP \"ceilometer-agent-compute --config-file $CEILOMETER_CONF\""
run_process ceilometer-acompute "ceilometer-agent-compute --config-file $CEILOMETER_CONF" $LIBVIRT_GROUP
fi
if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
screen_it ceilometer-acompute "cd ; ceilometer-agent-compute --config-file $CEILOMETER_CONF"
run_process ceilometer-acompute "ceilometer-agent-compute --config-file $CEILOMETER_CONF"
fi
screen_it ceilometer-acentral "cd ; ceilometer-agent-central --config-file $CEILOMETER_CONF"
screen_it ceilometer-anotification "cd ; ceilometer-agent-notification --config-file $CEILOMETER_CONF"
screen_it ceilometer-collector "cd ; ceilometer-collector --config-file $CEILOMETER_CONF"
screen_it ceilometer-api "cd ; ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
# only die on API if it was actually intended to be turned on
if is_service_enabled ceilometer-api; then
@@ -254,15 +256,15 @@ function start_ceilometer {
fi
fi
screen_it ceilometer-alarm-notifier "cd ; ceilometer-alarm-notifier --config-file $CEILOMETER_CONF"
screen_it ceilometer-alarm-evaluator "cd ; ceilometer-alarm-evaluator --config-file $CEILOMETER_CONF"
run_process ceilometer-alarm-notifier "ceilometer-alarm-notifier --config-file $CEILOMETER_CONF"
run_process ceilometer-alarm-evaluator "ceilometer-alarm-evaluator --config-file $CEILOMETER_CONF"
}
# stop_ceilometer() - Stop running processes
function stop_ceilometer {
# Kill the ceilometer screen windows
for serv in ceilometer-acompute ceilometer-acentral ceilometer-anotification ceilometer-collector ceilometer-api ceilometer-alarm-notifier ceilometer-alarm-evaluator; do
screen_stop $serv
stop_process $serv
done
}
+17 -9
View File
@@ -35,8 +35,9 @@ if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
fi
# set up default directories
GITDIR["python-cinderclient"]=$DEST/python-cinderclient
CINDER_DIR=$DEST/cinder
CINDERCLIENT_DIR=$DEST/python-cinderclient
CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder}
CINDER_AUTH_CACHE_DIR=${CINDER_AUTH_CACHE_DIR:-/var/cache/cinder}
@@ -475,9 +476,11 @@ function install_cinder {
# install_cinderclient() - Collect source and prepare
function install_cinderclient {
git_clone $CINDERCLIENT_REPO $CINDERCLIENT_DIR $CINDERCLIENT_BRANCH
setup_develop $CINDERCLIENT_DIR
sudo install -D -m 0644 -o $STACK_USER {$CINDERCLIENT_DIR/tools/,/etc/bash_completion.d/}cinder.bash_completion
if use_library_from_git "python-cinderclient"; then
git_clone_by_name "python-cinderclient"
setup_dev_lib "python-cinderclient"
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-cinderclient"]}/tools/,/etc/bash_completion.d/}cinder.bash_completion
fi
}
# apply config.d approach for cinder volumes directory
@@ -514,10 +517,15 @@ function start_cinder {
sudo tgtadm --mode system --op update --name debug --value on
fi
screen_it c-api "cd $CINDER_DIR && $CINDER_BIN_DIR/cinder-api --config-file $CINDER_CONF"
screen_it c-sch "cd $CINDER_DIR && $CINDER_BIN_DIR/cinder-scheduler --config-file $CINDER_CONF"
screen_it c-bak "cd $CINDER_DIR && $CINDER_BIN_DIR/cinder-backup --config-file $CINDER_CONF"
screen_it c-vol "cd $CINDER_DIR && $CINDER_BIN_DIR/cinder-volume --config-file $CINDER_CONF"
run_process c-api "$CINDER_BIN_DIR/cinder-api --config-file $CINDER_CONF"
echo "Waiting for Cinder API to start..."
if ! wait_for_service $SERVICE_TIMEOUT $CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT; then
die $LINENO "c-api did not start"
fi
run_process c-sch "$CINDER_BIN_DIR/cinder-scheduler --config-file $CINDER_CONF"
run_process c-bak "$CINDER_BIN_DIR/cinder-backup --config-file $CINDER_CONF"
run_process c-vol "$CINDER_BIN_DIR/cinder-volume --config-file $CINDER_CONF"
# NOTE(jdg): For cinder, startup order matters. To ensure that repor_capabilities is received
# by the scheduler start the cinder-volume service last (or restart it) after the scheduler
@@ -533,7 +541,7 @@ function start_cinder {
function stop_cinder {
# Kill the cinder screen windows
for serv in c-api c-bak c-sch c-vol; do
screen_stop $serv
stop_process $serv
done
if is_service_enabled c-vol; then
+1 -3
View File
@@ -82,8 +82,6 @@ function merge_config_file {
local matchgroup=$2
local configfile=$3
[[ -r $configfile ]] || touch $configfile
get_meta_section $file $matchgroup $configfile | \
$CONFIG_AWK_CMD -v configfile=$configfile '
BEGIN { section = "" }
@@ -114,7 +112,7 @@ function merge_config_group {
for group in $matchgroups; do
for configfile in $(get_meta_section_files $localfile $group); do
if [[ -d $(dirname $configfile) ]]; then
if [[ -d $(dirname $(eval "echo $configfile")) ]]; then
merge_config_file $localfile $group $configfile
fi
done
+2 -2
View File
@@ -77,14 +77,14 @@ function install_ganttclient {
# start_gantt() - Start running processes, including screen
function start_gantt {
if is_service_enabled gantt; then
screen_it gantt "cd $GANTT_DIR && $GANTT_BIN_DIR/gantt-scheduler --config-file $GANTT_CONF"
run_process gantt "$GANTT_BIN_DIR/gantt-scheduler --config-file $GANTT_CONF"
fi
}
# stop_gantt() - Stop running processes
function stop_gantt {
echo "Stop Gantt"
screen_stop gantt
stop_process gantt
}
# Restore xtrace
+10 -7
View File
@@ -27,8 +27,9 @@ set +o xtrace
# --------
# Set up default directories
GITDIR["python-glanceclient"]=$DEST/python-glanceclient
GLANCE_DIR=$DEST/glance
GLANCECLIENT_DIR=$DEST/python-glanceclient
GLANCE_CACHE_DIR=${GLANCE_CACHE_DIR:=$DATA_DIR/glance/cache}
GLANCE_IMAGE_DIR=${GLANCE_IMAGE_DIR:=$DATA_DIR/glance/images}
GLANCE_AUTH_CACHE_DIR=${GLANCE_AUTH_CACHE_DIR:-/var/cache/glance}
@@ -234,8 +235,10 @@ function init_glance {
# install_glanceclient() - Collect source and prepare
function install_glanceclient {
git_clone $GLANCECLIENT_REPO $GLANCECLIENT_DIR $GLANCECLIENT_BRANCH
setup_develop $GLANCECLIENT_DIR
if use_library_from_git "python-glanceclient"; then
git_clone_by_name "python-glanceclient"
setup_dev_lib "python-glanceclient"
fi
}
# install_glance() - Collect source and prepare
@@ -246,8 +249,8 @@ function install_glance {
# start_glance() - Start running processes, including screen
function start_glance {
screen_it g-reg "cd $GLANCE_DIR; $GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
screen_it g-api "cd $GLANCE_DIR; $GLANCE_BIN_DIR/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf"
run_process g-reg "$GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
run_process g-api "$GLANCE_BIN_DIR/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf"
echo "Waiting for g-api ($GLANCE_HOSTPORT) to start..."
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$GLANCE_HOSTPORT; do sleep 1; done"; then
die $LINENO "g-api did not start"
@@ -257,8 +260,8 @@ function start_glance {
# stop_glance() - Stop running processes
function stop_glance {
# Kill the Glance screen windows
screen_stop g-api
screen_stop g-reg
stop_process g-api
stop_process g-reg
}
+12 -9
View File
@@ -29,8 +29,9 @@ set +o xtrace
# --------
# set up default directories
GITDIR["python-heatclient"]=$DEST/python-heatclient
HEAT_DIR=$DEST/heat
HEATCLIENT_DIR=$DEST/python-heatclient
HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE`
HEAT_CONF_DIR=/etc/heat
@@ -165,9 +166,11 @@ function create_heat_cache_dir {
# install_heatclient() - Collect source and prepare
function install_heatclient {
git_clone $HEATCLIENT_REPO $HEATCLIENT_DIR $HEATCLIENT_BRANCH
setup_develop $HEATCLIENT_DIR
sudo install -D -m 0644 -o $STACK_USER {$HEATCLIENT_DIR/tools/,/etc/bash_completion.d/}heat.bash_completion
if use_library_from_git "python-heatclient"; then
git_clone_by_name "python-heatclient"
setup_dev_lib "python-heatclient"
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-heatclient"]}/tools/,/etc/bash_completion.d/}heat.bash_completion
fi
}
# install_heat() - Collect source and prepare
@@ -177,17 +180,17 @@ function install_heat {
# start_heat() - Start running processes, including screen
function start_heat {
screen_it h-eng "cd $HEAT_DIR; bin/heat-engine --config-file=$HEAT_CONF"
screen_it h-api "cd $HEAT_DIR; bin/heat-api --config-file=$HEAT_CONF"
screen_it h-api-cfn "cd $HEAT_DIR; bin/heat-api-cfn --config-file=$HEAT_CONF"
screen_it h-api-cw "cd $HEAT_DIR; bin/heat-api-cloudwatch --config-file=$HEAT_CONF"
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"
}
# stop_heat() - Stop running processes
function stop_heat {
# Kill the screen windows
for serv in h-eng h-api h-api-cfn h-api-cw; do
screen_stop $serv
stop_process $serv
done
}
+14 -1
View File
@@ -25,6 +25,8 @@ set +o xtrace
# --------
# Set up default directories
GITDIR["django_openstack_auth"]=$DEST/django_openstack_auth
HORIZON_DIR=$DEST/horizon
# local_settings.py is used to customize Dashboard settings.
@@ -127,6 +129,7 @@ function init_horizon {
# Remove old log files that could mess with how devstack detects whether Horizon
# has been successfully started (see start_horizon() and functions::screen_it())
# and run_process
sudo rm -f /var/log/$APACHE_NAME/horizon_*
# Configure apache to run horizon
@@ -140,6 +143,16 @@ function init_horizon {
\" $FILES/apache-horizon.template >$horizon_conf"
}
# install_django_openstack_auth() - Collect source and prepare
function install_django_openstack_auth {
if use_library_from_git "django_openstack_auth"; then
local dir=${GITDIR["django_openstack_auth"]}
git_clone_by_name "django_openstack_auth"
fi
# if we aren't using this library from git, then we just let it
# get dragged in by the horizon setup.
}
# install_horizon() - Collect source and prepare
function install_horizon {
# Apache installation, because we mark it NOPRIME
@@ -151,7 +164,7 @@ function install_horizon {
# start_horizon() - Start running processes, including screen
function start_horizon {
restart_apache_server
screen_it horizon "cd $HORIZON_DIR && sudo tail -f /var/log/$APACHE_NAME/horizon_error.log"
tail_log horizon /var/log/$APACHE_NAME/horizon_error.log
}
# stop_horizon() - Stop running processes (non-screen)
+9 -5
View File
@@ -20,7 +20,7 @@ set +o xtrace
# Defaults
# --------
PBR_DIR=$DEST/pbr
GITDIR["pbr"]=$DEST/pbr
REQUIREMENTS_DIR=$DEST/requirements
# Entry Points
@@ -31,10 +31,10 @@ function unfubar_setuptools {
# this is a giant game of who's on first, but it does consistently work
# there is hope that upstream python packaging fixes this in the future
echo_summary "Unbreaking setuptools"
pip_install -U setuptools
pip_install -U "setuptools<8.0"
pip_install -U pip
uninstall_package python-setuptools
pip_install -U setuptools
pip_install -U "setuptools<8.0"
pip_install -U pip
}
@@ -45,8 +45,12 @@ function install_infra {
git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH
# Install pbr
git_clone $PBR_REPO $PBR_DIR $PBR_BRANCH
setup_install $PBR_DIR
if use_library_from_git "pbr"; then
git_clone_by_name "pbr"
setup_lib "pbr"
else
pip_install "pbr"
fi
}
# Restore xtrace
+40 -35
View File
@@ -28,10 +28,11 @@ set +o pipefail
# --------
# Set up default directories
GITDIR["python-ironicclient"]=$DEST/python-ironicclient
IRONIC_DIR=$DEST/ironic
IRONIC_DATA_DIR=$DATA_DIR/ironic
IRONIC_STATE_PATH=/var/lib/ironic
IRONICCLIENT_DIR=$DEST/python-ironicclient
IRONIC_AUTH_CACHE_DIR=${IRONIC_AUTH_CACHE_DIR:-/var/cache/ironic}
IRONIC_CONF_DIR=${IRONIC_CONF_DIR:-/etc/ironic}
IRONIC_CONF_FILE=$IRONIC_CONF_DIR/ironic.conf
@@ -49,15 +50,16 @@ IRONIC_SSH_KEY_FILENAME=${IRONIC_SSH_KEY_FILENAME:-ironic_key}
IRONIC_KEY_FILE=$IRONIC_SSH_KEY_DIR/$IRONIC_SSH_KEY_FILENAME
IRONIC_SSH_VIRT_TYPE=${IRONIC_SSH_VIRT_TYPE:-virsh}
IRONIC_TFTPBOOT_DIR=${IRONIC_TFTPBOOT_DIR:-$IRONIC_DATA_DIR/tftpboot}
IRONIC_VM_SSH_PORT=${IRONIC_VM_SSH_PORT:-2222}
IRONIC_VM_SSH_PORT=${IRONIC_VM_SSH_PORT:-22}
IRONIC_VM_SSH_ADDRESS=${IRONIC_VM_SSH_ADDRESS:-$HOST_IP}
IRONIC_VM_COUNT=${IRONIC_VM_COUNT:-1}
IRONIC_VM_SPECS_CPU=${IRONIC_VM_SPECS_CPU:-1}
# NOTE(agordeev): both ubuntu and fedora deploy images won't work with 256MB of RAM.
# System halts and throws kernel panic during initramfs unpacking.
# Ubuntu needs at least 384MB, but fedora requires 448.
# So placing 512 here to satisfy both.
IRONIC_VM_SPECS_RAM=${IRONIC_VM_SPECS_RAM:-512}
# NOTE(adam_g): Kernels 3.12 and newer user tmpfs by default for initramfs.
# DIB produced ramdisks tend to be ~250MB but tmpfs will only allow
# use of 50% of available memory before ENOSPC. Set minimum 1GB
# for nodes to avoid (LP: #1311987) and ensure consistency across
# older and newer kernels.
IRONIC_VM_SPECS_RAM=${IRONIC_VM_SPECS_RAM:-1024}
IRONIC_VM_SPECS_DISK=${IRONIC_VM_SPECS_DISK:-10}
IRONIC_VM_EMULATOR=${IRONIC_VM_EMULATOR:-/usr/bin/qemu-system-x86_64}
IRONIC_VM_NETWORK_BRIDGE=${IRONIC_VM_NETWORK_BRIDGE:-brbm}
@@ -107,8 +109,22 @@ function install_ironic {
# install_ironicclient() - Collect sources and prepare
function install_ironicclient {
git_clone $IRONICCLIENT_REPO $IRONICCLIENT_DIR $IRONICCLIENT_BRANCH
setup_develop $IRONICCLIENT_DIR
if use_library_from_git "python-ironicclient"; then
git_clone_by_name "python-ironicclient"
setup_dev_lib "python-ironicclient"
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-ironicclient"]}/tools/,/etc/bash_completion.d/}ironic.bash_completion
else
# nothing actually "requires" ironicclient, so force instally from pypi
pip_install python-ironicclient
fi
}
# _cleanup_ironic_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file
function _cleanup_ironic_apache_wsgi {
sudo rm -rf $IRONIC_HTTP_DIR
disable_apache_site ironic
sudo rm -f $(apache_site_config_for ironic)
restart_apache_server
}
# cleanup_ironic() - Remove residual data files, anything left over from previous
@@ -265,7 +281,7 @@ function start_ironic {
# start_ironic_api() - Used by start_ironic().
# Starts Ironic API server.
function start_ironic_api {
screen_it ir-api "cd $IRONIC_DIR; $IRONIC_BIN_DIR/ironic-api --config-file=$IRONIC_CONF_FILE"
run_process ir-api "$IRONIC_BIN_DIR/ironic-api --config-file=$IRONIC_CONF_FILE"
echo "Waiting for ir-api ($IRONIC_HOSTPORT) to start..."
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$IRONIC_HOSTPORT; do sleep 1; done"; then
die $LINENO "ir-api did not start"
@@ -275,7 +291,7 @@ function start_ironic_api {
# start_ironic_conductor() - Used by start_ironic().
# Starts Ironic conductor.
function start_ironic_conductor {
screen_it ir-cond "cd $IRONIC_DIR; $IRONIC_BIN_DIR/ironic-conductor --config-file=$IRONIC_CONF_FILE"
run_process ir-cond "$IRONIC_BIN_DIR/ironic-conductor --config-file=$IRONIC_CONF_FILE"
# TODO(romcheg): Find a way to check whether the conductor has started.
}
@@ -379,11 +395,16 @@ function enroll_vms {
neutron port-delete $PORT_ID
}
function configure_tftpd {
# enable tftp natting for allowing connections to SERVICE_HOST's tftp server
function configure_iptables {
# enable tftp natting for allowing connections to HOST_IP's tftp server
sudo modprobe nf_conntrack_tftp
sudo modprobe nf_nat_tftp
# nodes boot from TFTP and callback to the API server listening on $HOST_IP
sudo iptables -I INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true
sudo iptables -I INPUT -d $HOST_IP -p tcp --dport 6385 -j ACCEPT || true
}
function configure_tftpd {
if is_ubuntu; then
PXEBIN=/usr/lib/syslinux/pxelinux.0
elif is_fedora; then
@@ -432,31 +453,10 @@ function ironic_ssh_check {
fi
}
function configure_ironic_sshd {
# Ensure sshd server accepts connections from localhost only
SSH_CONFIG=/etc/ssh/sshd_config
HOST_PORT=$IRONIC_VM_SSH_ADDRESS:$IRONIC_VM_SSH_PORT
if ! sudo grep ListenAddress $SSH_CONFIG | grep $HOST_PORT; then
echo "ListenAddress $HOST_PORT" | sudo tee -a $SSH_CONFIG
fi
SSH_SERVICE_NAME=sshd
if is_ubuntu; then
SSH_SERVICE_NAME=ssh
fi
restart_service $SSH_SERVICE_NAME
# to ensure ssh service is up and running
sleep 3
ironic_ssh_check $IRONIC_SSH_KEY_DIR/$IRONIC_SSH_KEY_FILENAME $IRONIC_VM_SSH_ADDRESS $IRONIC_VM_SSH_PORT $IRONIC_SSH_USERNAME 10
}
function configure_ironic_auxiliary {
configure_ironic_dirs
configure_ironic_ssh_keypair
configure_ironic_sshd
ironic_ssh_check $IRONIC_SSH_KEY_DIR/$IRONIC_SSH_KEY_FILENAME $IRONIC_VM_SSH_ADDRESS $IRONIC_VM_SSH_PORT $IRONIC_SSH_USERNAME 10
}
# build deploy kernel+ramdisk, then upload them to glance
@@ -527,6 +527,7 @@ function prepare_baremetal_basic_ops {
create_bridge_and_vms
enroll_vms
configure_tftpd
configure_iptables
# restart nova-compute to ensure its resource tracking is up to
# date with newly enrolled nodes
@@ -546,6 +547,10 @@ function cleanup_baremetal_basic_ops {
sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/cleanup-nodes $IRONIC_VM_COUNT $IRONIC_VM_NETWORK_BRIDGE"
sudo rm -rf /etc/xinetd.d/tftp /etc/init/tftpd-hpa.override
restart_service xinetd
sudo iptables -D INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true
sudo iptables -D INPUT -d $HOST_IP -p tcp --dport 6385 -j ACCEPT || true
sudo rmmod nf_conntrack_tftp || true
sudo rmmod nf_nat_tftp || true
}
# Restore xtrace + pipefail
+31 -8
View File
@@ -32,6 +32,9 @@ set +o xtrace
# --------
# Set up default directories
GITDIR["python-keystoneclient"]=$DEST/python-keystoneclient
GITDIR["keystonemiddleware"]=$DEST/keystonemiddleware
KEYSTONE_DIR=$DEST/keystone
KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone}
KEYSTONE_CONF=$KEYSTONE_CONF_DIR/keystone.conf
@@ -39,8 +42,6 @@ KEYSTONE_PASTE_INI=${KEYSTONE_PASTE_INI:-$KEYSTONE_CONF_DIR/keystone-paste.ini}
KEYSTONE_AUTH_CACHE_DIR=${KEYSTONE_AUTH_CACHE_DIR:-/var/cache/keystone}
KEYSTONE_WSGI_DIR=${KEYSTONE_WSGI_DIR:-/var/www/keystone}
KEYSTONECLIENT_DIR=$DEST/python-keystoneclient
# Select the backend for Keystone's service catalog
KEYSTONE_CATALOG_BACKEND=${KEYSTONE_CATALOG_BACKEND:-sql}
KEYSTONE_CATALOG=$KEYSTONE_CONF_DIR/default_catalog.templates
@@ -177,6 +178,13 @@ function configure_keystone {
iniset $KEYSTONE_CONF assignment driver "keystone.assignment.backends.$KEYSTONE_ASSIGNMENT_BACKEND.Assignment"
fi
# Configure rabbitmq credentials
if is_service_enabled rabbit; then
iniset $KEYSTONE_CONF DEFAULT rabbit_userid $RABBIT_USERID
iniset $KEYSTONE_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $KEYSTONE_CONF DEFAULT rabbit_host $RABBIT_HOST
fi
# Set the URL advertised in the ``versions`` structure returned by the '/' route
iniset $KEYSTONE_CONF DEFAULT public_endpoint "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:%(public_port)s/"
iniset $KEYSTONE_CONF DEFAULT admin_endpoint "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:%(admin_port)s/"
@@ -389,9 +397,19 @@ function init_keystone {
# install_keystoneclient() - Collect source and prepare
function install_keystoneclient {
git_clone $KEYSTONECLIENT_REPO $KEYSTONECLIENT_DIR $KEYSTONECLIENT_BRANCH
setup_develop $KEYSTONECLIENT_DIR
sudo install -D -m 0644 -o $STACK_USER {$KEYSTONECLIENT_DIR/tools/,/etc/bash_completion.d/}keystone.bash_completion
if use_library_from_git "python-keystoneclient"; then
git_clone_by_name "python-keystoneclient"
setup_dev_lib "python-keystoneclient"
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-keystoneclient"]}/tools/,/etc/bash_completion.d/}keystone.bash_completion
fi
}
# install_keystonemiddleware() - Collect source and prepare
function install_keystonemiddleware {
if use_library_from_git "keystonemiddleware"; then
git_clone_by_name "keystonemiddleware"
setup_dev_lib "keystonemiddleware"
fi
}
# install_keystone() - Collect source and prepare
@@ -428,10 +446,10 @@ function start_keystone {
if is_apache_enabled_service key; then
restart_apache_server
screen_it key "cd $KEYSTONE_DIR && sudo tail -f /var/log/$APACHE_NAME/keystone"
tail_log key /var/log/$APACHE_NAME/keystone
else
# Start Keystone in a screen window
screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF --debug"
run_process key "$KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF --debug"
fi
echo "Waiting for keystone to start..."
@@ -449,9 +467,14 @@ function start_keystone {
# stop_keystone() - Stop running processes
function stop_keystone {
# Kill the Keystone screen window
screen_stop key
stop_process key
# Cleanup the WSGI files and VHOST
_cleanup_keystone_apache_wsgi
}
function is_keystone_enabled {
return is_service_enabled key
}
# Restore xtrace
$XTRACE
+17 -13
View File
@@ -70,8 +70,10 @@ PRIVATE_SUBNET_NAME=${PRIVATE_SUBNET_NAME:-"private-subnet"}
PUBLIC_SUBNET_NAME=${PUBLIC_SUBNET_NAME:-"public-subnet"}
# Set up default directories
GITDIR["python-neutronclient"]=$DEST/python-neutronclient
NEUTRON_DIR=$DEST/neutron
NEUTRONCLIENT_DIR=$DEST/python-neutronclient
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
# Support entry points installation of console scripts
@@ -450,9 +452,11 @@ function install_neutron {
# install_neutronclient() - Collect source and prepare
function install_neutronclient {
git_clone $NEUTRONCLIENT_REPO $NEUTRONCLIENT_DIR $NEUTRONCLIENT_BRANCH
setup_develop $NEUTRONCLIENT_DIR
sudo install -D -m 0644 -o $STACK_USER {$NEUTRONCLIENT_DIR/tools/,/etc/bash_completion.d/}neutron.bash_completion
if use_library_from_git "python-neutronclient"; then
git_clone_by_name "python-neutronclient"
setup_dev_lib "python-neutronclient"
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-neutronclient"]}/tools/,/etc/bash_completion.d/}neutron.bash_completion
fi
}
# install_neutron_agent_packages() - Collect source and prepare
@@ -476,7 +480,7 @@ function start_neutron_service_and_check {
CFG_FILE_OPTIONS+=" --config-file /$cfg_file"
done
# Start the Neutron service
screen_it q-svc "cd $NEUTRON_DIR && python $NEUTRON_BIN_DIR/neutron-server $CFG_FILE_OPTIONS"
run_process q-svc "python $NEUTRON_BIN_DIR/neutron-server $CFG_FILE_OPTIONS"
echo "Waiting for Neutron to start..."
if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- http://$Q_HOST:$Q_PORT; do sleep 1; done"; then
die $LINENO "Neutron did not start"
@@ -486,8 +490,8 @@ function start_neutron_service_and_check {
# Start running processes, including screen
function start_neutron_agents {
# Start up the neutron agents if enabled
screen_it q-agt "cd $NEUTRON_DIR && python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE"
screen_it q-dhcp "cd $NEUTRON_DIR && python $AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE"
run_process q-agt "python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE"
run_process q-dhcp "python $AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file=$Q_DHCP_CONF_FILE"
L3_CONF_FILES="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE"
@@ -495,24 +499,24 @@ function start_neutron_agents {
L3_CONF_FILES="$L3_CONF_FILES --config-file $Q_FWAAS_CONF_FILE"
fi
if is_service_enabled q-vpn; then
screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $L3_CONF_FILES"
run_process q-vpn "$AGENT_VPN_BINARY $L3_CONF_FILES"
else
screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY $L3_CONF_FILES"
run_process q-l3 "python $AGENT_L3_BINARY $L3_CONF_FILES"
fi
screen_it q-meta "cd $NEUTRON_DIR && python $AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file=$Q_META_CONF_FILE"
run_process q-meta "python $AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file=$Q_META_CONF_FILE"
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
# For XenServer, start an agent for the domU openvswitch
screen_it q-domua "cd $NEUTRON_DIR && python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE.domU"
run_process q-domua "python $AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE.domU"
fi
if is_service_enabled q-lbaas; then
screen_it q-lbaas "cd $NEUTRON_DIR && python $AGENT_LBAAS_BINARY --config-file $NEUTRON_CONF --config-file=$LBAAS_AGENT_CONF_FILENAME"
run_process q-lbaas "python $AGENT_LBAAS_BINARY --config-file $NEUTRON_CONF --config-file=$LBAAS_AGENT_CONF_FILENAME"
fi
if is_service_enabled q-metering; then
screen_it q-metering "cd $NEUTRON_DIR && python $AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME"
run_process q-metering "python $AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME"
fi
}
+1 -1
View File
@@ -9,7 +9,7 @@ set +o xtrace
# Select either 'gre', 'vxlan', or '(gre vxlan)'
Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-}
# This has to be set here since the agent will set this in the config file
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" == "gre" || "$Q_ML2_TENANT_NETWORK_TYPE" == "vxlan" ]]; then
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE)
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=gre)
+8 -1
View File
@@ -38,7 +38,14 @@ function _neutron_ovs_base_install_agent_packages {
# FIXME add to ``files/apts/neutron``, but don't install if not needed!
if is_ubuntu; then
kernel_version=`cat /proc/version | cut -d " " -f3`
install_package make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
ovs_packages="make fakeroot dkms openvswitch-switch"
# From kernel 3.13 on, openvswitch-datapath-dkms is not needed
kernel_major_minor=`echo $kernel_version | cut -d. -f1-2`
if [ `vercmp_numbers "$kernel_major_minor" "3.13"` -lt "0" ]; then
ovs_packages="$ovs_packages openvswitch-datapath-dkms"
fi
ovs_packages="$ovs_packages linux-headers-$kernel_version"
install_package $ovs_packages
elif is_fedora; then
install_package openvswitch
# Ensure that the service is started
+4 -2
View File
@@ -28,12 +28,14 @@ functions to be implemented
git clone xxx
* ``start_<third_party>``:
start running processes, including screen
start running processes, including screen if USE_SCREEN=True
e.g.
screen_it XXXX "cd $XXXXY_DIR && $XXXX_DIR/bin/XXXX-bin"
run_process XXXX "$XXXX_DIR/bin/XXXX-bin"
* ``stop_<third_party>``:
stop running processes (non-screen)
e.g.
stop_process XXXX
* ``check_<third_party>``:
verify that the integration between neutron server and third-party components is sane
+1 -1
View File
@@ -63,7 +63,7 @@ function install_ryu {
}
function start_ryu {
screen_it ryu "cd $RYU_DIR && $RYU_DIR/bin/ryu-manager --config-file $RYU_CONF"
run_process ryu "$RYU_DIR/bin/ryu-manager --config-file $RYU_CONF"
}
function stop_ryu {
+48 -27
View File
@@ -29,8 +29,10 @@ set +o xtrace
# --------
# Set up default directories
GITDIR["python-novaclient"]=$DEST/python-novaclient
NOVA_DIR=$DEST/nova
NOVACLIENT_DIR=$DEST/python-novaclient
NOVA_STATE_PATH=${NOVA_STATE_PATH:=$DATA_DIR/nova}
# INSTANCES_PATH is the previous name for this
NOVA_INSTANCES_PATH=${NOVA_INSTANCES_PATH:=${INSTANCES_PATH:=$NOVA_STATE_PATH/instances}}
@@ -39,6 +41,7 @@ NOVA_AUTH_CACHE_DIR=${NOVA_AUTH_CACHE_DIR:-/var/cache/nova}
NOVA_CONF_DIR=/etc/nova
NOVA_CONF=$NOVA_CONF_DIR/nova.conf
NOVA_CELLS_CONF=$NOVA_CONF_DIR/nova-cells.conf
NOVA_FAKE_CONF=$NOVA_CONF_DIR/nova-fake.conf
NOVA_CELLS_DB=${NOVA_CELLS_DB:-nova_cell}
NOVA_API_PASTE_INI=${NOVA_API_PASTE_INI:-$NOVA_CONF_DIR/api-paste.ini}
@@ -75,8 +78,18 @@ QEMU_CONF=/etc/libvirt/qemu.conf
# Set default defaults here as some hypervisor drivers override these
PUBLIC_INTERFACE_DEFAULT=br100
GUEST_INTERFACE_DEFAULT=eth0
FLAT_NETWORK_BRIDGE_DEFAULT=br100
# set the GUEST_INTERFACE_DEFAULT to some interface on the box so that
# the default isn't completely crazy. This will match eth*, em*, or
# the new p* interfaces, then basically picks the first
# alphabetically. It's probably wrong, however it's less wrong than
# always using 'eth0' which doesn't exist on new Linux distros at all.
GUEST_INTERFACE_DEFAULT=$(ip link \
| grep 'state UP' \
| awk '{print $2}' \
| sed 's/://' \
| grep ^[ep] \
| head -1)
# Get hypervisor configuration
# ----------------------------
@@ -578,8 +591,8 @@ function init_nova_cells {
fi
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF db sync
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=guest --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
$NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=guest --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
$NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1
fi
}
@@ -639,9 +652,11 @@ function init_nova {
# install_novaclient() - Collect source and prepare
function install_novaclient {
git_clone $NOVACLIENT_REPO $NOVACLIENT_DIR $NOVACLIENT_BRANCH
setup_develop $NOVACLIENT_DIR
sudo install -D -m 0644 -o $STACK_USER {$NOVACLIENT_DIR/tools/,/etc/bash_completion.d/}nova.bash_completion
if use_library_from_git "python-novaclient"; then
git_clone_by_name "python-novaclient"
setup_dev_lib "python-novaclient"
sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-novaclient"]}/tools/,/etc/bash_completion.d/}nova.bash_completion
fi
}
# install_nova() - Collect source and prepare
@@ -687,7 +702,7 @@ function start_nova_api {
service_port=$NOVA_SERVICE_PORT_INT
fi
screen_it n-api "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-api"
run_process n-api "$NOVA_BIN_DIR/nova-api"
echo "Waiting for nova-api to start..."
if ! wait_for_service $SERVICE_TIMEOUT http://$SERVICE_HOST:$service_port; then
die $LINENO "nova-api did not start"
@@ -709,17 +724,23 @@ function start_nova_compute {
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
# The group **$LIBVIRT_GROUP** is added to the current user in this script.
# Use 'sg' to execute nova-compute as a member of the **$LIBVIRT_GROUP** group.
screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf'"
# sg' will be used in run_process to execute nova-compute as a member of the
# **$LIBVIRT_GROUP** group.
run_process n-cpu "$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf" $LIBVIRT_GROUP
elif [[ "$VIRT_DRIVER" = 'fake' ]]; then
for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do
screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf --config-file <(echo -e '[DEFAULT]\nhost=${HOSTNAME}${i}')"
# Avoid process redirection of fake host configurations by
# creating or modifying real configurations. Each fake
# gets its own configuration and own log file.
local fake_conf="${NOVA_FAKE_CONF}-${i}"
iniset $fake_conf DEFAULT nhost "${HOSTNAME}${i}"
run_process "n-cpu-${i}" "$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf --config-file $fake_conf"
done
else
if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
start_nova_hypervisor
fi
screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf"
run_process n-cpu "$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf"
fi
}
@@ -732,25 +753,25 @@ function start_nova_rest {
local compute_cell_conf=$NOVA_CONF
fi
# ``screen_it`` checks ``is_service_enabled``, it is not needed here
screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor --config-file $compute_cell_conf"
screen_it n-cell-region "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $api_cell_conf"
screen_it n-cell-child "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $compute_cell_conf"
# ``run_process`` checks ``is_service_enabled``, it is not needed here
run_process n-cond "$NOVA_BIN_DIR/nova-conductor --config-file $compute_cell_conf"
run_process n-cell-region "$NOVA_BIN_DIR/nova-cells --config-file $api_cell_conf"
run_process n-cell-child "$NOVA_BIN_DIR/nova-cells --config-file $compute_cell_conf"
screen_it n-crt "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cert --config-file $api_cell_conf"
screen_it n-net "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-network --config-file $compute_cell_conf"
screen_it n-sch "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-scheduler --config-file $compute_cell_conf"
screen_it n-api-meta "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf"
run_process n-crt "$NOVA_BIN_DIR/nova-cert --config-file $api_cell_conf"
run_process n-net "$NOVA_BIN_DIR/nova-network --config-file $compute_cell_conf"
run_process n-sch "$NOVA_BIN_DIR/nova-scheduler --config-file $compute_cell_conf"
run_process n-api-meta "$NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf"
screen_it n-novnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-novncproxy --config-file $api_cell_conf --web $NOVNC_WEB_DIR"
screen_it n-xvnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-xvpvncproxy --config-file $api_cell_conf"
screen_it n-spice "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-spicehtml5proxy --config-file $api_cell_conf --web $SPICE_WEB_DIR"
screen_it n-cauth "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf"
run_process n-novnc "$NOVA_BIN_DIR/nova-novncproxy --config-file $api_cell_conf --web $NOVNC_WEB_DIR"
run_process n-xvnc "$NOVA_BIN_DIR/nova-xvpvncproxy --config-file $api_cell_conf"
run_process n-spice "$NOVA_BIN_DIR/nova-spicehtml5proxy --config-file $api_cell_conf --web $SPICE_WEB_DIR"
run_process n-cauth "$NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf"
# Starting the nova-objectstore only if swift3 service is not enabled.
# Swift will act as s3 objectstore.
is_service_enabled swift3 || \
screen_it n-obj "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-objectstore --config-file $api_cell_conf"
run_process n-obj "$NOVA_BIN_DIR/nova-objectstore --config-file $api_cell_conf"
}
function start_nova {
@@ -759,7 +780,7 @@ function start_nova {
}
function stop_nova_compute {
screen_stop n-cpu
stop_process n-cpu
if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
stop_nova_hypervisor
fi
@@ -770,7 +791,7 @@ function stop_nova_rest {
# Some services are listed here twice since more than one instance
# of a service may be running in certain configs.
for serv in n-api n-crt n-net n-sch n-novnc n-xvnc n-cauth n-spice n-cond n-cell n-cell n-api-meta n-obj; do
screen_stop $serv
stop_process $serv
done
}
+2 -2
View File
@@ -39,8 +39,8 @@ function cleanup_nova_hypervisor {
# configure_nova_hypervisor - Set config files, create data dirs, etc
function configure_nova_hypervisor {
configure_libvirt
iniset $NOVA_CONF DEFAULT libvirt_type "$LIBVIRT_TYPE"
iniset $NOVA_CONF DEFAULT libvirt_cpu_mode "none"
iniset $NOVA_CONF libvirt virt_type "$LIBVIRT_TYPE"
iniset $NOVA_CONF libvirt cpu_mode "none"
iniset $NOVA_CONF DEFAULT use_usb_tablet "False"
iniset $NOVA_CONF DEFAULT default_ephemeral_format "ext4"
iniset $NOVA_CONF DEFAULT compute_driver "libvirt.LibvirtDriver"
+3 -1
View File
@@ -148,6 +148,8 @@ function start_opendaylight {
# The flags to ODL have the following meaning:
# -of13: runs ODL using OpenFlow 1.3 protocol support.
# -virt ovsdb: Runs ODL in "virtualization" mode with OVSDB support
# NOTE(chdent): Leaving this as screen_it instead of run_process until
# the right thing for this service is determined.
screen_it odl-server "cd $ODL_DIR/opendaylight && JAVA_HOME=$JHOME ./run.sh $ODL_ARGS -of13 -virt ovsdb"
# Sleep a bit to let OpenDaylight finish starting up
@@ -156,7 +158,7 @@ function start_opendaylight {
# stop_opendaylight() - Stop running processes (non-screen)
function stop_opendaylight {
screen_stop odl-server
stop_process odl-server
}
# stop_opendaylight-compute() - Remove OVS bridges
+26 -47
View File
@@ -20,60 +20,39 @@ set +o xtrace
# Defaults
# --------
CLIFF_DIR=$DEST/cliff
OSLOCFG_DIR=$DEST/oslo.config
OSLOMSG_DIR=$DEST/oslo.messaging
OSLORWRAP_DIR=$DEST/oslo.rootwrap
OSLOVMWARE_DIR=$DEST/oslo.vmware
PYCADF_DIR=$DEST/pycadf
STEVEDORE_DIR=$DEST/stevedore
TASKFLOW_DIR=$DEST/taskflow
GITDIR["cliff"]=$DEST/cliff
GITDIR["oslo.config"]=$DEST/oslo.config
GITDIR["oslo.messaging"]=$DEST/oslo.messaging
GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
GITDIR["oslo.vmware"]=$DEST/oslo.vmware
GITDIR["pycadf"]=$DEST/pycadf
GITDIR["stevedore"]=$DEST/stevedore
GITDIR["taskflow"]=$DEST/taskflow
# Entry Points
# ------------
# install_oslo() - Collect source and prepare
function install_oslo {
# TODO(sdague): remove this once we get to Icehouse, this just makes
# for a smoother transition of existing users.
cleanup_oslo
git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH
setup_install $CLIFF_DIR
git_clone $OSLOCFG_REPO $OSLOCFG_DIR $OSLOCFG_BRANCH
setup_install $OSLOCFG_DIR
git_clone $OSLOMSG_REPO $OSLOMSG_DIR $OSLOMSG_BRANCH
setup_install $OSLOMSG_DIR
git_clone $OSLORWRAP_REPO $OSLORWRAP_DIR $OSLORWRAP_BRANCH
setup_install $OSLORWRAP_DIR
git_clone $OSLOVMWARE_REPO $OSLOVMWARE_DIR $OSLOVMWARE_BRANCH
setup_install $OSLOVMWARE_DIR
git_clone $PYCADF_REPO $PYCADF_DIR $PYCADF_BRANCH
setup_install $PYCADF_DIR
git_clone $STEVEDORE_REPO $STEVEDORE_DIR $STEVEDORE_BRANCH
setup_install $STEVEDORE_DIR
git_clone $TASKFLOW_REPO $TASKFLOW_DIR $TASKFLOW_BRANCH
setup_install $TASKFLOW_DIR
}
# cleanup_oslo() - purge possibly old versions of oslo
function cleanup_oslo {
# this means we've got an old oslo installed, lets get rid of it
if ! python -c 'import oslo.config' 2>/dev/null; then
echo "Found old oslo.config... removing to ensure consistency"
local PIP_CMD=$(get_pip_command)
pip_install oslo.config
sudo $PIP_CMD uninstall -y oslo.config
function _do_install_oslo_lib {
local name=$1
if use_library_from_git "$name"; then
git_clone_by_name "$name"
setup_lib "$name"
fi
}
# install_oslo() - Collect source and prepare
function install_oslo {
_do_install_oslo_lib "cliff"
_do_install_oslo_lib "oslo.config"
_do_install_oslo_lib "oslo.messaging"
_do_install_oslo_lib "oslo.rootwrap"
_do_install_oslo_lib "oslo.vmware"
_do_install_oslo_lib "pycadf"
_do_install_oslo_lib "stevedore"
_do_install_oslo_lib "taskflow"
}
# Restore xtrace
$XTRACE
+23 -3
View File
@@ -5,7 +5,7 @@
# Dependencies:
#
# - ``functions`` file
# - ``RABBIT_{HOST|PASSWORD}`` must be defined when RabbitMQ is used
# - ``RABBIT_{HOST|PASSWORD|USERID}`` must be defined when RabbitMQ is used
# ``stack.sh`` calls the entry points in this order:
#
@@ -63,6 +63,9 @@ function check_rpc_backend {
function cleanup_rpc_backend {
if is_service_enabled rabbit; then
# Obliterate rabbitmq-server
if [ -n "$RABBIT_USERID" ]; then
sudo rabbitmqctl delete_user "$RABBIT_USERID"
fi
uninstall_package rabbitmq-server
sudo killall epmd || sudo killall -9 epmd
if is_ubuntu; then
@@ -147,15 +150,16 @@ function restart_rpc_backend {
# service is not started by default
restart_service rabbitmq-server
fi
rabbit_setuser "$RABBIT_USERID" "$RABBIT_PASSWORD"
# change the rabbit password since the default is "guest"
sudo rabbitmqctl change_password guest $RABBIT_PASSWORD && break
sudo rabbitmqctl change_password $RABBIT_USERID $RABBIT_PASSWORD && break
[[ $i -eq "10" ]] && die $LINENO "Failed to set rabbitmq password"
done
if is_service_enabled n-cell; then
# Add partitioned access for the child cell
if [ -z `sudo rabbitmqctl list_vhosts | grep child_cell` ]; then
sudo rabbitmqctl add_vhost child_cell
sudo rabbitmqctl set_permissions -p child_cell guest ".*" ".*" ".*"
sudo rabbitmqctl set_permissions -p child_cell $RABBIT_USERID ".*" ".*" ".*"
fi
fi
elif is_service_enabled qpid; then
@@ -188,6 +192,7 @@ function iniset_rpc_backend {
iniset $file $section rpc_backend ${package}.openstack.common.rpc.impl_kombu
iniset $file $section rabbit_hosts $RABBIT_HOST
iniset $file $section rabbit_password $RABBIT_PASSWORD
iniset $file $section rabbit_userid $RABBIT_USERID
fi
}
@@ -202,6 +207,21 @@ function qpid_is_supported {
( ! is_suse )
}
function rabbit_setuser {
local user="$1" pass="$2" found="" out=""
out=$(sudo rabbitmqctl list_users) ||
{ echo "failed to list users" 1>&2; return 1; }
found=$(echo "$out" | awk '$1 == user { print $1 }' "user=$user")
if [ "$found" = "$user" ]; then
sudo rabbitmqctl change_password "$user" "$pass" ||
{ echo "failed changing pass for '$user'" 1>&2; return 1; }
else
sudo rabbitmqctl add_user "$user" "$pass" ||
{ echo "failed changing pass for $user"; return 1; }
fi
sudo rabbitmqctl set_permissions "$user" ".*" ".*" ".*"
}
# Restore xtrace
$XTRACE
+11 -5
View File
@@ -20,12 +20,10 @@ set +o xtrace
# Defaults
# --------
# Set up default repos
SAHARA_REPO=${SAHARA_REPO:-${GIT_BASE}/openstack/sahara.git}
SAHARA_BRANCH=${SAHARA_BRANCH:-master}
# Set up default directories
GITDIR["python-saharaclient"]=$DEST/python-saharaclient
SAHARA_DIR=$DEST/sahara
SAHARA_CONF_DIR=${SAHARA_CONF_DIR:-/etc/sahara}
SAHARA_CONF_FILE=${SAHARA_CONF_DIR}/sahara.conf
@@ -157,9 +155,17 @@ function install_sahara {
setup_develop $SAHARA_DIR
}
# install_python_saharaclient() - Collect source and prepare
function install_python_saharaclient {
if use_library_from_git "python-saharaclient"; then
git_clone_by_name "python-saharaclient"
setup_dev_lib "python-saharaclient"
fi
}
# start_sahara() - Start running processes, including screen
function start_sahara {
screen_it sahara "cd $SAHARA_DIR && $SAHARA_BIN_DIR/sahara-api --config-file $SAHARA_CONF_FILE"
run_process sahara "$SAHARA_BIN_DIR/sahara-api --config-file $SAHARA_CONF_FILE"
}
# stop_sahara() - Stop running processes
+32 -20
View File
@@ -30,8 +30,10 @@ set +o xtrace
# --------
# Set up default directories
GITDIR["python-swiftclient"]=$DEST/python-swiftclient
SWIFT_DIR=$DEST/swift
SWIFTCLIENT_DIR=$DEST/python-swiftclient
SWIFT_AUTH_CACHE_DIR=${SWIFT_AUTH_CACHE_DIR:-/var/cache/swift}
SWIFT_APACHE_WSGI_DIR=${SWIFT_APACHE_WSGI_DIR:-/var/www/swift}
SWIFT3_DIR=$DEST/swift3
@@ -308,7 +310,12 @@ function configure_swift {
SWIFT_CONFIG_PROXY_SERVER=${SWIFT_CONF_DIR}/proxy-server.conf
cp ${SWIFT_DIR}/etc/proxy-server.conf-sample ${SWIFT_CONFIG_PROXY_SERVER}
cp ${SWIFT_DIR}/etc/container-sync-realms.conf-sample ${SWIFT_CONF_DIR}/container-sync-realms.conf
# To run container sync feature introduced in Swift ver 1.12.0,
# container sync "realm" is added in container-sync-realms.conf
local csyncfile=${SWIFT_CONF_DIR}/container-sync-realms.conf
cp ${SWIFT_DIR}/etc/container-sync-realms.conf-sample ${csyncfile}
iniset ${csyncfile} realm1 key realm1key
iniset ${csyncfile} realm1 cluster_name1 "http://$SERVICE_HOST:8080/v1/"
iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT user
iniset ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT user ${STACK_USER}
@@ -334,12 +341,12 @@ function configure_swift {
iniset ${SWIFT_CONFIG_PROXY_SERVER} app:proxy-server node_timeout 120
iniset ${SWIFT_CONFIG_PROXY_SERVER} app:proxy-server conn_timeout 20
# Skipped due to bug 1294789
## Configure Ceilometer
#if is_service_enabled ceilometer; then
# iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer use "egg:ceilometer#swift"
# SWIFT_EXTRAS_MIDDLEWARE_LAST="${SWIFT_EXTRAS_MIDDLEWARE_LAST} ceilometer"
#fi
# Configure Ceilometer
if is_service_enabled ceilometer; then
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer "set log_level" "WARN"
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer use "egg:ceilometer#swift"
SWIFT_EXTRAS_MIDDLEWARE_LAST="${SWIFT_EXTRAS_MIDDLEWARE_LAST} ceilometer"
fi
# Restrict the length of auth tokens in the swift proxy-server logs.
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:proxy-logging reveal_sensitive_prefix ${SWIFT_LOG_TOKEN_LENGTH}
@@ -453,10 +460,13 @@ EOF
rm -rf ${swift_log_dir}
mkdir -p ${swift_log_dir}/hourly
sudo chown -R ${STACK_USER}:adm ${swift_log_dir}
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
tee /etc/rsyslog.d/10-swift.conf
# restart syslog to take the changes
sudo killall -HUP rsyslogd
if [[ $SYSLOG != "False" ]]; then
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
tee /etc/rsyslog.d/10-swift.conf
# restart syslog to take the changes
sudo killall -HUP rsyslogd
fi
if is_apache_enabled_service swift; then
_config_swift_apache_wsgi
@@ -625,8 +635,10 @@ function install_swift {
}
function install_swiftclient {
git_clone $SWIFTCLIENT_REPO $SWIFTCLIENT_DIR $SWIFTCLIENT_BRANCH
setup_develop $SWIFTCLIENT_DIR
if use_library_from_git "python-swiftclient"; then
git_clone_by_name "python-swiftclient"
setup_dev_lib "python-swiftclient"
fi
}
# start_swift() - Start running processes, including screen
@@ -646,10 +658,10 @@ function start_swift {
if is_apache_enabled_service swift; then
restart_apache_server
swift-init --run-dir=${SWIFT_DATA_DIR}/run rest start
screen_it s-proxy "cd $SWIFT_DIR && sudo tail -f /var/log/$APACHE_NAME/proxy-server"
tail_log s-proxy /var/log/$APACHE_NAME/proxy-server
if [[ ${SWIFT_REPLICAS} == 1 ]]; then
for type in object container account; do
screen_it s-${type} "cd $SWIFT_DIR && sudo tail -f /var/log/$APACHE_NAME/${type}-server-1"
tail_log s-${type} /var/log/$APACHE_NAME/${type}-server-1
done
fi
return 0
@@ -669,10 +681,10 @@ function start_swift {
for type in proxy ${todo}; do
swift-init --run-dir=${SWIFT_DATA_DIR}/run ${type} stop || true
done
screen_it s-proxy "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONF_DIR}/proxy-server.conf -v"
run_process s-proxy "$SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONF_DIR}/proxy-server.conf -v"
if [[ ${SWIFT_REPLICAS} == 1 ]]; then
for type in object container account; do
screen_it s-${type} "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-${type}-server ${SWIFT_CONF_DIR}/${type}-server/1.conf -v"
run_process s-${type} "$SWIFT_DIR/bin/swift-${type}-server ${SWIFT_CONF_DIR}/${type}-server/1.conf -v"
done
fi
}
@@ -689,9 +701,9 @@ function stop_swift {
swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
fi
# Dump all of the servers
# Maintain the iteration as screen_stop() has some desirable side-effects
# Maintain the iteration as stop_process() has some desirable side-effects
for type in proxy object container account; do
screen_stop s-${type}
stop_process s-${type}
done
# Blast out any stragglers
pkill -f swift-
+75 -14
View File
@@ -45,6 +45,8 @@ set +o xtrace
# --------
# Set up default directories
GITDIR["tempest-lib"]=$DEST/tempest-lib
TEMPEST_DIR=$DEST/tempest
TEMPEST_CONFIG_DIR=${TEMPEST_CONFIG_DIR:-$TEMPEST_DIR/etc}
TEMPEST_CONFIG=$TEMPEST_CONFIG_DIR/tempest.conf
@@ -71,7 +73,8 @@ IPV6_ENABLED=$(trueorfalse True $IPV6_ENABLED)
# configure_tempest() - Set config files, create data dirs, etc
function configure_tempest {
setup_develop $TEMPEST_DIR
# install testr since its used to process tempest logs
pip_install `grep -h testrepository $REQUIREMENTS_DIR/global-requirements.txt | cut -d\# -f1`
local image_lines
local images
local num_images
@@ -271,6 +274,9 @@ function configure_tempest {
iniset $TEMPEST_CONFIG identity admin_domain_name $ADMIN_DOMAIN_NAME
iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v2}
# Identity Features
iniset $TEMPEST_CONFIG identity-feature-enabled xml_api True
# Image
# for the gate we want to be able to override this variable so we aren't
# doing an HTTP fetch over the wide internet for this test
@@ -280,6 +286,7 @@ function configure_tempest {
# Compute
iniset $TEMPEST_CONFIG compute allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
iniset $TEMPEST_CONFIG auth tempest_roles "Member"
iniset $TEMPEST_CONFIG compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
iniset $TEMPEST_CONFIG compute network_for_ssh $PRIVATE_NETWORK_NAME
iniset $TEMPEST_CONFIG compute ip_version_for_ssh 4
@@ -297,6 +304,25 @@ function configure_tempest {
iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False}
iniset $TEMPEST_CONFIG compute-feature-enabled change_password False
iniset $TEMPEST_CONFIG compute-feature-enabled block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
iniset $TEMPEST_CONFIG compute-feature-enabled xml_api_v2 ${COMPUTE_XML_API_V2:-True}
DEFAULT_COMPUTE_EXT="NMN, OS-DCF, OS-EXT-AZ, OS-EXT-IMG-SIZE, OS-EXT-IPS, OS-EXT-IPS-MAC, OS-EXT-SRV-ATTR, OS-EXT-STS, OS-EXT-VIF-NET, "
DEFAULT_COMPUTE_EXT+="OS-FLV-DISABLED, OS-FLV-EXT-DATA, OS-SCH-HNT, OS-SRV-USG, os-admin-actions, os-agents, os-aggregates, "
DEFAULT_COMPUTE_EXT+="os-assisted-volume-snapshots, os-attach-interfaces, os-availability-zone, os-baremetal-ext-status, "
DEFAULT_COMPUTE_EXT+="os-baremetal-nodes, os-block-device-mapping-v2-boot, os-cell-capacities, os-cells, os-certificates, os-cloudpipe, "
DEFAULT_COMPUTE_EXT+="os-cloudpipe-update, os-config-drive, os-console-auth-tokens, os-console-output, os-consoles, os-create-server-ext, "
DEFAULT_COMPUTE_EXT+="os-deferred-delete, os-evacuate, os-extended-floating-ips, os-extended-hypervisors, os-extended-quotas, "
DEFAULT_COMPUTE_EXT+="os-extended-services, os-extended-services-delete, os-extended-volumes, os-fixed-ips, os-flavor-access, "
DEFAULT_COMPUTE_EXT+="os-flavor-extra-specs, os-flavor-manage, os-flavor-rxtx, os-flavor-swap, os-floating-ip-dns, os-floating-ip-pools, "
DEFAULT_COMPUTE_EXT+="os-floating-ips, os-floating-ips-bulk, os-fping, os-hide-server-addresses, os-hosts, os-hypervisors, "
DEFAULT_COMPUTE_EXT+="os-instance-actions, os-instance_usage_audit_log, os-keypairs, os-migrations, os-multiple-create, os-networks, "
DEFAULT_COMPUTE_EXT+="os-networks-associate, os-preserve-ephemeral-rebuild, os-quota-class-sets, os-quota-sets, os-rescue, "
DEFAULT_COMPUTE_EXT+="os-security-group-default-rules, os-security-groups, os-server-diagnostics, os-server-external-events, "
DEFAULT_COMPUTE_EXT+="os-server-groups, os-server-password, os-server-start-stop, os-services, os-shelve, os-simple-tenant-usage, "
DEFAULT_COMPUTE_EXT+="os-tenant-networks, os-used-limits, os-used-limits-for-admin, os-user-data, os-user-quotas, os-virtual-interfaces, "
DEFAULT_COMPUTE_EXT+="os-volume-attachment-update, os-volumes"
iniset $TEMPEST_CONFIG compute-feature-enabled api_extensions "${COMPUTE_API_EXTENSIONS:-$DEFAULT_COMPUTE_EXT}"
# Compute admin
iniset $TEMPEST_CONFIG "compute-admin" username $ADMIN_USERNAME
@@ -310,27 +336,35 @@ function configure_tempest {
iniset $TEMPEST_CONFIG network public_router_id "$public_router_id"
iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE"
iniset $TEMPEST_CONFIG network-feature-enabled ipv6 "$IPV6_ENABLED"
iniset $TEMPEST_CONFIG network-feature-enabled xml_api True
# boto
iniset $TEMPEST_CONFIG boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
iniset $TEMPEST_CONFIG boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
iniset $TEMPEST_CONFIG boto s3_materials_path "$BOTO_MATERIALS_PATH"
iniset $TEMPEST_CONFIG boto ari_manifest cirros-0.3.1-x86_64-initrd.manifest.xml
iniset $TEMPEST_CONFIG boto ami_manifest cirros-0.3.1-x86_64-blank.img.manifest.xml
iniset $TEMPEST_CONFIG boto aki_manifest cirros-0.3.1-x86_64-vmlinuz.manifest.xml
iniset $TEMPEST_CONFIG boto instance_type "$boto_instance_type"
iniset $TEMPEST_CONFIG boto http_socket_timeout 30
iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
# boto - disabled
#
# because of compat issues boto in icehouse is not testable
# against tempest. Set FORCE_BOTO=1 in local.conf to enable.
iniset $TEMPEST_CONFIG compute-feature-enabled ec2_api False
if [[ -n "$FORCE_BOTO" ]]; then
iniset $TEMPEST_CONFIG boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
iniset $TEMPEST_CONFIG boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
iniset $TEMPEST_CONFIG boto s3_materials_path "$BOTO_MATERIALS_PATH"
iniset $TEMPEST_CONFIG boto ari_manifest cirros-0.3.1-x86_64-initrd.manifest.xml
iniset $TEMPEST_CONFIG boto ami_manifest cirros-0.3.1-x86_64-blank.img.manifest.xml
iniset $TEMPEST_CONFIG boto aki_manifest cirros-0.3.1-x86_64-vmlinuz.manifest.xml
iniset $TEMPEST_CONFIG boto instance_type "$boto_instance_type"
iniset $TEMPEST_CONFIG boto http_socket_timeout 30
iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
iniset $TEMPEST_CONFIG compute-feature-enabled ec2_api True
fi
# Orchestration Tests
if is_service_enabled heat; then
if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then
iniset $TEMPEST_CONFIG orchestration image_ref $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2")
fi
# build a specialized heat flavor that is likely to be fast
# build a specialized heat flavor
available_flavors=$(nova flavor-list)
if [[ ! ( $available_flavors =~ 'm1.heat' ) ]]; then
nova flavor-create m1.heat 451 1024 0 2
nova flavor-create m1.heat 451 512 0 1
fi
iniset $TEMPEST_CONFIG orchestration instance_type "m1.heat"
iniset $TEMPEST_CONFIG orchestration build_timeout 900
@@ -358,6 +392,16 @@ function configure_tempest {
iniset $TEMPEST_CONFIG volume storage_protocol $TEMPEST_STORAGE_PROTOCOL
fi
DEFAULT_VOLUME_EXT="OS-SCH-HNT, backups, encryption, os-admin-actions, os-availability-zone, "
DEFAULT_VOLUME_EXT+="os-extended-services, os-extended-snapshot-attributes, os-hosts, os-image-create, "
DEFAULT_VOLUME_EXT+="os-quota-class-sets, os-quota-sets, os-services, os-snapshot-actions, "
DEFAULT_VOLUME_EXT+="os-types-extra-specs, os-types-manage, os-used-limits, os-vol-host-attr, "
DEFAULT_VOLUME_EXT+="os-vol-image-meta, os-vol-mig-status-attr, os-vol-tenant-attr, os-volume-actions, "
DEFAULT_VOLUME_EXT+="os-volume-encryption-metadata, os-volume-manage, os-volume-transfer, "
DEFAULT_VOLUME_EXT+="os-volume-unmanage, qos-specs"
iniset $TEMPEST_CONFIG volume-feature-enabled api_extensions "${VOLUME_API_EXTENSIONS:-$DEFAULT_VOLUME_EXT}"
# Dashboard
iniset $TEMPEST_CONFIG dashboard dashboard_url "http://$SERVICE_HOST/"
iniset $TEMPEST_CONFIG dashboard login_url "http://$SERVICE_HOST/auth/login/"
@@ -365,14 +409,22 @@ function configure_tempest {
# cli
iniset $TEMPEST_CONFIG cli cli_dir $NOVA_BIN_DIR
DEFAULT_NET_EXT="agent, allowed-address-pairs, binding, dhcp_agent_scheduler, ext-gw-mode, external-net"
DEFAULT_NET_EXT+=", extra_dhcp_opt, extraroute, fwaas, l3_agent_scheduler, lbaas"
DEFAULT_NET_EXT+=", lbaas_agent_scheduler, metering, multi-provider, provider, quotas"
DEFAULT_NET_EXT+=", router, security-group, service-type, vpnaas"
# Networking
iniset $TEMPEST_CONFIG network-feature-enabled api_extensions "${NETWORK_API_EXTENSIONS:-all}"
iniset $TEMPEST_CONFIG network-feature-enabled api_extensions "${NETWORK_API_EXTENSIONS:-$DEFAULT_NET_EXT}"
# Baremetal
if [ "$VIRT_DRIVER" = "ironic" ] ; then
iniset $TEMPEST_CONFIG baremetal driver_enabled True
fi
DEFAULT_SWIFT_EXT="account_quotas, bulk_delete, bulk_upload, container_quotas, container_sync, crossdomain"
DEFAULT_SWIFT_EXT+=", formpost, keystoneauth, ratelimit, slo, staticweb, tempauth, tempurl"
# Object Storage
iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis "${OBJECT_STORAGE_API_EXTENSIONS:-$DEFAULT_SWIFT_EXT}"
# service_available
for service in ${TEMPEST_SERVICES//,/ }; do
if is_service_enabled $service ; then
@@ -412,9 +464,18 @@ function create_tempest_accounts {
fi
}
# install_tempest_lib() - Collect source, prepare, and install tempest-lib
function install_tempest_lib {
if use_library_from_git "tempest-lib"; then
git_clone_by_name "tempest-lib"
setup_dev_lib "tempest-lib"
fi
}
# install_tempest() - Collect source and prepare
function install_tempest {
git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH
pip_install "tox<1.7"
}
# init_tempest() - Initialize ec2 images
+6 -2
View File
@@ -75,13 +75,17 @@ function install_XXXX {
# start_XXXX() - Start running processes, including screen
function start_XXXX {
# screen_it XXXX "cd $XXXX_DIR && $XXXX_DIR/bin/XXXX-bin"
# The quoted command must be a single command and not include an
# shell metacharacters, redirections or shell builtins.
# run_process XXXX "$XXXX_DIR/bin/XXXX-bin"
:
}
# stop_XXXX() - Stop running processes (non-screen)
function stop_XXXX {
# FIXME(dtroyer): stop only our screen screen window?
# for serv in serv-a serv-b; do
# stop_process $serv
# done
:
}
+2 -1
View File
@@ -320,7 +320,8 @@ function make_root_CA {
#
# Uses global ``SSL_ENABLED_SERVICES``
function is_ssl_enabled_service {
services=$@
local services=$@
local service=""
for service in ${services}; do
[[ ,${SSL_ENABLED_SERVICES}, =~ ,${service}, ]] && return 0
done
+14 -10
View File
@@ -25,8 +25,9 @@ set +o xtrace
NETWORK_GATEWAY=${NETWORK_GATEWAY:-10.0.0.1}
# Set up default configuration
GITDIR["python-troveclient"]=$DEST/python-troveclient
TROVE_DIR=$DEST/trove
TROVECLIENT_DIR=$DEST/python-troveclient
TROVE_CONF_DIR=/etc/trove
TROVE_LOCAL_CONF_DIR=$TROVE_DIR/etc/trove
TROVE_AUTH_CACHE_DIR=${TROVE_AUTH_CACHE_DIR:-/var/cache/trove}
@@ -112,10 +113,6 @@ function cleanup_trove {
rm -fr $TROVE_CONF_DIR/*
}
# configure_troveclient() - Set config files, create data dirs, etc
function configure_troveclient {
setup_develop $TROVECLIENT_DIR
}
# configure_trove() - Set config files, create data dirs, etc
function configure_trove {
@@ -144,6 +141,7 @@ function configure_trove {
rm -f $TROVE_CONF_DIR/trove-taskmanager.conf
rm -f $TROVE_CONF_DIR/trove-conductor.conf
iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $TROVE_CONF_DIR/trove.conf DEFAULT sql_connection `database_connection_url trove`
iniset $TROVE_CONF_DIR/trove.conf DEFAULT add_addresses True
@@ -151,6 +149,7 @@ function configure_trove {
iniset $TROVE_CONF_DIR/trove.conf DEFAULT cinder_url $CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1
iniset $TROVE_CONF_DIR/trove.conf DEFAULT swift_url http://$SERVICE_HOST:8080/v1/AUTH_
iniset $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample DEFAULT rabbit_password $RABBIT_PASSWORD
sed -i "s/localhost/$NETWORK_GATEWAY/g" $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample
@@ -161,6 +160,7 @@ function configure_trove {
if is_service_enabled tr-tmgr; then
TROVE_AUTH_ENDPOINT=$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT//v$IDENTITY_API_VERSION
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT sql_connection `database_connection_url trove`
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT taskmanager_manager trove.taskmanager.manager.Manager
@@ -176,6 +176,7 @@ function configure_trove {
# (Re)create trove conductor conf file if needed
if is_service_enabled tr-cond; then
iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT rabbit_userid $RABBIT_USERID
iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT sql_connection `database_connection_url trove`
iniset $TROVE_CONF_DIR/trove-conductor.conf DEFAULT nova_proxy_admin_user radmin
@@ -189,7 +190,10 @@ function configure_trove {
# install_troveclient() - Collect source and prepare
function install_troveclient {
git_clone $TROVECLIENT_REPO $TROVECLIENT_DIR $TROVECLIENT_BRANCH
if use_library_from_git "python-troveclient"; then
git_clone_by_name "python-troveclient"
setup_dev_lib "python-troveclient"
fi
}
# install_trove() - Collect source and prepare
@@ -208,16 +212,16 @@ function init_trove {
# start_trove() - Start running processes, including screen
function start_trove {
screen_it tr-api "cd $TROVE_DIR; $TROVE_BIN_DIR/trove-api --config-file=$TROVE_CONF_DIR/trove.conf --debug 2>&1"
screen_it tr-tmgr "cd $TROVE_DIR; $TROVE_BIN_DIR/trove-taskmanager --config-file=$TROVE_CONF_DIR/trove-taskmanager.conf --debug 2>&1"
screen_it tr-cond "cd $TROVE_DIR; $TROVE_BIN_DIR/trove-conductor --config-file=$TROVE_CONF_DIR/trove-conductor.conf --debug 2>&1"
run_process tr-api "$TROVE_BIN_DIR/trove-api --config-file=$TROVE_CONF_DIR/trove.conf --debug"
run_process tr-tmgr "$TROVE_BIN_DIR/trove-taskmanager --config-file=$TROVE_CONF_DIR/trove-taskmanager.conf --debug"
run_process tr-cond "$TROVE_BIN_DIR/trove-conductor --config-file=$TROVE_CONF_DIR/trove-conductor.conf --debug"
}
# stop_trove() - Stop running processes
function stop_trove {
# Kill the trove screen windows
for serv in tr-api tr-tmgr tr-cond; do
screen_stop $serv
stop_process $serv
done
}
+9 -38
View File
@@ -18,47 +18,18 @@
PASSES=""
FAILURES=""
# Check the return code and add the test to PASSES or FAILURES as appropriate
# pass_fail <result> <expected> <name>
function pass_fail {
local result=$1
local expected=$2
local test_name=$3
if [[ $result -ne $expected ]]; then
FAILURES="$FAILURES $test_name"
else
PASSES="$PASSES $test_name"
fi
}
if [[ -n $@ ]]; then
FILES=$@
else
LIBS=`find lib -type f | grep -v \.md`
SCRIPTS=`find . -type f -name \*\.sh`
EXTRA="functions functions-common stackrc openrc exerciserc eucarc"
FILES="$SCRIPTS $LIBS $EXTRA"
fi
echo "Running bash8..."
./tools/bash8.py -v $FILES
pass_fail $? 0 bash8
# Test that no one is trying to land crazy refs as branches
echo "Ensuring we don't have crazy refs"
REFS=`grep BRANCH stackrc | grep -v -- '-master'`
rc=$?
pass_fail $rc 1 crazy-refs
if [[ $rc -eq 0 ]]; then
echo "Branch defaults must be master. Found:"
echo $REFS
fi
for testfile in tests/test_*.sh; do
$testfile
if [[ $? -eq 0 ]]; then
PASSES="$PASSES $testfile"
else
FAILURES="$FAILURES $testfile"
fi
done
# Summary display now that all is said and done
echo "====================================================================="
for script in $PASSES; do
echo PASS $script
+37 -39
View File
@@ -211,18 +211,14 @@ sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh
# Additional repos
# ----------------
# For debian/ubuntu make apt attempt to retry network ops on it's own
if is_ubuntu; then
echo 'APT::Acquire::Retries "20";' | sudo tee /etc/apt/apt.conf.d/80retry
fi
# Some distros need to add repos beyond the defaults provided by the vendor
# to pick up required packages.
# The Debian Wheezy official repositories do not contain all required packages,
# add gplhost repository.
if [[ "$os_VENDOR" =~ (Debian) ]]; then
echo 'deb http://archive.gplhost.com/debian grizzly main' | sudo tee /etc/apt/sources.list.d/gplhost_wheezy-backports.list
echo 'deb http://archive.gplhost.com/debian grizzly-backports main' | sudo tee -a /etc/apt/sources.list.d/gplhost_wheezy-backports.list
apt_get update
apt_get install --force-yes gplhost-archive-keyring
fi
if [[ is_fedora && $DISTRO =~ (rhel) ]]; then
# Installing Open vSwitch on RHEL requires enabling the RDO repo.
RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack-icehouse/rdo-release-icehouse.rpm"}
@@ -234,9 +230,9 @@ if [[ is_fedora && $DISTRO =~ (rhel) ]]; then
fi
# RHEL requires EPEL for many Open Stack dependencies
if [[ $DISTRO =~ (rhel7) ]]; then
EPEL_RPM=${RHEL7_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.1.noarch.rpm"}
EPEL_RPM=${RHEL7_EPEL_RPM:-"http://download.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.1.noarch.rpm"}
else
EPEL_RPM=${RHEL6_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"}
EPEL_RPM=${RHEL6_EPEL_RPM:-"http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"}
fi
if ! sudo yum repolist enabled epel | grep -q 'epel'; then
echo "EPEL not detected; installing"
@@ -364,9 +360,6 @@ if [[ -d $TOP_DIR/extras.d ]]; then
done
fi
# Set the destination directories for other OpenStack projects
OPENSTACKCLIENT_DIR=$DEST/python-openstackclient
# Interactive Configuration
# -------------------------
@@ -436,6 +429,7 @@ initialize_database_backends && echo "Using $DATABASE_TYPE database backend" ||
# Rabbit connection info
if is_service_enabled rabbit; then
RABBIT_USERID=${RABBIT_USERID:-stackrabbit}
RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST}
read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT."
fi
@@ -542,26 +536,15 @@ if [[ -n "$LOGFILE" ]]; then
# Copy stdout to fd 3
exec 3>&1
if [[ "$VERBOSE" == "True" ]]; then
# Redirect stdout/stderr to tee to write the log file
exec 1> >( awk -v logfile=${LOGFILE} '
/((set \+o$)|xtrace)/ { next }
{
cmd ="date +\"%Y-%m-%d %H:%M:%S.%3N | \""
cmd | getline now
close("date +\"%Y-%m-%d %H:%M:%S.%3N | \"")
sub(/^/, now)
print > logfile
fflush(logfile)
print
fflush("")
}' ) 2>&1
# Set up a second fd for output
exec 6> >( tee "${SUMFILE}" )
# Set fd 1 and 2 to write the log file
exec 1> >( $TOP_DIR/tools/outfilter.py -v -o "${LOGFILE}" ) 2>&1
# Set fd 6 to summary log file
exec 6> >( $TOP_DIR/tools/outfilter.py -o "${SUMFILE}" )
else
# Set fd 1 and 2 to primary logfile
exec 1> "${LOGFILE}" 2>&1
exec 1> >( $TOP_DIR/tools/outfilter.py -o "${LOGFILE}" ) 2>&1
# Set fd 6 to summary logfile and stdout
exec 6> >( tee "${SUMFILE}" >&3 )
exec 6> >( $TOP_DIR/tools/outfilter.py -v -o "${SUMFILE}" >&3 )
fi
echo_summary "stack.sh log $LOGFILE"
@@ -577,7 +560,7 @@ else
exec 1>/dev/null 2>&1
fi
# Always send summary fd to original stdout
exec 6>&3
exec 6> >( $TOP_DIR/tools/outfilter.py -v >&3 )
fi
# Set up logging of screen windows
@@ -708,9 +691,6 @@ if is_service_enabled heat horizon; then
install_heatclient
fi
git_clone $OPENSTACKCLIENT_REPO $OPENSTACKCLIENT_DIR $OPENSTACKCLIENT_BRANCH
setup_develop $OPENSTACKCLIENT_DIR
if is_service_enabled key; then
install_keystone
configure_keystone
@@ -753,6 +733,8 @@ if is_service_enabled nova; then
fi
if is_service_enabled horizon; then
# django openstack_auth
install_django_openstack_auth
# dashboard
install_horizon
configure_horizon
@@ -763,7 +745,6 @@ if is_service_enabled ceilometer; then
install_ceilometer
echo_summary "Configuring Ceilometer"
configure_ceilometer
configure_ceilometerclient
fi
if is_service_enabled heat; then
@@ -780,7 +761,6 @@ if is_service_enabled tls-proxy; then
# don't be naive and add to existing line!
fi
# Extras Install
# --------------
@@ -791,6 +771,24 @@ if [[ -d $TOP_DIR/extras.d ]]; then
done
fi
# install the OpenStack client, needed for most setup commands
if use_library_from_git "python-openstackclient"; then
git_clone_by_name "python-openstackclient"
setup_dev_lib "python-openstackclient"
else
# FIXME(adam)g: Work around a gate wedge by installing a capped novaclient
# here, so that the following OSC installation does not pull in a newer one
# via its uncapped requirement. This can be removed once OSC ends up in a
# venv.
pip_install "python-novaclient>=2.17.0,<2.21"
# Also install the capped neutronclient as per blocked
# https://review.openstack.org/#/c/157606/
pip_install "python-neutronclient>=2.3.4,<2.3.11"
pip_install "python-openstackclient<=0.4.1"
fi
if [[ $TRACK_DEPENDS = True ]]; then
$DEST/.venv/bin/pip freeze > $DEST/requires-post-pip
if ! diff -Nru $DEST/requires-pre-pip $DEST/requires-post-pip > $DEST/requires.diff; then
@@ -1163,7 +1161,7 @@ fi
if is_service_enabled zeromq; then
echo_summary "Starting zermomq receiver"
screen_it zeromq "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-rpc-zmq-receiver"
run_process zeromq "$OSLO_BIN_DIR/oslo-messaging-zmq-receiver"
fi
# Launch the nova-api and wait for it to answer before continuing
@@ -1266,7 +1264,7 @@ if is_service_enabled nova && is_baremetal; then
fi
# ensure callback daemon is running
sudo pkill nova-baremetal-deploy-helper || true
screen_it baremetal "cd ; nova-baremetal-deploy-helper"
run_process baremetal "nova-baremetal-deploy-helper"
fi
# Save some values we generated for later use
+228 -120
View File
@@ -3,6 +3,9 @@
# Find the other rc files
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
# Source required devstack functions and globals
source $RC_DIR/functions
# Destination path for installation
DEST=/opt/stack
@@ -97,137 +100,257 @@ GIT_TIMEOUT=${GIT_TIMEOUT:-0}
# Another option is http://review.openstack.org/p
GIT_BASE=${GIT_BASE:-git://git.openstack.org}
##############
#
# OpenStack Server Components
#
##############
# metering service
CEILOMETER_REPO=${CEILOMETER_REPO:-${GIT_BASE}/openstack/ceilometer.git}
CEILOMETER_BRANCH=${CEILOMETER_BRANCH:-master}
CEILOMETER_BRANCH=${CEILOMETER_BRANCH:-stable/icehouse}
# ceilometer client library
CEILOMETERCLIENT_REPO=${CEILOMETERCLIENT_REPO:-${GIT_BASE}/openstack/python-ceilometerclient.git}
CEILOMETERCLIENT_BRANCH=${CEILOMETERCLIENT_BRANCH:-master}
# volume service
# block storage service
CINDER_REPO=${CINDER_REPO:-${GIT_BASE}/openstack/cinder.git}
CINDER_BRANCH=${CINDER_BRANCH:-master}
# volume client
CINDERCLIENT_REPO=${CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-cinderclient.git}
CINDERCLIENT_BRANCH=${CINDERCLIENT_BRANCH:-master}
CINDER_BRANCH=${CINDER_BRANCH:-stable/icehouse}
# image catalog service
GLANCE_REPO=${GLANCE_REPO:-${GIT_BASE}/openstack/glance.git}
GLANCE_BRANCH=${GLANCE_BRANCH:-master}
# python glance client library
GLANCECLIENT_REPO=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git}
GLANCECLIENT_BRANCH=${GLANCECLIENT_BRANCH:-master}
GLANCE_BRANCH=${GLANCE_BRANCH:-stable/icehouse}
# heat service
HEAT_REPO=${HEAT_REPO:-${GIT_BASE}/openstack/heat.git}
HEAT_BRANCH=${HEAT_BRANCH:-master}
# python heat client library
HEATCLIENT_REPO=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-heatclient.git}
HEATCLIENT_BRANCH=${HEATCLIENT_BRANCH:-master}
HEAT_BRANCH=${HEAT_BRANCH:-stable/icehouse}
# django powered web control panel for openstack
HORIZON_REPO=${HORIZON_REPO:-${GIT_BASE}/openstack/horizon.git}
HORIZON_BRANCH=${HORIZON_BRANCH:-master}
HORIZON_BRANCH=${HORIZON_BRANCH:-stable/icehouse}
# baremetal provisionint service
IRONIC_REPO=${IRONIC_REPO:-${GIT_BASE}/openstack/ironic.git}
IRONIC_BRANCH=${IRONIC_BRANCH:-master}
# ironic client
IRONICCLIENT_REPO=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}
IRONICCLIENT_BRANCH=${IRONICCLIENT_BRANCH:-master}
IRONIC_BRANCH=${IRONIC_BRANCH:-stable/icehouse}
# unified auth system (manages accounts/tokens)
KEYSTONE_REPO=${KEYSTONE_REPO:-${GIT_BASE}/openstack/keystone.git}
KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-master}
# python keystone client library to nova that horizon uses
KEYSTONECLIENT_REPO=${KEYSTONECLIENT_REPO:-${GIT_BASE}/openstack/python-keystoneclient.git}
KEYSTONECLIENT_BRANCH=${KEYSTONECLIENT_BRANCH:-master}
# compute service
NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
NOVA_BRANCH=${NOVA_BRANCH:-master}
# python client library to nova that horizon (and others) use
NOVACLIENT_REPO=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git}
NOVACLIENT_BRANCH=${NOVACLIENT_BRANCH:-master}
# consolidated openstack python client
OPENSTACKCLIENT_REPO=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
OPENSTACKCLIENT_BRANCH=${OPENSTACKCLIENT_BRANCH:-master}
# cliff command line framework
CLIFF_REPO=${CLIFF_REPO:-${GIT_BASE}/openstack/cliff.git}
CLIFF_BRANCH=${CLIFF_BRANCH:-master}
# oslo.config
OSLOCFG_REPO=${OSLOCFG_REPO:-${GIT_BASE}/openstack/oslo.config.git}
OSLOCFG_BRANCH=${OSLOCFG_BRANCH:-master}
# oslo.messaging
OSLOMSG_REPO=${OSLOMSG_REPO:-${GIT_BASE}/openstack/oslo.messaging.git}
OSLOMSG_BRANCH=${OSLOMSG_BRANCH:-master}
# oslo.rootwrap
OSLORWRAP_REPO=${OSLORWRAP_REPO:-${GIT_BASE}/openstack/oslo.rootwrap.git}
OSLORWRAP_BRANCH=${OSLORWRAP_BRANCH:-master}
# oslo.vmware
OSLOVMWARE_REPO=${OSLOVMWARE_REPO:-${GIT_BASE}/openstack/oslo.vmware.git}
OSLOVMWARE_BRANCH=${OSLOVMWARE_BRANCH:-master}
# pycadf auditing library
PYCADF_REPO=${PYCADF_REPO:-${GIT_BASE}/openstack/pycadf.git}
PYCADF_BRANCH=${PYCADF_BRANCH:-master}
# stevedore plugin manager
STEVEDORE_REPO=${STEVEDORE_REPO:-${GIT_BASE}/openstack/stevedore.git}
STEVEDORE_BRANCH=${STEVEDORE_BRANCH:-master}
# taskflow plugin manager
TASKFLOW_REPO=${TASKFLOW_REPO:-${GIT_BASE}/openstack/taskflow.git}
TASKFLOW_BRANCH=${TASKFLOW_BRANCH:-master}
# pbr drives the setuptools configs
PBR_REPO=${PBR_REPO:-${GIT_BASE}/openstack-dev/pbr.git}
PBR_BRANCH=${PBR_BRANCH:-master}
KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-stable/icehouse}
# neutron service
NEUTRON_REPO=${NEUTRON_REPO:-${GIT_BASE}/openstack/neutron.git}
NEUTRON_BRANCH=${NEUTRON_BRANCH:-master}
NEUTRON_BRANCH=${NEUTRON_BRANCH:-stable/icehouse}
# neutron client
NEUTRONCLIENT_REPO=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git}
NEUTRONCLIENT_BRANCH=${NEUTRONCLIENT_BRANCH:-master}
# compute service
NOVA_REPO=${NOVA_REPO:-${GIT_BASE}/openstack/nova.git}
NOVA_BRANCH=${NOVA_BRANCH:-stable/icehouse}
# data processing service
SAHARA_REPO=${SAHARA_REPO:-${GIT_BASE}/openstack/sahara.git}
SAHARA_BRANCH=${SAHARA_BRANCH:-master}
# object storage service
SWIFT_REPO=${SWIFT_REPO:-${GIT_BASE}/openstack/swift.git}
SWIFT_BRANCH=${SWIFT_BRANCH:-stable/icehouse}
# trove service
TROVE_REPO=${TROVE_REPO:-${GIT_BASE}/openstack/trove.git}
TROVE_BRANCH=${TROVE_BRANCH:-stable/icehouse}
##############
#
# Testing Components
#
##############
# consolidated openstack requirements
REQUIREMENTS_REPO=${REQUIREMENTS_REPO:-${GIT_BASE}/openstack/requirements.git}
REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-master}
# storage service
SWIFT_REPO=${SWIFT_REPO:-${GIT_BASE}/openstack/swift.git}
SWIFT_BRANCH=${SWIFT_BRANCH:-master}
SWIFT3_REPO=${SWIFT3_REPO:-${GIT_BASE}/stackforge/swift3.git}
SWIFT3_BRANCH=${SWIFT3_BRANCH:-master}
# python swift client library
SWIFTCLIENT_REPO=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git}
SWIFTCLIENT_BRANCH=${SWIFTCLIENT_BRANCH:-master}
REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-stable/icehouse}
# Tempest test suite
TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git}
TEMPEST_BRANCH=${TEMPEST_BRANCH:-master}
# TODO(sdague): this should end up as a library component like below
GITREPO["tempest-lib"]=${TEMPEST_LIB_REPO:-${GIT_BASE}/openstack/tempest-lib.git}
GITBRANCH["tempest-lib"]=${TEMPEST_LIB_BRANCH:-master}
##############
#
# OpenStack Client Library Componets
#
##############
# ceilometer client library
GITREPO["python-ceilometerclient"]=${CEILOMETERCLIENT_REPO:-${GIT_BASE}/openstack/python-ceilometerclient.git}
GITBRANCH["python-ceilometerclient"]=${CEILOMETERCLIENT_BRANCH:-master}
# volume client
GITREPO["python-cinderclient"]=${CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-cinderclient.git}
GITBRANCH["python-cinderclient"]=${CINDERCLIENT_BRANCH:-master}
# python glance client library
GITREPO["python-glanceclient"]=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git}
GITBRANCH["python-glanceclient"]=${GLANCECLIENT_BRANCH:-master}
# python heat client library
GITREPO["python-heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-heatclient.git}
GITBRANCH["python-heatclient"]=${HEATCLIENT_BRANCH:-master}
# ironic client
GITREPO["python-ironicclient"]=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}
GITBRANCH["python-ironicclient"]=${IRONICCLIENT_BRANCH:-master}
# python keystone client library to nova that horizon uses
GITREPO["python-keystoneclient"]=${KEYSTONECLIENT_REPO:-${GIT_BASE}/openstack/python-keystoneclient.git}
GITBRANCH["python-keystoneclient"]=${KEYSTONECLIENT_BRANCH:-master}
# neutron client
GITREPO["python-neutronclient"]=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git}
GITBRANCH["python-neutronclient"]=${NEUTRONCLIENT_BRANCH:-master}
# python client library to nova that horizon (and others) use
GITREPO["python-novaclient"]=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git}
GITBRANCH["python-novaclient"]=${NOVACLIENT_BRANCH:-master}
# python saharaclient
GITREPO["python-saharaclient"]=${SAHARACLIENT_REPO:-${GIT_BASE}/openstack/python-saharaclient.git}
GITBRANCH["python-saharaclient"]=${SAHARACLIENT_BRANCH:-master}
# python swift client library
GITREPO["python-swiftclient"]=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git}
GITBRANCH["python-swiftclient"]=${SWIFTCLIENT_BRANCH:-master}
# trove client library test
GITREPO["python-troveclient"]=${TROVECLIENT_REPO:-${GIT_BASE}/openstack/python-troveclient.git}
GITBRANCH["python-troveclient"]=${TROVECLIENT_BRANCH:-master}
# consolidated openstack python client
GITREPO["python-openstackclient"]=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
GITBRANCH["python-openstackclient"]=${OPENSTACKCLIENT_BRANCH:-master}
# this doesn't exist in a lib file, so set it here
GITDIR["python-openstackclient"]=$DEST/python-openstackclient
###################
#
# Oslo Libraries
#
###################
# cliff command line framework
GITREPO["cliff"]=${CLIFF_REPO:-${GIT_BASE}/openstack/cliff.git}
GITBRANCH["cliff"]=${CLIFF_BRANCH:-master}
# oslo.config
GITREPO["oslo.config"]=${OSLOCFG_REPO:-${GIT_BASE}/openstack/oslo.config.git}
GITBRANCH["oslo.config"]=${OSLOCFG_BRANCH:-master}
# oslo.messaging
GITREPO["oslo.messaging"]=${OSLOMSG_REPO:-${GIT_BASE}/openstack/oslo.messaging.git}
GITBRANCH["oslo.messaging"]=${OSLOMSG_BRANCH:-master}
# oslo.rootwrap
GITREPO["oslo.rootwrap"]=${OSLORWRAP_REPO:-${GIT_BASE}/openstack/oslo.rootwrap.git}
GITBRANCH["oslo.rootwrap"]=${OSLORWRAP_BRANCH:-master}
# oslo.vmware
GITREPO["oslo.vmware"]=${OSLOVMWARE_REPO:-${GIT_BASE}/openstack/oslo.vmware.git}
GITBRANCH["oslo.vmware"]=${OSLOVMWARE_BRANCH:-master}
# pycadf auditing library
GITREPO["pycadf"]=${PYCADF_REPO:-${GIT_BASE}/openstack/pycadf.git}
GITBRANCH["pycadf"]=${PYCADF_BRANCH:-master}
# stevedore plugin manager
GITREPO["stevedore"]=${STEVEDORE_REPO:-${GIT_BASE}/openstack/stevedore.git}
GITBRANCH["stevedore"]=${STEVEDORE_BRANCH:-master}
# taskflow plugin manager
GITREPO["taskflow"]=${TASKFLOW_REPO:-${GIT_BASE}/openstack/taskflow.git}
GITBRANCH["taskflow"]=${TASKFLOW_BRANCH:-master}
# pbr drives the setuptools configs
GITREPO["pbr"]=${PBR_REPO:-${GIT_BASE}/openstack-dev/pbr.git}
GITBRANCH["pbr"]=${PBR_BRANCH:-master}
##################
#
# Libraries managed by OpenStack programs (non oslo)
#
##################
# heat-cfntools server agent
HEAT_CFNTOOLS_REPO=${HEAT_CFNTOOLS_REPO:-${GIT_BASE}/openstack/heat-cfntools.git}
HEAT_CFNTOOLS_BRANCH=${HEAT_CFNTOOLS_BRANCH:-master}
# heat example templates and elements
HEAT_TEMPLATES_REPO=${HEAT_TEMPLATES_REPO:-${GIT_BASE}/openstack/heat-templates.git}
HEAT_TEMPLATES_BRANCH=${HEAT_TEMPLATES_BRANCH:-master}
# django openstack_auth library
GITREPO["django_openstack_auth"]=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git}
GITBRANCH["django_openstack_auth"]=${HORIZONAUTH_BRANCH:-master}
# keystone middleware
GITREPO["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_REPO:-${GIT_BASE}/openstack/keystonemiddleware.git}
GITBRANCH["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_BRANCH:-master}
# s3 support for swift
SWIFT3_REPO=${SWIFT3_REPO:-${GIT_BASE}/stackforge/swift3.git}
SWIFT3_BRANCH=${SWIFT3_BRANCH:-master}
##################
#
# TripleO Components
#
##################
# diskimage-builder
DIB_REPO=${DIB_REPO:-${GIT_BASE}/openstack/diskimage-builder.git}
DIB_BRANCH=${DIB_BRANCH:-master}
# os-apply-config configuration template tool
OAC_REPO=${OAC_REPO:-${GIT_BASE}/openstack/os-apply-config.git}
OAC_BRANCH=${OAC_BRANCH:-master}
# os-collect-config configuration agent
OCC_REPO=${OCC_REPO:-${GIT_BASE}/openstack/os-collect-config.git}
OCC_BRANCH=${OCC_BRANCH:-master}
# os-refresh-config configuration run-parts tool
ORC_REPO=${ORC_REPO:-${GIT_BASE}/openstack/os-refresh-config.git}
ORC_BRANCH=${ORC_BRANCH:-master}
# Tripleo elements for diskimage-builder images
TIE_REPO=${TIE_REPO:-${GIT_BASE}/openstack/tripleo-image-elements.git}
TIE_BRANCH=${TIE_BRANCH:-master}
#################
#
# Additional Libraries
#
#################
# stackforge libraries that are used by OpenStack core services
# wsme
WSME_REPO=${WSME_REPO:-${GIT_BASE}/stackforge/wsme.git}
WSME_BRANCH=${WSME_BRANCH:-master}
# pecan
PECAN_REPO=${PECAN_REPO:-${GIT_BASE}/stackforge/pecan.git}
PECAN_BRANCH=${PECAN_BRANCH:-master}
#################
#
# 3rd Party Components (non pip installable)
#
# NOTE(sdague): these should be converted to release version installs or removed
#
#################
# ironic python agent
IRONIC_PYTHON_AGENT_REPO=${IRONIC_PYTHON_AGENT_REPO:-${GIT_BASE}/openstack/ironic-python-agent.git}
IRONIC_PYTHON_AGENT_BRANCH=${IRONIC_PYTHON_AGENT_BRANCH:-master}
# a websockets/html5 or flash powered VNC console for vm instances
NOVNC_REPO=${NOVNC_REPO:-https://github.com/kanaka/noVNC.git}
NOVNC_BRANCH=${NOVNC_BRANCH:-master}
@@ -240,22 +363,6 @@ RYU_BRANCH=${RYU_BRANCH:-master}
SPICE_REPO=${SPICE_REPO:-http://anongit.freedesktop.org/git/spice/spice-html5.git}
SPICE_BRANCH=${SPICE_BRANCH:-master}
# trove service
TROVE_REPO=${TROVE_REPO:-${GIT_BASE}/openstack/trove.git}
TROVE_BRANCH=${TROVE_BRANCH:-master}
# trove client library test
TROVECLIENT_REPO=${TROVECLIENT_REPO:-${GIT_BASE}/openstack/python-troveclient.git}
TROVECLIENT_BRANCH=${TROVECLIENT_BRANCH:-master}
# stackforge libraries that are used by OpenStack core services
# wsme
WSME_REPO=${WSME_REPO:-${GIT_BASE}/stackforge/wsme.git}
WSME_BRANCH=${WSME_BRANCH:-master}
# pecan
PECAN_REPO=${PECAN_REPO:-${GIT_BASE}/stackforge/pecan.git}
PECAN_BRANCH=${PECAN_BRANCH:-master}
# Nova hypervisor configuration. We default to libvirt with **kvm** but will
@@ -322,11 +429,11 @@ case "$VIRT_DRIVER" in
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-0.3.1-x86_64-rootfs}
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-rootfs.img.gz"};;
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-x86_64-rootfs}
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-rootfs.img.gz"};;
*) # otherwise, use the uec style image (with kernel, ramdisk, disk)
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-uec}
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-x86_64-uec}
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz,http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz"};;
esac
;;
vsphere)
@@ -334,18 +441,19 @@ case "$VIRT_DRIVER" in
IMAGE_URLS=${IMAGE_URLS:-"http://partnerweb.vmware.com/programs/vmdkimage/cirros-0.3.0-i386-disk.vmdk"};;
xenserver)
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.0-x86_64-disk}
IMAGE_URLS=${IMAGE_URLS:-"https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz"};;
IMAGE_URLS=${IMAGE_URLS:-"https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz"}
IMAGE_URLS+=",http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz,http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz";;
*) # Default to Cirros with kernel, ramdisk and disk image
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-uec}
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.2-x86_64-uec}
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz,http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz"};;
esac
# if heat is enabled, bring in a linux image with cfn enabled
# TODO(sdague) this next block can be removed after nodepool has the 64bit image in it's cache
HEAT_FETCHED_TEST_IMAGE=${HEAT_FETCHED_TEST_IMAGE:-""}
if [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-i386-20-20131211.1-sda" ]]; then
HEAT_CFN_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
IMAGE_URLS+=",https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
HEAT_CFN_IMAGE_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
IMAGE_URLS+=",https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2"
elif [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-x86_64-20-20131211.1-sda" ]]; then
HEAT_CFN_IMAGE_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"
IMAGE_URLS+=",https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# fake-service.sh - a fake service for start/stop testing
# $1 - sleep time
SLEEP_TIME=${1:-3}
LOG=/tmp/fake-service.log
TIMESTAMP_FORMAT=${TIMESTAMP_FORMAT:-"%F-%H%M%S"}
# duplicate output
exec 1> >(tee -a ${LOG})
echo ""
echo "Starting fake-service for ${SLEEP_TIME}"
while true; do
echo "$(date +${TIMESTAMP_FORMAT}) [$$]"
sleep ${SLEEP_TIME}
done
+109
View File
@@ -0,0 +1,109 @@
#!/bin/bash
# tests/exec.sh - Test DevStack run_process() and stop_process()
#
# exec.sh start|stop|status
#
# Set USE_SCREEN True|False to change use of screen.
#
# This script emulates the basic exec envirnment in ``stack.sh`` to test
# the process spawn and kill operations.
if [[ -z $1 ]]; then
echo "$0 start|stop"
exit 1
fi
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
source $TOP_DIR/functions
USE_SCREEN=${USE_SCREEN:-False}
ENABLED_SERVICES=fake-service
SERVICE_DIR=/tmp
SCREEN_NAME=test
SCREEN_LOGDIR=${SERVICE_DIR}/${SCREEN_NAME}
# Kill background processes on exit
trap clean EXIT
clean() {
local r=$?
jobs -p
kill >/dev/null 2>&1 $(jobs -p)
exit $r
}
# Exit on any errors so that errors don't compound
trap failed ERR
failed() {
local r=$?
jobs -p
kill >/dev/null 2>&1 $(jobs -p)
set +o xtrace
[ -n "$LOGFILE" ] && echo "${0##*/} failed: full log in $LOGFILE"
exit $r
}
function status {
if [[ -r $SERVICE_DIR/$SCREEN_NAME/fake-service.pid ]]; then
pstree -pg $(cat $SERVICE_DIR/$SCREEN_NAME/fake-service.pid)
fi
ps -ef | grep fake
}
function setup_screen {
if [[ ! -d $SERVICE_DIR/$SCREEN_NAME ]]; then
rm -rf $SERVICE_DIR/$SCREEN_NAME
mkdir -p $SERVICE_DIR/$SCREEN_NAME
fi
if [[ "$USE_SCREEN" == "True" ]]; then
# Create a new named screen to run processes in
screen -d -m -S $SCREEN_NAME -t shell -s /bin/bash
sleep 1
# Set a reasonable status bar
if [ -z "$SCREEN_HARDSTATUS" ]; then
SCREEN_HARDSTATUS='%{= .} %-Lw%{= .}%> %n%f %t*%{= .}%+Lw%< %-=%{g}(%{d}%H/%l%{g})'
fi
screen -r $SCREEN_NAME -X hardstatus alwayslastline "$SCREEN_HARDSTATUS"
fi
# Clear screen rc file
SCREENRC=$TOP_DIR/tests/$SCREEN_NAME-screenrc
if [[ -e $SCREENRC ]]; then
echo -n > $SCREENRC
fi
}
# Mimic logging
# Set up output redirection without log files
# Copy stdout to fd 3
exec 3>&1
if [[ "$VERBOSE" != "True" ]]; then
# Throw away stdout and stderr
#exec 1>/dev/null 2>&1
:
fi
# Always send summary fd to original stdout
exec 6>&3
if [[ "$1" == "start" ]]; then
echo "Start service"
setup_screen
run_process fake-service "$TOP_DIR/tests/fake-service.sh"
sleep 1
status
elif [[ "$1" == "stop" ]]; then
echo "Stop service"
stop_process fake-service
status
elif [[ "$1" == "status" ]]; then
status
else
echo "Unknown command"
exit 1
fi
+35 -1
View File
@@ -42,6 +42,17 @@ type=original
EOF
}
function setup_test4 {
mkdir -p test-etc
cat >test-etc/test4.conf <<EOF
[fff]
# original comment
type=original
EOF
TEST4_DIR="test-etc"
TEST4_FILE="test4.conf"
}
cat >test.conf <<EOF
[[test1|test1a.conf]]
[default]
@@ -76,8 +87,11 @@ $TEST_1C_ADD
attribute=value
# the above line has a single space
EOF
[[test4|\$TEST4_DIR/\$TEST4_FILE]]
[fff]
type=new
EOF
echo -n "get_meta_section_files: test0 doesn't exist: "
VAL=$(get_meta_section_files test.conf test0)
@@ -192,4 +206,24 @@ EXPECT_VAL="
attribute = value"
check_result "$VAL" "$EXPECT_VAL"
echo -n "merge_config_group test4 variable filename: "
setup_test4
merge_config_group test.conf test4
VAL=$(cat test-etc/test4.conf)
EXPECT_VAL="[fff]
# original comment
type=new"
check_result "$VAL" "$EXPECT_VAL"
echo -n "merge_config_group test4 variable filename (not exist): "
setup_test4
rm test-etc/test4.conf
merge_config_group test.conf test4
VAL=$(cat test-etc/test4.conf)
EXPECT_VAL="
[fff]
type = new"
check_result "$VAL" "$EXPECT_VAL"
rm -f test.conf test1c.conf test2a.conf test-space.conf
rm -rf test-etc
+97
View File
@@ -0,0 +1,97 @@
#!/usr/bin/env bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
TOP=$(cd $(dirname "$0")/.. && pwd)
export TOP_DIR=$TOP
# Import common functions
source $TOP/functions
source $TOP/stackrc
source $TOP/lib/tls
for i in $TOP/lib/*; do
if [[ -f $i ]]; then
source $i
fi
done
ALL_LIBS="python-novaclient oslo.config pbr python-troveclient python-keystoneclient taskflow pycadf python-glanceclient python-ironicclient tempest-lib oslo.messaging cliff python-heatclient stevedore python-cinderclient oslo.vmware keystonemiddleware python-saharaclient django_openstack_auth python-openstackclient oslo.rootwrap python-ceilometerclient python-swiftclient python-neutronclient"
# Generate the above list with
# echo ${!GITREPO[@]}
# exit 1
function check_exists {
local thing=$1
local hash=$2
local key=$3
if [[ ! -z "$VERBOSE" ]]; then
echo "Checking for $hash[$key]"
fi
if [[ -z $thing ]]; then
echo "$hash[$key] does not exit!"
exit 1
else
if [[ ! -z "$VERBOSE" ]]; then
echo "$hash[$key] => $thing"
fi
fi
}
function test_all_libs_upto_date {
# this is all the magics
local found_libs=${!GITREPO[@]}
declare -A all_libs
for lib in $ALL_LIBS; do
all_libs[$lib]=1
done
for lib in $found_libs; do
if [[ -z ${all_libs[$lib]} ]]; then
echo "Library '$lib' not listed in unit tests, please add to ALL_LIBS"
exit 1
fi
done
echo "test_all_libs_upto_date PASSED"
}
function test_libs_exist {
local lib=""
for lib in $ALL_LIBS; do
check_exists "${GITREPO[$lib]}" "GITREPO" "$lib"
check_exists "${GITBRANCH[$lib]}" "GITBRANCH" "$lib"
check_exists "${GITDIR[$lib]}" "GITDIR" "$lib"
done
echo "test_libs_exist PASSED"
}
function test_branch_master {
for lib in $ALL_LIBS; do
if [[ ${GITBRANCH[$lib]} != "master" ]]; then
echo "GITBRANCH for $lib not master (${GITBRANCH[$lib]})"
exit 1
fi
done
echo "test_branch_master PASSED"
}
set -o errexit
test_libs_exist
test_branch_master
test_all_libs_upto_date
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
echo "Ensuring we don't have crazy refs"
REFS=`grep BRANCH stackrc | grep -v -- '-master' | grep -v -- '-stable/'`
rc=$?
if [[ $rc -eq 0 ]]; then
echo "Branch defaults must be master. Found:"
echo $REFS
exit 1
fi
+25 -10
View File
@@ -18,7 +18,6 @@
# - (re)start messagebus daemon
# - remove distro packages python-crypto and python-lxml
# - pre-install hgtools to work around a bug in RHEL6 distribute
# - install nose 1.1 from EPEL
set -o errexit
set -o xtrace
@@ -35,6 +34,30 @@ source $TOP_DIR/functions
FILES=$TOP_DIR/files
# Keystone Port Reservation
# -------------------------
# Reserve and prevent $KEYSTONE_AUTH_PORT and $KEYSTONE_AUTH_PORT_INT from
# being used as ephemeral ports by the system. The default(s) are 35357 and
# 35358 which are in the Linux defined ephemeral port range (in disagreement
# with the IANA ephemeral port range). This is a workaround for bug #1253482
# where Keystone will try and bind to the port and the port will already be
# in use as an ephemeral port by another process. This places an explicit
# exception into the Kernel for the Keystone AUTH ports.
keystone_ports=${KEYSTONE_AUTH_PORT:-35357},${KEYSTONE_AUTH_PORT_INT:-35358}
# Get any currently reserved ports, strip off leading whitespace
reserved_ports=$(sysctl net.ipv4.ip_local_reserved_ports | awk -F'=' '{print $2;}' | sed 's/^ //')
if [[ -z "${reserved_ports}" ]]; then
# If there are no currently reserved ports, reserve the keystone ports
sudo sysctl -w net.ipv4.ip_local_reserved_ports=${keystone_ports}
else
# If there are currently reserved ports, keep those and also reserve the
# keystone specific ports. Duplicate reservations are merged into a single
# reservation (or range) automatically by the kernel.
sudo sysctl -w net.ipv4.ip_local_reserved_ports=${keystone_ports},${reserved_ports}
fi
# Python Packages
# ---------------
@@ -51,7 +74,7 @@ function get_package_path {
# Fix prettytable 0.7.2 permissions
# Don't specify --upgrade so we use the existing package if present
pip_install 'prettytable>0.7'
pip_install 'prettytable>=0.7'
PACKAGE_DIR=$(get_package_path prettytable)
# Only fix version 0.7.2
dir=$(echo $PACKAGE_DIR/prettytable-0.7.2*)
@@ -137,12 +160,4 @@ if [[ $DISTRO =~ (rhel6) ]]; then
# Note we do this before the track-depends in ``stack.sh``.
pip_install hgtools
# RHEL6's version of ``python-nose`` is incompatible with Tempest.
# Install nose 1.1 (Tempest-compatible) from EPEL
install_package python-nose1.1
# Add a symlink for the new nosetests to allow tox for Tempest to
# work unmolested.
sudo ln -sf /usr/bin/nosetests1.1 /usr/local/bin/nosetests
fi
+36 -38
View File
@@ -24,28 +24,8 @@ source $TOP_DIR/functions
FILES=$TOP_DIR/files
# Handle arguments
USE_GET_PIP=${USE_GET_PIP:-0}
INSTALL_PIP_VERSION=${INSTALL_PIP_VERSION:-"1.4.1"}
while [[ -n "$1" ]]; do
case $1 in
--force)
FORCE=1
;;
--pip-version)
INSTALL_PIP_VERSION="$2"
shift
;;
--use-get-pip)
USE_GET_PIP=1;
;;
esac
shift
done
PIP_GET_PIP_URL=https://raw.github.com/pypa/pip/master/contrib/get-pip.py
PIP_TAR_URL=https://pypi.python.org/packages/source/p/pip/pip-$INSTALL_PIP_VERSION.tar.gz
PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
LOCAL_PIP="$FILES/$(basename $PIP_GET_PIP_URL)"
GetDistro
echo "Distro: $DISTRO"
@@ -62,24 +42,40 @@ function get_versions {
function install_get_pip {
if [[ ! -r $FILES/get-pip.py ]]; then
(cd $FILES; \
curl -O $PIP_GET_PIP_URL; \
)
if [[ ! -r $LOCAL_PIP ]]; then
curl -o $LOCAL_PIP $PIP_GET_PIP_URL || \
die $LINENO "Download of get-pip.py failed"
fi
sudo -E python $FILES/get-pip.py
sudo -H -E python $LOCAL_PIP
}
function install_pip_tarball {
if [[ ! -r $FILES/pip-$INSTALL_PIP_VERSION.tar.gz ]]; then
(cd $FILES; \
curl -O $PIP_TAR_URL; \
tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz 1>/dev/null)
function configure_pypi_alternative_url {
PIP_ROOT_FOLDER="$HOME/.pip"
PIP_CONFIG_FILE="$PIP_ROOT_FOLDER/pip.conf"
if [[ ! -d $PIP_ROOT_FOLDER ]]; then
echo "Creating $PIP_ROOT_FOLDER"
mkdir $PIP_ROOT_FOLDER
fi
(cd $FILES/pip-$INSTALL_PIP_VERSION; \
sudo -E python setup.py install 1>/dev/null)
if [[ ! -f $PIP_CONFIG_FILE ]]; then
echo "Creating $PIP_CONFIG_FILE"
touch $PIP_CONFIG_FILE
fi
if ! ini_has_option "$PIP_CONFIG_FILE" "global" "index-url"; then
#it means that the index-url does not exist
iniset "$PIP_CONFIG_FILE" "global" "index-url" "$PYPI_OVERRIDE"
fi
}
# Setuptools 8 implements PEP 440, and 8.0.4 adds a warning triggered any time
# pkg_resources inspects the list of installed Python packages if there are
# non-compliant version numbers in the egg-info (for example, from distro
# system packaged Python libraries). This is off by default after 8.2 but can
# be enabled by uncommenting the lines below.
#PYTHONWARNINGS=$PYTHONWARNINGS,always::RuntimeWarning:pkg_resources
#export PYTHONWARNINGS
# Show starting versions
get_versions
@@ -88,10 +84,12 @@ get_versions
# Eradicate any and all system packages
uninstall_package python-pip
if [[ "$USE_GET_PIP" == "1" ]]; then
install_get_pip
else
install_pip_tarball
install_get_pip
if [[ -n $PYPI_ALTERNATIVE_URL ]]; then
configure_pypi_alternative_url
fi
pip_install -U setuptools
get_versions
+87
View File
@@ -0,0 +1,87 @@
#!/usr/bin/env python
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# This is an output filter to filter and timestamp the logs from grenade and
# devstack. Largely our awk filters got beyond the complexity level which were
# sustainable, so this provides us much more control in a single place.
#
# The overhead of running python should be less than execing `date` a million
# times during a run.
import argparse
import datetime
import re
import sys
IGNORE_LINES = re.compile('(set \+o|xtrace)')
HAS_DATE = re.compile('^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \|')
def get_options():
parser = argparse.ArgumentParser(
description='Filter output by devstack and friends')
parser.add_argument('-o', '--outfile',
help='Output file for content',
default=None)
parser.add_argument('-v', '--verbose', action='store_true',
default=False)
return parser.parse_args()
def skip_line(line):
"""Should we skip this line."""
return IGNORE_LINES.search(line) is not None
def main():
opts = get_options()
outfile = None
if opts.outfile:
outfile = open(opts.outfile, 'a', 0)
# otherwise fileinput reprocess args as files
sys.argv = []
while True:
line = sys.stdin.readline()
if not line:
return 0
# put skip lines here
if skip_line(line):
continue
# this prevents us from nesting date lines, because
# we'd like to pull this in directly in grenade and not double
# up on devstack lines
if HAS_DATE.search(line) is None:
now = datetime.datetime.utcnow()
line = ("%s | %s" % (
now.strftime("%Y-%m-%d %H:%M:%S.%f")[:-3],
line))
if opts.verbose:
sys.stdout.write(line)
sys.stdout.flush()
if outfile:
outfile.write(line)
outfile.flush()
if __name__ == '__main__':
try:
sys.exit(main())
except KeyboardInterrupt:
sys.exit(1)
-7
View File
@@ -21,19 +21,12 @@ set -o xtrace
# This directory
TOP_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
. $TOP_DIR/../../functions
# Include onexit commands
. $TOP_DIR/scripts/on_exit.sh
# xapi functions
. $TOP_DIR/functions
# Determine what system we are running on.
# Might not be XenServer if we're using xenserver-core
GetDistro
# Source params - override xenrc params in your localrc to suite your taste
source xenrc
+20 -22
View File
@@ -93,7 +93,7 @@ function get_local_sr_path {
echo $pbd_path
}
function find_ip_by_name() {
function find_ip_by_name {
local guest_name="$1"
local interface="$2"
@@ -121,7 +121,7 @@ function find_ip_by_name() {
done
}
function _vm_uuid() {
function _vm_uuid {
local vm_name_label
vm_name_label="$1"
@@ -129,14 +129,14 @@ function _vm_uuid() {
xe vm-list name-label="$vm_name_label" --minimal
}
function _create_new_network() {
function _create_new_network {
local name_label
name_label=$1
xe network-create name-label="$name_label"
}
function _multiple_networks_with_name() {
function _multiple_networks_with_name {
local name_label
name_label=$1
@@ -144,21 +144,21 @@ function _multiple_networks_with_name() {
xe network-list name-label="$name_label" --minimal | grep -q ","
}
function _network_exists() {
function _network_exists {
local name_label
name_label=$1
! [ -z "$(xe network-list name-label="$name_label" --minimal)" ]
}
function _bridge_exists() {
function _bridge_exists {
local bridge
bridge=$1
! [ -z "$(xe network-list bridge="$bridge" --minimal)" ]
}
function _network_uuid() {
function _network_uuid {
local bridge_or_net_name
bridge_or_net_name=$1
@@ -169,7 +169,7 @@ function _network_uuid() {
fi
}
function add_interface() {
function add_interface {
local vm_name_label
local bridge_or_network_name
@@ -185,7 +185,7 @@ function add_interface() {
xe vif-create network-uuid=$net vm-uuid=$vm device=$device_number
}
function setup_network() {
function setup_network {
local bridge_or_net_name
bridge_or_net_name=$1
@@ -204,7 +204,7 @@ EOF
fi
}
function bridge_for() {
function bridge_for {
local bridge_or_net_name
bridge_or_net_name=$1
@@ -215,29 +215,28 @@ function bridge_for() {
fi
}
function xenapi_ip_on() {
function xenapi_ip_on {
local bridge_or_net_name
bridge_or_net_name=$1
ifconfig $(bridge_for "$bridge_or_net_name") | grep "inet addr" | cut -d ":" -f2 | sed "s/ .*//"
}
function xenapi_is_listening_on() {
function xenapi_is_listening_on {
local bridge_or_net_name
bridge_or_net_name=$1
! [ -z $(xenapi_ip_on "$bridge_or_net_name") ]
}
function parameter_is_specified() {
function parameter_is_specified {
local parameter_name
parameter_name=$1
compgen -v | grep "$parameter_name"
}
function append_kernel_cmdline()
{
function append_kernel_cmdline {
local vm_name_label
local kernel_args
@@ -252,8 +251,7 @@ function append_kernel_cmdline()
xe vm-param-set PV-args="$pv_args $kernel_args" uuid=$vm
}
function destroy_all_vifs_of()
{
function destroy_all_vifs_of {
local vm_name_label
vm_name_label="$1"
@@ -268,11 +266,11 @@ function destroy_all_vifs_of()
unset IFS
}
function have_multiple_hosts() {
function have_multiple_hosts {
xe host-list --minimal | grep -q ","
}
function attach_network() {
function attach_network {
local bridge_or_net_name
bridge_or_net_name="$1"
@@ -286,7 +284,7 @@ function attach_network() {
xe network-attach uuid=$net host-uuid=$host
}
function set_vm_memory() {
function set_vm_memory {
local vm_name_label
local memory
@@ -305,7 +303,7 @@ function set_vm_memory() {
uuid=$vm
}
function max_vcpus() {
function max_vcpus {
local vm_name_label
vm_name_label="$1"
@@ -337,7 +335,7 @@ function max_vcpus() {
xe vm-param-set uuid=$vm VCPUs-at-startup=$cpu_count
}
function get_domid() {
function get_domid {
local vm_name_label
vm_name_label="$1"
-7
View File
@@ -22,19 +22,12 @@ fi
# This directory
THIS_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
. $THIS_DIR/../../functions
# Include onexit commands
. $THIS_DIR/scripts/on_exit.sh
# xapi functions
. $THIS_DIR/functions
# Determine what system we are running on.
# Might not be XenServer if we're using xenserver-core
GetDistro
#
# Get Settings
#
-7
View File
@@ -22,19 +22,12 @@ set -o xtrace
# This directory
TOP_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
. $TOP_DIR/../../functions
# Include onexit commands
. $TOP_DIR/scripts/on_exit.sh
# xapi functions
. $TOP_DIR/functions
# Determine what system we are running on.
# Might not be XenServer if we're using xenserver-core
GetDistro
# Source params - override xenrc params in your localrc to suite your taste
source xenrc
+19 -2
View File
@@ -91,7 +91,24 @@ UBUNTU_INST_GATEWAY=""
# Set the size to 0 to avoid creation of additional disk.
XEN_XVDB_SIZE_GB=0
restore_nounset=`set +o | grep nounset`
STACK_USER=stack
DOMZERO_USER=domzero
RC_DIR="../.."
restore_nounset=$(set +o | grep nounset)
set +u
source ../../stackrc
## Note that the lines below are coming from stackrc to support
## new-style config files
# allow local overrides of env variables, including repo config
if [[ -f $RC_DIR/localrc ]]; then
# Old-style user-supplied config
source $RC_DIR/localrc
elif [[ -f $RC_DIR/.localrc.auto ]]; then
# New-style user-supplied config extracted from local.conf
source $RC_DIR/.localrc.auto
fi
$restore_nounset
+16
View File
@@ -0,0 +1,16 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = bashate
[testenv]
usedevelop = False
install_command = pip install {opts} {packages}
[testenv:bashate]
deps = bashate
whitelist_externals = bash
commands = bash -c "find {toxinidir} -not -wholename \*.tox/\* -and \( -name \*.sh -or -name \*rc -or -name functions\* -or \( -wholename lib/\* -and -not -name \*.md \) \) -print0 | xargs -0 bashate -v"
[testenv:docs]
commands = python setup.py build_sphinx