176 Commits

Author SHA1 Message Date
Jenkins
fa8464bf34 Merge "Fix typos for stack.sh and lib of comments and message" 2015-11-18 02:20:45 +00:00
Atsushi SAKAI
fe7b56cdef Fix typos for stack.sh and lib of comments and message
Fix 10 comments and 1 message

stack.sh
  Certicate => Certificate (comment)
lib/stack
  Sentinal => Sentinel (comment)
lib/neutron-legacy
  overriden => overridden (comment)
  necesssary => necessary (comment)
  notifiy => notify (message)
  notifations => notifications (comment)
lib/rpc_backend
  orginal => original (comment)
  cofiguration => configuration (comment)
lib/stack
  confgured => configured (comment)
lib/swift
  additinal => additional (comment)
  calclution => calculation (comment)
  maximun => maximum (comment)

Change-Id: I3637388b67decb007cd49af9addecc654009559b
2015-11-13 17:28:05 +09:00
Steve Martinelli
a91d455e23 change swift post to openstackclient cli command
with the release of osc 1.8.0, modifying object store account
properties is now available. use this mechanism and avoid setting
environment variable that are only helpful for swift CLI.

Change-Id: Ie51e3e2bb86162763f23d0a6bed36208811f89fc
2015-11-03 20:07:58 +11:00
Jenkins
310cedf677 Merge "Use swift port variable in keystone and cinder" 2015-10-29 04:57:22 +00:00
Falk Reimann
22f747b8df Use swift port variable in keystone and cinder
This patch alows specifiying a deviation of the swift default port 8080 with
variable SWIFT_DEFAULT_BIND_PORT. The created endpoints in keystone for
object-store and the backup_swift_url in cinder.conf will use variable
SWIFT_DEFAULT_BIND_PORT instead of the fixed port 8080.

Change-Id: I47bbcf77368c430718fb8f29b7de1ff305e64422
Closes-Bug: #1489767
2015-10-23 09:19:32 +02:00
Jenkins
d111182f21 Merge "Don't mix declaration and set of locals" 2015-10-14 02:43:52 +00:00
Jenkins
17491f37d7 Merge "Revert "Revert "Convert identity defaults to keystone v3 api""" 2015-10-07 19:30:18 +00:00
Ian Wienand
ada886dd43 Don't mix declaration and set of locals
Ia0957b47187c3dcadd46154b17022c4213781112 proposes to have bashate
find instances of setting a local value.  The issue is that "local"
always returns 0, thus hiding any failure in the commands running to
set the variable.

This is an automated replacement of such instances

Depends-On: I676c805e8f0401f75cc5367eee83b3d880cdef81
Change-Id: I9c8912a8fd596535589b207d7fc553b9d951d3fe
2015-10-07 17:03:32 +11:00
Denis Afonso
dbe0868d11 Change the default bind_port for swift
The default bind_port (6011-6013) in the sample config files for swift
use port numbers that are in the range registered by X11 (6000-6063) and
can prevent swift from starting if the ports are in use.

We should use an unregistered range (6611-6613).

Change-Id: Ifd95b99004aead5ddc8ae1a8dd3ccd9c4f2abe91
Closes-Bug: #1254328
2015-10-02 23:51:41 -04:00
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
Christian Schwede
3e3212b52d Add trailing IDENTITY_API_VERSION to OS_AUTH_URL in swift_configure_tempurls
The python-keystoneclient requires a trailing /v<IDENTITY_API_VERSION> to
successfully authenticate, otherwise it fails with a 404 error due to a not
found resource.

This error showed up only when generating Swift tempurls, because the error was
raised when using python-swiftclient.

This change fixes this for python-swiftclient within devstack.

Change-Id: Ibe222d65162898db69acba076b5fe1cb3621fbc3
Closes-Bug: 1492216
2015-09-08 08:33:57 +02:00
Jenkins
f560df36cc Merge "check all possible services when configuring tempest" 2015-09-02 06:27:40 +00:00
Jenkins
46e6da4d0a Merge "Add region definition to swift3" 2015-09-01 18:19:31 +00:00
Sean Dague
346edcc532 check all possible services when configuring tempest
The previous approach assumed that devstack in tree service support
would always be a super set of tempest. That's not necessarily
true. Instead when configuring tempest we should look at all the
possible services that tempest could know about, which will let us
disable services we don't have support for.

Change-Id: I9c24705e494689f09a885eb0a640efd50db33fcf
2015-08-26 09:38:37 -04:00
Jenkins
c6646a650e Merge "Use standard get_or_create_role to find role" 2015-08-24 17:21:40 +00:00
Andrey Pavlov
9b21f98ce0 Add region definition to swift3
Swift3 should be in the same region as all other cloud.
By default it has regaion name 'US'. It's ok for requests
that signed by version 1 of signature because they haven't
region information in request.
But S3 signature of version 4 protocol sends region name to server
and swift3 plugin checks that input region equals to internal.
And because all cloud lives with 'RegionOne' then swift3 fails
request because it has 'US' region name by default.

Change-Id: Icd817183b1a040110372a8ae5d73fd2f0ec5559c
Related-Bug: #1411078
2015-08-20 23:37:04 +03:00
Marian Horban
ea21eb4f69 Remove non-ASCII characters
Change-Id: If1c68e5aab6990617519150d8aeb3f073df2ad17
2015-08-18 19:53:39 +00:00
Jamie Lennox
dbdee69870 Use standard get_or_create_role to find role
The openstack role list command doesn't include any identity API version
information and so will fail when running purely with v3. We could add
this information to the command however we already have a function that
does what swift requires so we should use it.

Change-Id: I5d5417eaed432760bfb97cf35bd76a0919c6004d
2015-08-14 12:22:18 +10:00
Rawlin Peters
92ad152512 Explicitly set bind_ip in Swift server config files
Currently, the Swift proxy, object, account, and container servers bind
to IPv4 address 0.0.0.0 by default. In the case of a user setting
SERVICE_IP_VERSION=6 in their local.conf file, these Swift servers still
listen on 0.0.0.0 instead of ::, which causes a ./stack.sh run to fail.

This change explicitly sets the bind_ip variable in the Swift server
config files so that the servers bind to either 0.0.0.0 (when
SERVICE_IP_VERSION != 6) or :: (when SERVICE_IP_VERSION == 6).

This patch is related to the following patch for devstack IPv6 support:
    https://review.openstack.org/#/c/192329

Change-Id: Ie268c6daf5374e67ef8710a731c3af50ffdb821e
2015-07-20 13:33:33 -06:00
Jenkins
aaae79b095 Merge "Use identity V3 API for endpoint creation" 2015-07-14 04:53:34 +00:00
Jenkins
ac3d3f336c Merge "Add IPv6 support to devstack infrastructure" 2015-07-08 12:44:51 +00: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
Chris Dent
1848b837e6 Move ceilometermiddleware installation to lib/swift
lib/swift is where it is used so this makes the relationship more
clear and direct.

Change-Id: Ie6fc09e27a39295c92f0790856446edb7dedb995
2015-07-07 10:21:18 +10: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
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
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
Cyril Roelandt
e8a2fa431b lib/swift: the s3_token middleware should be provided by keystonemiddleware
Recently, keystoneclient.middleware has been moved from keystoneclient to
keystonemiddleware. The latter should be used.

Change-Id: Ib9489a21b988b32fc17399c08eeb60862efae034
Closes-Bug: #1452315
2015-05-06 17:34:35 +02:00
Jenkins
d1549d624d Merge "Creates SWIFT_DATA_DIR if it does not exist" 2015-04-07 00:21:20 +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
Jenkins
4cc060e77c Merge "Increase Swift disk size up to 2GB if Glance is enabled" 2015-03-26 12:51:03 +00:00
Geronimo Orozco
2f6576bfaf Creates SWIFT_DATA_DIR if it does not exist
If SWIFT_DATA_DIR is set on local.conf we need to make sure to create
the directory with proper permissions

Change-Id: If29fa53f01b4c0c8a881ec3734383ecffac334ce
Closes-Bug: 1302893
2015-03-20 10:05:05 -06:00
Jenkins
05163d66ac Merge "Use install(1) where possible" 2015-03-20 14:30:06 +00:00
Jenkins
e64bd629b4 Merge "Swift use v3 auth_token credentials" 2015-03-20 14:29:36 +00:00
Ivan Kolodyazhny
9ebd65be32 Increase Swift disk size up to 2GB if Glance is enabled
Minimum Cinder volume size is 1GB so if Swift backend for Glance is only
1GB we can not upload volume to image.

Change-Id: Ifd4cb42bf96367ff3ada0c065fa258fa5ba635d9
2015-03-19 15:41:57 +02:00
Dean Troyer
8421c2b9ab Use install(1) where possible
This eliminated a number of sudo calls by doing the copy/chown/chmod in
a single step and sets a common pattern.

Change-Id: I9c8f48854d5bc443cc187df0948c28b82c4d2838
2015-03-18 13:30:59 +11:00
gordon chung
b6197e6ab0 switch to use ceilometermiddleware
swift middleware contained in ceilometer is now deprecated. the
middleware is available in ceilometermiddleware.

Change-Id: I6e41986245f4d95a9385dc7829479ed1199f10ac
2015-03-13 15:41:13 +00:00
Jamie Lennox
6ac97deba6 Swift use v3 auth_token credentials
The keystonemiddleware 1.5.0 released 2015-03-11 supports configuring
auth plugins from the paste config file. This means that swift can now
use authentication plugins for auth_token middleware.

Change-Id: Icb9f008a57b6f75e0506cbecd0a1e0f28b7dadda
2015-03-13 10:30:21 +11:00
Attila Fazekas
fbb3e773f0 Remove the kesytone admin token from swift
The keystone admin token supposed to be used only
for setting up keystone and it should not be used
in any other service config.

Change-Id: Iaa9be1878e89a6bc3a84a0c57fc6f5cecc371d2f
2015-03-09 15:08:22 +00:00
Jenkins
4a9b154f5e Merge "Fix is_keystone_enabled()" 2015-02-18 21:00:14 +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
Jim Rollenhagen
ae74ed778a Make swift user an admin
This breaks Ironic's use of temp URLs, which the key for the service
account is configured via the Swift user.

Change-Id: I69f6f6eef4ad573f406d64d579a9811c70ac5d28
Closes-Bug: #1421006
2015-02-12 07:33:36 -08:00
Jenkins
ee2e53592b Merge "Reduce service user permissions" 2015-02-11 15:55:41 +00: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
Jamie Lennox
e8bc2b82a0 Reduce service user permissions
Most of the services create the service user with the admin permission.
This is unnecessary for token validation and they should be restricted
to only having the service role.

Change-Id: Id7a9366d2c6a36139240f64371002362dc2d8d3b
2015-02-11 14:49:56 +11:00
Jamie Lennox
85ff5323ff Isolate creating service users
The code for creating service users is almost exactly the same. Abstract
this into a function that can be reused and standardized.

Change-Id: I3a4edbff0a928da7ef9b0097a5a8d508fdfab7ff
2015-02-09 14:36:20 +11:00
Jenkins
e79678af5e Merge "Remove the default project from all users" 2015-02-06 16:16:36 +00:00
Jamie Lennox
38c95b8eba Configure auth_token middleware manually in swift.
Swift doesn't use olso.config and so the method of configuring swift via the
[keystone_authtoken] config options will not work. Go back to configuring swift
manually.

This will need to be fixed in either keystonemiddleware or swift as configuring
via plugin is the path to v3 authentication, service domains and new forms of
service user authentication.

Closes-Bug: #1415795
Change-Id: Ibe27116a11756072d5a300a6d3691c5f8c32317e
2015-01-30 02:18:26 +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
8467cd3faa Merge "Allow swift keystoneauth reseller_prefix in sample file" 2015-01-21 08:26:10 +00:00