227 Commits

Author SHA1 Message Date
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
Kevin Benton
59d52f307b Disable shallow cloning with GIT_DEPTH=0
The recent patch to enable shallow cloning added a method to skip
it by checking if GIT_DEPTH was null. However, this could never
be triggered because if the user specified it as null, the default
setting code would take over and set it to 1.

This patch allows the user to specify GIT_DEPTH=0 to skip the
shallow clone.

Change-Id: I00ea7ab54ed51dc3ede9ceb9ff0f11575a035d1c
2015-01-20 09:35:34 -05:00
Jenkins
256b8234a9 Merge "Rename screen logfiles" 2015-01-20 14:24:00 +00:00
Steve Martinelli
789af5ccfa Update osc server create to have type as positional arg
In Keystone, for v2 and v3 service creation, there was a bug that
allowed a service to be created with no type, which made it useless.

See reference bug for details.

Change-Id: I5d095007fe2ebc8219dc012c5b16cb4c122179cd
Related-Bug: #1404073
2015-01-19 16:11:44 -05:00
Steve Martinelli
5541a618de Use os role list instead of os user role list
Since `os user role list` is being deprecated, we should start
migrating to `os role list`, which now has the required ability
to list a users role on a project as of v1.0.2 of osc.

Change-Id: I3fa8bf8f1feaac16e1cde5c55b1be00b92eaa5f6
2015-01-19 15:58:49 -05:00
Jenkins
ca5b5485d9 Merge "Make changes such that -o nounset runs" 2015-01-17 17:45:29 +00:00
Jenkins
c34cb7b5ef Merge "Add a group create function, and a sample group" 2015-01-17 06:03:07 +00:00
Dean Troyer
ad5cc986d8 Rename screen logfiles
This renames the log files in logs/screen that contain timestamps to put
the timestamp after '.log' and '.log.summary' in the names.  This will
simplify devstack-gate's search for log files to copy to '*.log'.

dstat.txt is also renamed to dstat.log

Make LOGDIR and LOGFILE local

bp:devstack-logging-and-service-names
Change-Id: I02aba9ca82c117a1186dafc1d3c07aa04ecd1dde
2015-01-16 13:58:25 -06:00
Sean Dague
537532931d Make changes such that -o nounset runs
This makes a bunch of variable cleanups that will let -o nounset
function, for the time being we hide nounset behind another setting
variable so that it's not on by default.

Because this is bash, and things are only executed on demand, this
probably only works in the config it was run in. Expect cleaning up
all the paths to be something that takes quite a while.

This also includes a new set of unit tests around the trueorfalse
function, because my change in how it worked, didn't. Tests are good
m'kay.

Change-Id: I71a896623ea9e1f042a73dc0678ce85acf0dc87d
2015-01-15 13:06:14 -05:00
Steve Martinelli
b74e01c34d Add a group create function, and a sample group
Slowly trying to introduce more v3 concepts into a generic
devstack installation.

Work with description of none and description with spaces

Change-Id: I7d2fde58363698ff020f92f129f1ff7378f945a8
2015-01-14 14:37:13 -05:00
Jenkins
b31f4cc3e5 Merge "Depreciated pip option PIP_DOWNLOAD_CACHE removal" 2015-01-13 23:05:46 +00:00
Radoslaw Smigielski
6ce071b796 Depreciated pip option PIP_DOWNLOAD_CACHE removal
Fix warning:
DEPRECATION: --download-cache has been deprecated and will be removed in the
future. Pip now automatically uses and configures its cache.

1. Since version 6.0 (2014-12-22) pip has deprecated PIP_DOWNLOAD_CACHE
   and now automatically uses and configures its cache.
   Default new location is $HOME/.cache/pip.
2. pip gets upgraded to the latest version in tools/install_pip.sh
   but if pip version<6, exit with error: "Currently installed pip version
   ${pip_version} does not meet meet minimum requirements"

Change-Id: I8b203ffc6d9cf588462d0d65a9703a9941d8fa71
2015-01-13 06:29:31 +00:00
Maru Newby
13519e8a5b Fix get_packages when $DISTRO is not set
Sourcing the tools/install-prereqs.sh script with TOP_DIR set results
in GetDistro being called in get_packages and echoing the result.
Since all output from get_packages is assumed to be package names,
this results in the attempted installation of the non-existant 'Found'
'Distro' and '[distro name]' packages.  This change removes the echo
statement to avoid this problem.

Change-Id: Idd05c31b9eec9e6209666fa16fa425cdf1f35aa2
2015-01-09 13:06:56 +00:00
Bharat Kumar Kobagana
441ff07b97 Fixing the problem in loading plugins
This patch fixes the problem in loading the plugins in devstack
by defining the "plugins" variable in "run_plugins" function of
devstack/functions-common file.

Change-Id: I9fb0e24bf1fd282931a8489e0a8ec0c9ea078520
Closes-Bug: 1408571
2015-01-08 12:26:30 +05:30
Jenkins
c7acc12ad2 Merge "Clear multi-line sections before adding lines" 2015-01-07 22:32:15 +00:00
Jenkins
9cedfcfda2 Merge "Implement devstack external plugins" 2015-01-07 18:11:07 +00:00
Sean Dague
2c65e71ab8 Implement devstack external plugins
This is an initial pass at plugin infrastructure for devstack which
allows specifying an external repository via:

enable_plugin <name> <giturl> [branch]

It implements the devstack specification for this at
I173dee3d57967b1d2ffd30e4868a2832aeac97ce

Change-Id: I8e4175313b3cf0b12e981122358b1288a7eb0746
2015-01-06 12:30:25 -05:00
Jeremy Stanley
6ec66bb3d1 Install prettytable>=0.7 to satisfy pip 6/PEP 440
Also use sudo -H with pip so that it doesn't create a ~stack/.cache
other things can't write to as the stack user later.

Change-Id: I2134c7d8f58f8b83f33150c9ed86d87f8ccba2f3
2014-12-23 01:05:42 +00:00
Doug Wiegley
1f65fd64ce Clear multi-line sections before adding lines
With multiline support for local.conf, the first line is created with
iniset, which will set *all* previous lines to the same thing, and then
subsequent lines will be added. Modify the multiline support to first
clear existing lines from the section.

This causes fatal errors with neutron.conf, which defines drivers with a bunch
of service_provider= options, and the current code ends up with the first
driver defined in local.conf being present twice.

Change-Id: If132a94e53545d9134859aa508da7b9819ede2f8
2014-12-14 20:50:00 -07:00
Jenkins
5f953dd1fe Merge "Allow use of dnf instead of yum on Fedora" 2014-12-11 14:26:10 +00:00
Daniel P. Berrange
63d25d978b Allow use of dnf instead of yum on Fedora
Since Fedora 20 it has been possible to use 'dnf' as a drop-in
replacement for 'yum', and it is targetted to become the default
in Fedora 22

   http://fedoraproject.org/wiki/Changes/ReplaceYumWithDNF

There are many benefits of 'dnf' over 'yum' but the biggest
from the POV of an openstack developer is its speed.

Assuming an existing running devstack install ie all required
RPMs already installed on the system. Now look at how long it
takes to run stack.sh, during which yum does not have to
actually install anything

 # ./unstack.sh
 # time ./stack.sh
 real 11m12.193s
 user 10m17.129s
 sys  0m15.275s

Now, with 'export YUM=dnf' set in local.conf, run the same
test again

 # ./unstack.sh
 # time ./stack.sh
 real 0m48.610s
 user 0m28.939s
 sys  0m7.801s

So, this is showing that devstack is wasting 10 minutes just
for yum to figure out that everything is already installed.
The overhead of yum vs dnf is even worse when yum has to
acutally depsolve to install new packages.

Change-Id: Ia01a5f330a47b32207586902a861bedfc8a0f6e2
2014-12-11 09:37:55 +11:00
Jenkins
d09a1db5a4 Merge "add shebang lines to all lib files" 2014-12-10 20:32:15 +00:00