171 Commits

Author SHA1 Message Date
Jenkins
9cdde34319 Merge "local call masks errors in subshells" 2015-07-22 23:36:02 +00:00
Jenkins
d9b425df06 Merge "libvirt virt_type=parallels support enchancement" 2015-07-21 04:58:31 +00:00
Ian Wienand
11d276c73c local call masks errors in subshells
In another "things from the man page"

   The return status is 0 unless local is used outside a function, an
   invalid name is supplied, or name is a readonly variable.

Thus if anything fails in "cmd" of "local foo=$( cmd )" we don't
notice.

Change-Id: I22b10d5d39f014b6c92d2e101b167cbacf81afca
2015-07-16 13:44:47 +10:00
Maxim Nestratov
e6f37b91e5 libvirt virt_type=parallels support enchancement
As soon as Parallels Cloud Server/Virtuozzo is based on CloudLinux distribution
this new rpm kind of distribution is introduced.
Also we setup vnc and set vnc_encoding parameter to None as soon it isn't
supported by parallels.

Change-Id: Ib97a09f397f950227498cfc2ce162d19b700f6f4
2015-07-15 11:59:53 +03:00
Jenkins
a13e08707d Merge "Use Keystone V3 API for role creation" 2015-07-15 05:35:26 +00:00
Jenkins
aaae79b095 Merge "Use identity V3 API for endpoint creation" 2015-07-14 04:53:34 +00:00
Jenkins
71828f756f Merge "Add IPv6 support to openrc files" 2015-07-08 12:49:41 +00:00
Jenkins
ac3d3f336c Merge "Add IPv6 support to devstack infrastructure" 2015-07-08 12:44:51 +00:00
Jamie Lennox
72ce6acd22 Use Keystone V3 API for role creation
Always use the V3 API for role creation.

Groups only exist in the v3 identity API and so we must specify
--os-identity-api-version in these commands.

Implements: bp keystonev3
Closes-Bug: #1470668
Change-Id: I5e01d23ebcb5a0c7de56233071a4eb9b16d3b813
2015-07-08 05:17:00 +10:00
Jamie Lennox
b17ad7560d Use identity V3 API for endpoint creation
Always use the keystone V3 API when creating services and endpoints. The syntax
here is slightly different but we maintain the function interface.

Change-Id: Ib3a375918a45fd6e37d873a1a5c0c4b26bdbb5d8
Implements: bp keystonev3
2015-07-08 05:17:00 +10:00
Jamie Lennox
aedb8b97f6 Search for service by type
When you get or create service it first checks to see if an existing
service matching these parameters exists. The definition of existing is
having a service with the same name, however name is not a unique field.
Sahara for example creates two services, one with data-processing, one
with data_processing with the same sahara name.

Search for existing services by service type, not by service name.

Change-Id: I6148e2254aa3968039b0e7c178e7cabc53b6be68
2015-07-03 09:36:02 +10:00
Brian Haley
5d04db20ec Add IPv6 support to openrc files
Assumes devstack was configured with SERVICE_IP_VERSION in
local.conf

SERVICE_IP_VERSION is stored in .stackenv and checked in
openrc. If SERVICE_IP_VERSION is set to 6, openrc will use
IPv6.

NOTE: At first, I added a '-6' option to the openrc call
which would set the HOSTS accordingly. I then simplified
the code by saving SERVICE_IP_VERSION to the .stackenv file
which is sourced by openrc. After that, I simplified the
code even more by removing an extra, unnecessary, variable.

Change-Id: I5d46d5438d3e56fea788720ca17f0010caef3df1
2015-07-02 21:18:16 +00:00
Brian Haley
180f5eb652 Add IPv6 support to devstack infrastructure
By default, most Openstack services are bound to 0.0.0.0
and service endpoints are registered as IPv4 addresses.
With this change we introduce two new variables to control
this behavior:

SERVICE_IP_VERSION - can either be "4" or "6".

When set to "4" (default if not set) devstack will operate
as today - most services will open listen sockets on 0.0.0.0
and service endpoints will be registered using HOST_IP as the
address.

When set to "6" devstack services will open listen sockets on ::
and service endpoints will be registered using HOST_IPV6 as the
address.

There is no support for "4+6", more work is required for that.

HOST_IPV6 - if SERVICE_IP_VERSION=6 this must be an IPv6
address configured on the system.

Some existing services, like the Openvswitch agent, will continue
to use IPv4 addresses for things like tunnel endpoints.  This is
a current restriction in the code and can be updated at a later
time.  This change is just a first step to supporting IPv6-only
control and data planes in devstack.

This change is also partly based on two previous patches,
https://review.openstack.org/#/c/140519/ and
https://review.openstack.org/#/c/176898/

Change-Id: I5c0b775490ce54ab104fd5e89b20fb700212ae74
Co-Authored-By: Sean Collins <sean@coreitpro.com>
Co-Authored-By: Baodong Li <baoli@cisco.com>
Co-Authored-By: Sridhar Gaddam <sridhar.gaddam@enovance.com>
Co-Authored-By: Adam Kacmarsky <adam.kacmarsky@hp.com>
Co-Authored-By: Jeremy Alvis <jeremy.alvis@hp.com>
2015-07-02 15:16:34 -06:00
Jenkins
52844a11dd Merge "Already dead process tolerance in unstack.sh" 2015-07-02 20:13:06 +00:00
Jenkins
7a0f6833ad Merge "remove non RabbitMQ messaging" 2015-07-02 20:09:05 +00:00
Attila Fazekas
f750a6fedb Already dead process tolerance in unstack.sh
The gate/updown.sh calls the unstack.sh with
-ex option. Normally we do not use -e with unstack.sh.

The unstack.sh can fail if the service already stopped,
and it also can have flaky failures on the gate.

For example the stop_swift function tries to kill swift in two
different ways, and if the first one succeeds before the 2th attempt
the pkill fails the whole unstack.sh.

This change accepts kill failure.
Normally the kill can fail if the process does not exits,
or when you do not have permission to the kill operation.

Since the permission issue is very unlikely in our case,
this change does not tries to distinguish the two operation.

The behavior of the unstack.sh wen you are not using -ex should
not be changed by this change.

Change-Id: I64bf3cbe1b60c96f5b271dcfb620c3d4b50de26b
2015-07-01 12:17:35 +02:00
Jenkins
7bc1f3c15f Merge "Use Keystone v3 API for user creation" 2015-06-30 17:15:58 +00:00
Jenkins
474172490f Merge "Use keystone v3 API for projects" 2015-06-30 17:15:54 +00:00
Jenkins
d014727c45 Merge "Drop no longer needed and broken check for cinder in is_service_enabled" 2015-06-30 16:55:31 +00:00
Dmitry Tantsur
f2a05497a3 Drop no longer needed and broken check for cinder in is_service_enabled
There is properly working is_cinder_enabled now, and this check
actualy matches ironic-inspector, breaking its devstack plugin.

Change-Id: I659ec9b9b2b49690fd075f9766ae8cbf19e81848
Closes-Bug: #1469160
2015-06-26 15:22:01 +02:00
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
Sean Dague
37eca48970 remove non RabbitMQ messaging
Part of what was decided at summit is devstack needs to return to a
more opinionated stance, the following removes support for non
RabbitMQ messaging. RabbitMQ is used by over 95% of our community
(statistically all of it), so it's a pretty clear line to draw that
this shouldn't be in tree.

iniset_rpc_backend will be our stable hook for other projects that
want to implement this out of tree. The burden on creating those out
of tree plugins will be on those that wish to support those
alternative stacks.

Change-Id: I8073a895c03ec927a2598eff6c2f01e5c82606fc
2015-06-16 08:28:52 -04:00
Jamie Lennox
9d7e776b70 Use Keystone v3 API for user creation
This includes requiring a domain when creating a user. This will allow us to
control where users are created in a later patch.

Adding the token to the user creation call is required because of a bad
interaction between OpenStackClient, os-client-config and keystoneclient
when dealing with v2 authentication but v3 API calls. It will be cleaned
up when we switch to v3 credentials.

Change-Id: I6ef50fd384d423bc0f13ee1016a8bdbb0650ecd9
Implements: bp keystonev3
2015-06-16 10:06:39 +08:00
Jamie Lennox
b632c9ef81 Use keystone v3 API for projects
Always use the keystone v3 API for project creation. Make domain a
required argument. Whilst we could simply default this value within the
function I think it's better to make this explicit as these are things
deployers and services need to consider.

In future we will want to figure out how we want devstack to organize domains
however I don't believe that it belongs in this patch.

Change-Id: Ib9587193c5c8419dc4b5a608246709baaddd2a52
Implements: bp keystonev3
2015-06-16 08:38:09 +08: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