393 Commits

Author SHA1 Message Date
Steve Martinelli
050a0d5b30 Revert "Revert "Convert identity defaults to keystone v3 api""
This reverts commit f768787bdd6dddf2790f83a884618d29677ca77c.
And sets OS_AUTH_VERSION so swift CLI doesn't fall flat when
not using v2 keystone

Change-Id: If44a7e0d85e48020a3c90d8c5c027513129f0f3b
2015-09-29 19:52:28 +00:00
Jenkins
f5255eb1c7 Merge "Improve ERROR_ON_CLONE message" 2015-09-28 21:06:08 +00:00
Jenkins
dae0e463b8 Merge "Fix return value of get_or_add_user_project_role" 2015-09-28 21:05:58 +00:00
Jenkins
f845b22a45 Merge "Remove ceilometer in favor of plugin" 2015-09-28 17:49:32 +00:00
James E. Blair
ebe63d826b Improve ERROR_ON_CLONE message
In case ERROR_ON_CLONE is true and triggers a failure for a missing
project, suggest a remedial action.  On their own, people have
come up with remedies that include altering the value of ERROR_ON_CLONE
which rather defeats the purpose.

Change-Id: I28d7f2c184f8440b774fefaa8ec7002d6708db95
2015-09-24 09:26:01 -07:00
Roxana Gherle
50821bed08 Fix return value of get_or_add_user_project_role
get_or_add_user_project_role function was always returning an
empty user_role_id because the role assignment command does not
return any output. Added a command to get the user_role_id after
the assignment happens.

Closes-Bug: #1498599
Change-Id: If1b77eef0d4f0ebdcdf761ecb5e2011484f73871
2015-09-22 11:11:36 -07:00
Roxana Gherle
59c6377ae5 Assign admin role for admin user on default domain
This patch adds an admin role assignment for the admin user on
the default domain as part of the Keystone configuration stage.

Closes-Bug: #1494081
Change-Id: I91c88917bd51be4572e4970c94e65d866798df26
2015-09-22 10:15:28 -07:00
Jenkins
debd216a73 Merge "Fix is_service_enabled when using multiple arguments" 2015-09-22 13:03:54 +00:00
Jenkins
c64b16ce7f Merge "Fix typo: falure => failure" 2015-09-22 07:18:01 +00:00
Monty Taylor
7224eecb98 Extract writing clouds.yaml to function
It's a bit wordy to be directly in stack.sh and not in a function.

Change-Id: Ibddfd8018d861191f1b1dc3270e0e81c274733cd
2015-09-21 15:45:23 -05:00
Wei Jiangang
e3340f1fe6 Fix typo: falure => failure
Change-Id: Ic1a53eec71d5e20194505aa8655a99b2fedd7632
2015-09-21 17:53:08 +08:00
Christian Schwede
3db0aad63c Fix is_service_enabled when using multiple arguments
is_service_enabled might actually fail to return the expected result if
there is a is_${service}_enabled function available and multiple
services are checked.

For example, if one defines swift as a service but disables glance, the
following check fails:

 if is_service_enabled swift glance horizon; then
     install_swiftclient
 fi

This is because the second for-iteration resets the local "enabled" var
again to 1 and finally exits with 1 as a return code.

This patch fixes this.

Change-Id: Ic76b72897efe9597d1412470353895001a1a4c66
2015-09-10 11:31:55 +00:00
Chris Dent
e9a4750fe1 Remove ceilometer in favor of plugin
The ceilometer project is moving to using a devstack plugin rather
than having ceilometer in the base devstack. This is to allow
greater control and flexibility.

Change-Id: I413ab159474b7d7231ad66d3a482201f74efe8a8
2015-09-09 16:44:29 +00:00
Lucas Alvares Gomes
f768787bdd Revert "Convert identity defaults to keystone v3 api"
This change have broke the Ironic tests. Reverting to unblock the Ironic
gate.

This reverts commit 4b115ad526df7e12bbdc71e0280b3c691e53ed04.

Closes-Bug: #1492216
Change-Id: I03acfdf47caf435cede1df08fd79b288a6662435
2015-09-04 15:35:01 +01:00
Jenkins
7594b10012 Merge "Convert identity defaults to keystone v3 api" 2015-09-03 22:24:40 +00:00
Sean M. Collins
d20435bdd4 Filter out temporary addresses
Some IPv6 addresses are temporary and are generated by IPv6 privacy
extensions. They eventually expire and are regenerated, so we should
filter them out.

Change-Id: I916d6a335bab096f765ae8c7e0e540a4349dd15f
Closes-Bug: #1488691
2015-08-25 19:24:51 -04:00
Jenkins
987dc6453e Merge "Just use constraints everywhere" 2015-08-18 23:07:53 +00:00
Clark Boylan
05aa3846a0 Just use constraints everywhere
Having behavior on your laptop diverge from behavior in the gate is
confusing. Just use constraints on every devstack run to be consistent.
Users of devstack can edit the requirements repo in order to change
these constraints locally if necessary.

Change-Id: I843208e2e982eb04931b76f5cb4bd219fbcd70de
2015-08-18 09:39:04 -07:00
Jenkins
4d223251e8 Merge "Add header guard to functions/functions-common" 2015-08-17 19:38:05 +00:00
Jamie Lennox
4b115ad526 Convert identity defaults to keystone v3 api
At this point all our function calls should be using the V3 APIs anyway
so switch the authentication credentials to v3 compatible ones and
remove all the hacks we added to force v3 API calls.

Implements: bp keystonev3
Change-Id: If92d3e11b9a363454f77527783b6d25f4da9c249
2015-08-15 05:03:41 +00:00
Daniel Gonzalez
1991e75993 Fix creation of endpoints in multi-region
Keystone API v3 does currently not support filtering for region names.
As a consequence an additional check is needed in get_or_create_endpoint
to check if an endpoint must be created for a given region or if it
already exists.
See related bug for more information regarding the missing region
filtering in keystone.

Closes-Bug: #1483784
Related-Bug: #1482772
Change-Id: Ia6a497b9fb58f7474636ab52dc01b99857bed3a2
2015-08-13 02:25:56 +02:00
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
Ian Wienand
4ffb454145 Add header guard to functions/functions-common
To avoid sourcing this twice and getting globals mixed up,
particularly when using multiple plugins, add a "header guard" that
ensures we only source it once.

In general I don't think functions/functions-common have been written
or considered to be idempotent.  I don't think going down that path is
going to be a long-term solution as it's easy to break.

Change-Id: Idca49eb996d2b7ff3779ec27ed672a2da7852590
Closes-Bug: #1469178
2015-06-30 13:48:53 +10: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