127 Commits

Author SHA1 Message Date
Jenkins
8467cd3faa Merge "Allow swift keystoneauth reseller_prefix in sample file" 2015-01-21 08:26:10 +00: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
Donagh McCabe
7faceb67ad Allow swift keystoneauth reseller_prefix in sample file
The reseller_prefix option cannot be added to the
swift-proxy-server.conf-sample file because it
inadvertently gets set to "TEMPAUTH" and Tempest
tests fail.

Change-Id: Ib08d6fa1926531b8966151258eae6771c99c41ca
Closes-Bug: 1404226
2015-01-05 13:58:58 +00:00
JordanP
fc0ff92777 lib/swift : fix misleading typo in a code comment
The code comment was picked from lib/keystone but not changed.

Change-Id: Idebe5af84d481d52d529575e666105e4b0e06a59
2014-12-17 12:39:36 +01:00
Sean Dague
e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
JordanP
a6dfe81998 Remove unused and deprecated SWIFT_CONFIG_DIR variable
Change-Id: Id9b9f2300288b98e4952ef8da6732232a683338d
2014-11-20 18:06:23 +01:00
Sean Dague
e08ab104e6 fix python-* lib from git installation
We're using all the magic variables based on python-fooclient, however
all the inline code was using fooclient for variables. So we had a
mismatch, which was kindly pointed out by some of the 3rd party ci
testers.

Change-Id: I27a56222c7e8e610fba8bf97672d2a42f5cf14ca
2014-11-13 17:17:38 -05:00
Sean Dague
5cb190697c support installing clients at released versions
expand the devstack support for libraries from released versions to
support python-* clients and tempest_lib.

Depends-On: I81b0d228e7769758c61e5b0323ecfce8c8886d39

Change-Id: I26fac0ccf8fd4818e24618d56bf04b32306f88f6
2014-11-04 10:18:58 +01:00
Jenkins
005a47e1a0 Merge "Enable Swift's newer feature of container-sync" 2014-10-28 03:16:21 +00:00
Jenkins
3c92eb9b7f Merge "Add swift user and project in non-default domain" 2014-10-28 03:16:03 +00:00
Alistair Coles
24779f65a6 Add swift user and project in non-default domain
Swift has functional tests that check access controls
between users and projects in differing domains. Those tests
are currently skipped by default since swift tests are
configured to use keystone v2 API. In order for those
tests to pass when using keystone v3 API, a user and
project must be setup in a non-default domain.

This patch creates a domain, and a user and project in
that domain, in support of swift functional tests moving
to using keystone v3 API.

Changes:
lib/swift
    - create a new domain, project and user for
      swift testing
    - add new project and user credentials to swift
      test config file
    - set correct identity service url in swift test
      config file according to kesytone API version

functions-common
    - add function get_or_create_domain
    - modify get_or_create_user and get_or_create_project
      functions to optionally specify a domain

Change-Id: I557de01bf196075f2f3adcdf4dd1b43756d8a0ae
2014-10-21 14:36:15 +01:00
Ian Wienand
761c456a4e Remove usage of $[ for arithmetic, take 2
I did a similar change in I8ba180be036836f37ebdbb6da36ff0be486c043e
but I guess somehow missed these ... maybe I forgot to add them to the
change.

As described originally, this causes TOT bashate to fail, so fix this
up before it gets released.

Change-Id: I5580cb46f1c8bd71c631549aab78428d95a6dc51
2014-10-21 14:19:23 +11:00
JordanP
7c6d005eed Fix account rc files creation for Swift users
Id02ebdfa5cb3f6c763293876c6bb031184ebd663 introduced a small
regression which makes the command x509-create-cert fail with
'ERROR (CommandError): Invalid OpenStack Nova credentials.' for
Swift users.

The handling of specific password for Swift users was introduced
in Ifb57a43aad439ffe041e98465719a8a8eceae544

Change-Id: I3f328b1358bad0bdf7056796eabfe846dd5bae3a
2014-10-09 09:58:51 +02:00
Daisuke Morita
d03915f9c0 Enable Swift's newer feature of container-sync
Newer version of container-sync feature is introduced in Swift ver. 1.12.0.

The spec:
http://docs.openstack.org/developer/swift/overview_container_sync.html

Before this commit, Devstack does not configure any realm used in
container-sync, therefore this feature does not work.
To test this feature in CI system, moreover to show the sample
configuration of realms, Devstack now edits realms configuration file.

Change-Id: I9f1e3224403e08e725a989162729470357fe90b0
Closes-Bug: 1378646
2014-10-09 00:40:31 +00:00
Chmouel Boudjnah
6c585d739d Refactor swift config services
Make the sed the command to change the recon_cache_path into the renamed
generate_swift_config_services

Change-Id: I6092c26836320fab607eb9cd07f63189a9ba1ddd
2014-10-04 08:14:30 +02:00
Rob Crittenden
18d4778cf7 Configure endpoints to use SSL natively or via proxy
Configure nova, cinder, glance, swift and neutron to use SSL
on the endpoints using either SSL natively or via a TLS proxy
using stud.

To enable SSL via proxy, in local.conf add

ENABLED_SERVICES+=,tls-proxy

This will create a new test root CA, a subordinate CA and an SSL
server cert. It uses the value of hostname -f for the certificate
subject. The CA certicates are also added to the system CA bundle.

To enable SSL natively, in local.conf add:

USE_SSL=True

Native SSL by default will also use the devstack-generate root and
subordinate CA.

You can override this on a per-service basis by setting

<SERVICE>_SSL_CERT=/path/to/cert
<SERVICE>_SSL_KEY=/path/to/key
<SERVICE>_SSL_PATH=/path/to/ca

You should also set SERVICE_HOST to the FQDN of the host. This
value defaults to the host IP address.

Change-Id: I36fe56c063ca921131ad98439bd452cb135916ac
Closes-Bug: 1328226
2014-09-24 18:36:37 -04:00
Brant Knudson
0595237e8a Function for auth_token middleware config
Each project was configuring the auth_token middleware using several
lines of inisets. Since all the projects should configure the
auth_token middleware in the same way create a function and call it.

Change-Id: I3b6727d5a3bdc0ca600d8faa23bc6db32bb32260
2014-09-21 11:18:01 -05:00
Chmouel Boudjnah
55dc2c2b1f Make Swift uses API_WORKERS
Keep the default to 1 instead of going wild, cause Swift really would
kill the VM if we let it go (and keeps the old behavior).

Change-Id: I7449c1bb485459169b8870c871b887cbab8be865
2014-09-19 15:40:02 +00:00
Jenkins
efa18c73ab Merge "Replace screen_it() with run_process() throughout" 2014-09-13 12:38:34 +00:00
Jenkins
e2d0795403 Merge "Remove usage of $[ for arithmetic" 2014-09-13 04:45:21 +00:00
Chris Dent
2f27a0ed3c Replace screen_it() with run_process() throughout
run_process will use screen if USE_SCREEN=True (the default),
otherwise it will simply start the requested service. Therefore
wherever screen_it used, run_process can be instead.

Where stop_screen was found it has been replaced with stop_process.

A tail_log function has been added which will tail a logfile in a
screen if USE_SCREEN is True.

lib/template has been updated to reflect the use of the new
functions.

When using sg the quoting in run_process gets very complicated.
To get around this run_process and the functions it calls accepts
an optional third argument. If set it is a group to be used with sg.

Change-Id: Ia3843818014f7c6c7526ef3aa9676bbddb8a85ca
2014-09-11 18:59:39 +01:00
Masayuki Igawa
d3654058e5 Fix another_role variable for swift
An error occurs because ANOTHER_ROLE variable in lib/swift is not set.
This patch gets and sets the value to another_role variable.

Change-Id: I9d67ce243eb6bb42ed7e3522ef816295847d48fa
Closes-Bug: #1363884
2014-09-08 16:41:41 +02:00
Ian Wienand
d968f2b2bb Remove usage of $[ for arithmetic
$[ is deprecated for the more familiar $((

Required when bash8 starts testing from tox and [1] goes in

[1] https://review.openstack.org/#/c/117430/

Change-Id: I8ba180be036836f37ebdbb6da36ff0be486c043e
2014-08-28 16:16:10 +10:00
Jenkins
3a2837a564 Merge "Clean up local variable usage - Swift" 2014-08-23 09:59:36 +00:00
Jim Rollenhagen
abbb0e9a0d Add swift tempurl support to devstack
This commit adds the ability to automatically set a tempurl key
in swift for service accounts.

Change-Id: I0d5d16c5601d022f034df2cc291106c5dc13511e
2014-08-07 17:45:28 +00:00
Dean Troyer
084f51f7bb Clean up local variable usage - Swift
Change-Id: Id02ebdfa5cb3f6c763293876c6bb031184ebd663
2014-07-25 15:08:52 -05:00
Gael Chamoulaud
6dd8a8bee4 Users in service group should not have email addresses
Change-Id: Ieed9dffce5cf1e735e482dd3494ac1e103b50955
Closes-Bug: 1185201
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2014-07-22 17:29:04 +02:00
Jenkins
c856f51ed7 Merge "Fix Swift config for Ceilometer usage" 2014-07-13 15:09:51 +00:00
Morgan Fainberg
46455a34d5 Update Apache + mod_wsgi deployment mechanisms
Added a global toggle for enabling HTTPD + mod_wsgi for services
that default deploy to running under Apache. When the variable
``ENABLE_HTTPD_MOD_WSGI_SERVICES`` is set to ``True`` any service
that recommends deploying under HTTPD + mod_wsgi, will be run
under Apache.

If ``ENABLE_HTTPD_MOD_WSGI_SERVICES`` is set to ``False`` the
any service that is defaulted to running under HTTPD + mod_wsgi
will (if capable) be run in an alternate deployment strategy (e.g.
eventlet).

Updated Swift and Keystone to have individual toggles for deploying
under HTTPD + mod_wsgi. This is done to allow for gate to run on
the services under mod_wsgi where appropriate. Toggles are
``KEYSTONE_USE_MOD_WSGI`` and ``SWIFT_USE_MOD_WSGI`` and are both
defaulted to "False" (do not deploy under HTTPD + mod_wsgi).

Change-Id: Id3b121b8f1cde369d184b586e0d875bdbda34813
2014-07-07 08:46:28 -07:00
Jenkins
cfcd8cf2f8 Merge "Adds support for multi-region" 2014-07-04 16:53:01 +00:00
Bartosz Górski
0abde393c5 Adds support for multi-region
Change-Id: Ib85fe7cb375692b04aca4c46f61ba7e1fbfa501b
Implements: blueprint multi-region
2014-07-01 14:58:35 +00:00
Chmouel Boudjnah
254fd55245 Only enable auth_token in swift with keystone
We don't need to enable auth_token in pipeline when we don't have
keystone enabled.

Change-Id: I4695817766fc39fcceed32f71156d4123d5bdfa1
2014-06-30 12:42:57 +00:00
Dina Belova
eedfdee060 Fix Swift config for Ceilometer usage
Ceilometer filter was previously removed from the Swift
configuration to avoid useless Ceilometer logs in the Swift
ones. This was fixed by setting only warning log level for
this Ceilometer part of the pipeline to keep only important
ones.

Change-Id: I8c41355bb98dbf3bb59ec792221b05ea936086b7
Partial-Bug: #1294789
2014-06-24 16:52:46 +04:00
Gabriel Assis Bezerra
a688bc6510 Fix the way Apache site configuration files are used, to improve OS portability
On Ubuntu 14.04, the site configuration file must have a .conf suffix for a2ensite and a2dissite to
recognise it. a2ensite and a2dissite ignore the .conf suffix used as parameter. The default sites'
files are 000-default.conf and default-ssl.conf.

On Ubuntu 12.04, the site configuration file may have any format, as long as it is in
/etc/apache2/sites-available/. a2ensite and a2dissite need the entire file name to work. The default
sites' files are default and default-ssl.

On Fedora, any file in /etc/httpd/conf.d/ whose name ends with .conf is enabled.

On RHEL and CentOS, things should hopefully work as in Fedora.

This change puts all distribution-related site configuration file name differences in lib/apache and
the other services gets the file name for its sites using the new exported function
apache_site_config_for <sitename>.

It also makes Fedora disabled sites use the .conf.disabled suffix instead of removing the .conf from
the file name.

The table below summarizes what should happen on each distribution:
+----------------------+--------------------+--------------------------+--------------------------+
| Distribution         | File name          | Site enabling command    | Site disabling command   |
+----------------------+--------------------+--------------------------+--------------------------+
| Ubuntu 12.04         | site               | a2ensite site            | a2dissite site           |
| Ubuntu 14.04         | site.conf          | a2ensite site            | a2dissite site           |
| Fedora, RHEL, CentOS | site.conf.disabled | mv site.conf{.disabled,} | mv site.conf{,.disabled} |
+----------------------+--------------------+--------------------------+--------------------------+

Change-Id: Ia2ba3cb7caccb6e9b65380f9d51d9d21180b894e
Closes-bug: #1313765
2014-05-30 12:07:24 +00:00
Julien Vey
63024d9125 Add an option in lib/swift to increase max_header_size
With the increasing number of entries in the service_catalog header,
some projects will have a header bigger than 8192 and Swift cannot
handle headers of this size. Solum is the first one to have this issue

As a temporary hack to fix Solum's gate, we are increasing
the value of the max_header_size parameter in our "lib" script.

This patch makes this settings global to all projects using devstack,
so that in a near future, if a project has a service_catalog header
bigger than 8192, it doesn't have the same problems we had.

Closes bug 1316585

Change-Id: I5c15f8f9531839353c3d99e46d920688058ec33c
2014-05-06 15:18:47 +02:00
Yves-Gwenael Bourhis
f894c2ab80 Do not modify rsyslog files if rsyslog is not used.
Swift was missing an 'if [[ $SYSLOG != "False" ]]' statement which is used
by other services, and therefor failed with a 'No such file or directory'
error when 'SYSLOG=False' was set in localrc.

Closes-Bug: 1308461

Change-Id: I8655a955ebb322516d92bee418b93d4cc23bdc5c
2014-04-17 14:07:51 +02:00
Longgeek
fd034f0085 Increase in the full path to mkfs.xfs(/sbin/mkfs.xfs).
Xfsprogs package has been installed. This is the cause of the error stack does not have
permission to perform mkfs.xfs command rather mkfs.xfs command in /sbin/
path, stack in order to perform mkfs.xfs must add the full path or use
the sudo command mode.

Fixed bug #1292466

Change-Id: I488133539331b4a0034a2afb4e75665904754245
2014-03-25 22:44:56 +08:00
Jenkins
52e165af79 Merge "move the rsyslogd restart" 2014-03-21 06:30:42 +00:00
Sean Dague
ad7e8c63e6 move the rsyslogd restart
it's not clear why swift start is the place where an rsyslogd start
is happening, we should really only make this change when we actually
change a file on disk.

Also, use rsyslogd's -HUP signal directly instead of the system init
scripts which are typically doing a stop and start, and apparently
racing under some circumstances.

Change-Id: I1b9891313d67b1da2ca2582e532b2536a81f9b25
Closes-Bug: #1262906
2014-03-19 19:13:20 -04:00
Joe Gordon
c381a54db1 Disable ceilometer's swift middleware
This middleware is spamming rsyslog with rabbitmq debug logs, making
this middleware practically unusable in combination with rsyslog. Because of
this, the rsyslog logs now account for 35% percent of the logs we store
in logstash. Until the underlying problem is solved disable the
offending code.

Change-Id: I50a73ae6beb1a11c41225340779fe8d7a1081e46
Related-Bug: #1294789
2014-03-19 11:09:31 -07:00
Samuel Merritt
f19ccb6359 Take tempurl out of Swift pipeline additions
Swift commit 165dd44 added tempurl to the sample config, so now it
appears twice in the default devstack-installed configuration. This
commit removes tempurl from $SWIFT_EXTRAS_MIDDLEWARE so that it only
appears once in the generated proxy pipeline.

Change-Id: I4204b2a444312ab87c17f5fb296a43818a4528a6
2014-03-10 13:12:55 +01:00
Dean Troyer
1eae3e155a Make stop_swift() more robust for Grenade
stop_swift() wasn't calling screen_stop() so the pid files and screen
sessions were not being cleaned up.  DevStack doesn't really care but
Grenade does for the 'base' copy of DevStack.  This should be backported
to stable/havana for this reason.

Change-Id: Ib5afb321cef2b7ad74e69a3fd0d1dad469f78b11
2014-03-06 11:49:30 -06:00
Attila Fazekas
0e57b967e5 Devstack install can fail on missing xinetd.d/rsync config
Assuming if the system does not have the xinetd.d/rsync,
the dedicated service is the prefered way.

Change-Id: Ic42651c5c3fb5bf0099786ca81a7bd06ace896a8
2014-02-28 17:31:39 +01:00
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Ian Wienand
f8e86bb312 Un-nest generate_swift_config
I think this got accidentally nested during some code refactorizing?

Change-Id: Ie486cf3395b6acf3a10eb32e116d39ca56134b9f
2014-02-21 15:40:19 +11:00
Steve Martinelli
19685428e3 Change most keystoneclient commands to openstacklient in libs
migrated most keystoneclient commands from the following libs:
 ceilometer
 cinder
 ironic
 keystone
 marconi
 neutron
 nova
 savanna
 swift
 trove

Also need to set and unset openstackclient specific environment
variables from stack.sh

Change-Id: I725f30bc08e1df5a4c5770576c19ad1ddaeb843a
2014-02-14 21:30:57 -06:00
Sahid Orentino Ferdjaoui
1814e671d3 Fix bug "Invalid OpenStack Nova credentials." on the gate
During the process, when create_userrc.sh tries to creates
certificates and sourcable rc, it assumes that all users have
the same password.

Change-Id: Ifb57a43aad439ffe041e98465719a8a8eceae544
Closes-Bug: #1260723
2014-02-12 17:36:35 +01:00
Jenkins
7719d4aca8 Merge "Begin is_service_enabled() cleanup" 2014-02-12 07:19:11 +00:00
Jenkins
34b81e7a39 Merge "s3_token has been moved to keystoneclient." 2014-02-11 11:16:20 +00:00
Dean Troyer
e4fa721322 Begin is_service_enabled() cleanup
This converts the special cases in the is_service_enabled() function to call
individual functions declared by the projects.  This allows projects that
are not in the DevStack repo and called via the extras.d plugin to handle
an equivalent service alias.

* Ceilometer
* Cinder
* Glance
* Neutron
* Nova
* Swift

TODO: remove the tests from is_service_enabled() after a transition period

Patch Set 2: Rebased

Change-Id: Ic78be433f93a9dd5f46be548bdbd4c984e0da6e7
2014-02-07 10:06:21 -06:00