148 Commits

Author SHA1 Message Date
Sean Dague
442e4e9625 make test_with_retry a function
We have this pattern of timeout with while tests for a non infinite
while loop condition. It's enough of a pattern that we should probably
extract it into a function to make it more widely used.

Change-Id: I11afcda9fac9709acf2f52d256d6e97644d4727c
2015-06-24 13:24:02 -04:00
Jenkins
ee12f5f886 Merge "Save stackenv values more often" 2015-06-19 05:29:39 +00:00
Thomas Bechtold
a858085afb Simplify add_user_to_group function
Current SLE12 and openSUSE13.X versions can handle usermod's '-a' and '-G'
switches so remove the special case.

Change-Id: If0f1390a0eb8f41ffffca74525a4648cfe8ea61d
2015-05-31 00:04:33 +02:00
fumihiko kakuma
8606c98c53 Fix remove_disabled_extensions to remove an extension at the last position
remove_disabled_extensions do matching by '$ext_to_remove","'. So it doesn't
match an extension at the last position in extensions_list.
This patch fixes that.

Closes-Bug: #1443254
Change-Id: I194b483de797697ba06b320cf33f1bac67fc0cc7
2015-05-26 12:38:35 +09:00
Dean Troyer
6816234dc8 Save stackenv values more often
Having these for debugging can be handy

Change-Id: I18c2658eec83a0f20f697a3c4c36aa1cf46b7a92
2015-05-13 15:54:10 -05:00
Jenkins
92619ddb61 Merge "Add python_version function to functions-common" 2015-05-13 11:41:06 +00:00
Chris Dent
3a2c86aabf Add python_version function to functions-common
This makes it possible to list virtual site-package directories
without statically stating the python version, which is a bit ugly.

Change-Id: I3e7ac39eb43cdc4f656e0c90f3bfb23545722aef
2015-05-12 18:30:31 +00:00
Mahito OGURA
98f59aafaf Fix function and test for 'trueorfalse'.
The function's comment is written as follow, however the function accepts
other values (ex. "e", "t", "T", "f", "F", etc...).

---
Accepts as False: 0 no No NO false False FALSE
Accepts as True: 1 yes Yes YES true True TRUE
---

Moreover if testval mach True or False, the function exits without resetting
xtrace.

This patch fixes the issue and add test patterns.

Change-Id: Ie48a859476faff22a4dfef466516e2d7d62ef0c0
Closes-bug: #1453687
2015-05-11 18:23:07 +09:00
Jenkins
641dd9ff23 Merge "Fix negated services with common prefix" 2015-05-07 02:48:20 +00:00
Sean Dague
6e137abbfe clean up logging around run_process
We do a bunch of exec magic unwind in run_process that leads to a lot
of confusing lines in the logs under xtrace. Instead, disable xtrace
through these parts to ensure that the flow at the end of the day
makes more sense.

Change-Id: I91e02465240e704a1a0c0036f5073c0295be018e
2015-05-04 12:15:14 +10:00
Sean Dague
e4af92987a fix warn function
The warn function was putting content into a side log file which made
it kind of hard to keep an eye on when warnings were actually being
issued. Let's just get this into the main output stream.

The calling of the warn function in git_timed was also incorrect, so
the output would not have been what we expected. This solves that as
well.

This will hopefully give us trackable data about how often we need to
recover from git clone errors.

Change-Id: Iee0d2df7fb788a4d34044d29ab10afdcafb9bb5a
2015-04-28 08:57:57 -04:00
Ian Wienand
2796a82ab4 Fix negated services with common prefix
The current sed matching mixes up common-prefix matching;
e.g. "-q-lbaas,q-lbaasv2" is changed into just "v2"

This is more verbose, but I think more reliable.  See also
Ib50f782824f89ae4eb9787f11d42416704babd90.

Change-Id: I3faad0841834e24acc811c05015625cf7f848b19
2015-04-23 15:10:25 +10:00
Ian Wienand
b28b27082c Append command to screenrc after we update it
If a group is specified we modify the command to run under "sg".  This
currently isn't reflected in screenrc so rejoining fails

Change-Id: I5c18ba664a6ae9ba9aaa4439a9086bc85085cd75
Closes-Bug: #1444267
2015-04-16 08:43:43 +10:00
Sean Dague
4d7ee095a1 Make screen sleep time configurable
the sleep 3 in screen_it was added to make devstack pass in the gate
with exceptionally slow test cloud nodes. In the gate we now bypass
the screen path entirely. However the sleep 3 remains and can add a
couple minutes delay into local development runs.

We're not sure yet how low this can safely be tuned, so step 1 is to
make it configurable, then get devstack team members to try various
options to see what works.

Change-Id: I0e6476176fc8589efc4e40e78c2231f704d14e45
2015-04-09 07:21:27 -04:00
Jenkins
9942db6d87 Merge "Add roles when we create groups" 2015-04-03 16:18:30 +00:00
Jenkins
d7c874bca6 Merge "Move back isset to the functions-common" 2015-03-30 15:05:59 +00:00
Dean Troyer
dc97cb71e8 Mostly docs cleanups
Fix documentation build errors and RST formatting

Change-Id: Id93153400c5b069dd9d772381558c7085f64c207
2015-03-28 14:35:12 -05:00
Dean Troyer
41d6f858be Clean up additional INSTALL_TESTONLY_PACKAGES bits
The original removal is in https://review.openstack.org/#/c/167669/

Change-Id: I3c59f040523d2cd1453465e80280955218880634
2015-03-26 15:36:23 -05:00
Sean Dague
6e275e170c provide an override-defaults phase
during the glusterfs integration it was seen that plugins might need
to set new defaults on projects before the project files load. Create
a new override-defaults phase for that.

Intentionally not adding to the documentation yet until we're sure
this works right in the glusterfs case.

Reported-By: Deepak C Shetty <deepakcs@redhat.com>
Change-Id: I13c961b19bdcc1a99e9a7068fe91bbaac787e948
2015-03-26 20:50:11 +05:30
Attila Fazekas
1bd79596c3 Move back isset to the functions-common
isset function was moved to config file related functions by accident,
this change also simplfies the isset in a bash >=4.2 way.

All supported distro has at least bash 4.2. (RHEL6 used 4.1)

Change-Id: Id644b46ff9cdbe18cde46e96aa72764e1c8653ac
2015-03-26 14:00:02 +01:00
Sean Dague
eeb7bda510 eliminate TEST_ONLY differentiation
devstack is a development and test environment, but by default we were
only installing the runtime dependencies. We should install all the
testing required packages as well.

Change-Id: I7c95927b9daad15766aac9d1276b10ca62efb24c
2015-03-25 11:55:32 -04:00
Jenkins
1b8c4678cd Merge "Add support for Oracle Linux 7 and later." 2015-03-23 23:08:55 +00:00
Wiekus Beukes
ec47bc1d72 Add support for Oracle Linux 7 and later.
Most of the changes revolves around using MySQL rather than MariaDB,
plus enabling the addon repos on public-yum.oracle.com.
The patch just touch the areas where there is a divergence between the
Fedora and Oracle distributions and in all other cases the is_fedora
will result in the correct decision to be made and left as is.

Collapsed the is_suse and is_oraclelinux into a single check in
configure_database_mysql and cleanup_database_mysql

Added Oracle Linux to MAINTAINERS.rst

Rather than duplicating most of the Redhat version check code, added
a check in the block to do the determination if it is Oracle Linux

Change-Id: I5f1f15106329eec67aa008b17847fa44863f243f
2015-03-22 21:28:35 -07:00
Jenkins
597fd75f41 Merge "Add defaults for yum proxy variables" 2015-03-20 14:29:54 +00:00
Ryan Hsu
6f3f310848 Fix packages not getting installed if service name in base path
Currently, if devstack base path includes the name of a given
service (e.g. nova), then the service's prereq packages will
not be installed. This fix changes the checking the match
against the full path of the package list file rather than the
name of a given service.

Closes-Bug: #1434314
Change-Id: Ie81352ebd5691afc6d0019f71d5b62370e8bb95f
2015-03-19 16:32:24 -07:00
Jenkins
d4c95233d6 Merge "create install_default_policy" 2015-03-19 18:22:51 +00:00
yuntongjin
f26deea6b1 create install_default_policy
Recent versions of oslo policy allow the use of a policy.d to break up
policy in a more user understandable way. Nova is going to use this in
Kilo to break out v2 and v2.1 API policy definitions.

This provides a unified helper for installing sample policies. It
makes some assumptions on project directory structure. Porting other
projects to use this can happen in the future.

Change-Id: Iec23b095176332414faf76a9c329f8bb5f3aa6c3
2015-03-19 09:10:37 -04:00
Steve Martinelli
4599fd174c Add roles when we create groups
We should prime the groups that were created with some roles on
projects. Eventually we can add users directly to the groups
and not have to resort to individual user assignments.

Change-Id: Icebafc06859f8879c584cfd67aa51cb0c9ce48af
2015-03-19 00:59:47 -04:00
Jenkins
d9a7ae8056 Merge "Allow devstack plugins to specify prereq packages" 2015-03-19 00:35:34 +00:00
Ian Wienand
fdf00f27db Add defaults for yum proxy variables
Without these defaults, sourcing functions-common with -u turned on
(as say ./tools/build_wheels.sh does) will bail out with unset
variable errors.  Also fix up quoting, and add no_proxy for zypper run

Change-Id: Ideb441634243c1c5ce7db3a375c2d98617e9d1dc
2015-03-18 09:26:15 +11:00
Andreas Scheuring
a3430270f3 Support detection of interfaces with non-word chars in the name
The current regex only matches host interface names that consits
of "word characters" (regex \w). Intefaces having other special
chars like "-" or "." are not parsed. Examples that are not yet
matched are br-ex (ovs bridge) or enccw0.0.1234 (s390 eth device
name).

In addition it's hard to understand the the regex.

This fix is replacing the regex by a simple awk statement also
matching those names.

In addition the determination of the host_ip_iface was moved
down into the if clause, as it is only used inside.

Change-Id: I3d1b1afa32956e4e8c55c7e68cbafaf8e03e7da2
Closes-Bug: #1429903
2015-03-16 17:00:03 +01:00
Adam Gandelman
7ca90cded3 Allow devstack plugins to specify prereq packages
We offer main devstack components the ability to install their own
system package preqreqs via files/{debs, rpms}/$service.  This adds
similar functionality for plugins, who can now do the same in their
own tree at ./devstack/files/{debs, rpms}/$plugin.

Change-Id: I63af8dc54c75a6e80ca4b2a96c76233a0795aabb
2015-03-11 14:46:35 -07:00
Dean Troyer
bf2ad7015d Move configuration functions into inc/*
* config/INI functions from functions-common to to inc/ini-config
* local.conf meta-config functions from lib/config to inc/meta-config

Change-Id: I00fab724075a693529273878875cfd292d00b18a
2015-03-09 22:52:19 -05:00
Doug Wiegley
93e682c558 Revert change to remove lbaas from devstack; it breaks grenade.
Change-Id: Ie2adaeb7f27d6d646ca2e6e575fb430b9b74b276
2015-03-03 10:31:30 -07:00
Al Miller
b124f4d595 Remove LBaaS support from devstack
Devstack support for LBaaS is being migrated to an external
plugin in the neutron-lbaas repository.  The only LBaaS-
specific code that remains in devstack is a hook to support
existing configs that enable q-lbaas.  In that case, load
the external plugin if necessary.

Change-Id: I592f64407ccf1e722b8d9788917879d0236acf0b
Depends-On: I64a94aeeabe6357b5ea7796e34c9306c55c9ae67
2015-02-27 16:36:51 +00:00
Jenkins
7591be5466 Merge "Remove is_rackspace function from functions-common" 2015-02-19 01:11:54 +00:00
Dean Troyer
5ce44cd63b Fix is_keystone_enabled()
is_keystone_enabled() was calling is_service_enabled(), which is what called
is_keystone_enabled() in the first place.  Make it work as designed and
also change calls to use the full service name.  Note that this is all
still comptible with the prior usage of 'is_service_enabled key'.

Change-Id: I9c28377ecf074b7996461d2a4ca12d88dfc4d47e
2015-02-16 10:52:18 -06:00
Jamie Lennox
9b215db569 Rename get_or_add_user_role
get_or_add_user_role is specific to adding a role on a project.
Rename it to get_or_add_user_project_role to allow room for adding a
domain specific role function.

Change-Id: I999308098d22be9800578ae67144a3b687fbc3be
2015-02-11 14:51:22 +11:00
Jenkins
3273b6d280 Merge "Split functions-common: python functions" 2015-02-06 20:45:45 +00:00
Jenkins
e79678af5e Merge "Remove the default project from all users" 2015-02-06 16:16:36 +00:00
Jenkins
d7be20853b Merge "Add default for YUM" 2015-02-05 13:40:00 +00:00
Ian Wienand
36298eec00 Add default for YUM
This allows tools/* to use install_packages, etc, without having to
pull in stackrc for the $YUM definition.  Alternative to
Ief944af1ab177638bf818624a216751821e6330b

Change-Id: I7fe37079240e8cabbdffdcae5ad9d21e122e43c2
2015-02-04 10:29:31 +11:00
Dean Troyer
490430dbe3 Split functions-common: python functions
Move Python-related functions into inc/python

Should be transparent to all callers as it is sourced from functions-common

Change-Id: I88043830cef9211b4e0baa91bfcc7a92125afa9f
2015-01-30 14:59:48 -06:00
Dean Troyer
a1b82cc1b5 Fix unbound literal in trueorfalse()
Change-Id: I4c465819c311604e97d24e081389ff531f8a42fa
2015-01-30 14:59:40 -06:00
Jenkins
36b13f58cf Merge "Deprecate SCREEN_LOGDIR in favor of LOGDIR" 2015-01-29 05:57:19 +00:00
Jamie Lennox
18f39bfb1f Remove the default project from all users
The default project means that a user gains token scoping information
for a project if they don't specify another. This is something we want
to discourage for user creation. User's should specify there own
authentication scope when they authenticate.

Change-Id: I42c3060d59edfcd44d04cd166bad500419dd99bc
2015-01-28 13:38:32 +10:00
Jenkins
a6d567fae0 Merge "Update osc server create to have type as positional arg" 2015-01-21 08:12:34 +00:00
Dean Troyer
dde41d0797 Deprecate SCREEN_LOGDIR in favor of LOGDIR
This is the first step in the log file cleanup.  If SCREEN_LOGDIR
is still set, symlinks will be created in the old screen log directory
so things like the devstack-gate log collector continues to work.

bp:logging-and-service-names
Change-Id: I3ac796e322a18dbd0b8b2310a08310ca159d7613
2015-01-20 16:08:22 -06:00
Jenkins
4f154070e4 Merge "Disable shallow cloning with GIT_DEPTH=0" 2015-01-20 17:55:50 +00:00
Jenkins
46d4769f8c Merge "Use os role list instead of os user role list" 2015-01-20 16:10:40 +00:00