2298 Commits

Author SHA1 Message Date
David Goetz
ded504600f Allow actual paths to work for swift-get-nodes
Change-Id: I29f9ab73c8ca2a3c52247fb92ef951dd5b5246cb
2013-01-04 13:48:15 -08:00
John Dickinson
dc8d0e0692 Functional tests use x-auth-token rather than x-storage-token
This change allows other auth systems to test against the functests but not
require them to support x-storage-token (which was deprecated before swift
was even open-sourced). All other places in the code where x-storage-token is
used is only to populate x-auth-token if x-auth-token doesn't already exist.

Change-Id: Ie903d0f7135fc643353b74a61c14becf7dfc4d9d
2013-01-03 08:59:46 -08:00
Jenkins
6b8ae93f2e Merge "saio truncate instead of dd (for reals)" 2012-12-21 22:16:43 +00:00
Jenkins
9c80093e08 Merge "Fix for subtle bug from 5c8f9c52e3f2944f01cea621326532e058a225f7" 2012-12-21 22:16:11 +00:00
gholt
5f19ccf28f Fix for subtle bug from 5c8f9c52e3f2944f01cea621326532e058a225f7
Change-Id: If2bd1d4a850936b2e575a96073c116a8b9522602
2012-12-21 19:40:49 +00:00
Jenkins
0d6fb2e0c2 Merge "Move InputProxy to utils" 2012-12-21 16:29:36 +00:00
Michael Barton
c37954d935 saio truncate instead of dd (for reals)
Changing that complex dd to a functionally equivalent truncate that's easier
to read and modify.

DocImpact

Change-Id: I64404318364608e62a1d80f6a0550271eb4cd03a
2012-12-20 20:12:50 -08:00
Jenkins
c1964e5f6a Merge "Revert "suggest fallocate instead of dd in saio"" 2012-12-20 23:41:15 +00:00
Jenkins
032f44859a Merge "Fixes console logging with non-swift middleware" 2012-12-20 21:40:03 +00:00
Michael Barton
5d5b262be8 Revert "suggest fallocate instead of dd in saio"
Change-Id: I3742c4580d920e09de434e86b75b134c62f1732e
2012-12-20 13:35:45 -08:00
Julien Danjou
6df28545ff Move InputProxy to utils
This class is being used at least by Ceilometer in its Swift middleware, and
since it's a general one anyway, it looks good to move it to common.utils.

This is a follow-up to Chmouel suggestion in
https://review.openstack.org/#/c/18231

Change-Id: I8d0ed8600c4152b91be9a88a3b396c3967d0add2
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-12-20 15:46:28 +01:00
Chuck Thier
53ed90beef Fixes console logging with non-swift middleware
Fixes logging if logging to the console with non-swift middleware (such
as keystone) enabled.  This also fixes issues with swift in devstack

Change-Id: Ib8b691b62b657a6d4ecdb1648d1fc2f3a0479982
2012-12-19 17:54:06 -06:00
Michael Barton
e81ca8daf3 suggest fallocate instead of dd in saio
Change-Id: I4d5ba8e58216749c2858dc1c0b8225b3619a7287
2012-12-19 14:10:07 -08:00
Dan Prince
97f79b9dda Convert LICENSE to use unix style line endings.
Ran dos2unix on LICENSE to convert to unit style line endings.
This makes building packages which contain the LICENSE file
a bit nicer... and matches other LICENSE files under the openstack
umbrella which have unix style line endings as well.

Change-Id: Id724d1ba402a590725a2d200f5e0599bce696e5a
2012-12-19 12:48:27 -05:00
Jenkins
74038dccbb Merge "Refactor Ring::get_nodes() and Ring::get_part_nodes()" 2012-12-18 22:04:56 +00:00
Jenkins
9543a71376 Merge "Use install_requires in setup.py" 2012-12-18 18:51:42 +00:00
Wu Wenxiang
b85f69ed70 Refactor Ring::get_nodes() and Ring::get_part_nodes()
Add a _get_part_nodes() method in Ring class, then call it in Ring::get_nodes() and Ring::get_part_nodes().

In order to reduce duplicate codes.

Change-Id: Id92f8dfd08388305638a2ba2ab64e77545c14cba
2012-12-18 17:30:10 +08:00
Jenkins
c840bd44a7 Merge "Made 507s report drive, if known." 2012-12-18 06:12:22 +00:00
gholt
52a2a65ed4 Made 507s report drive, if known.
This functionality was lost with the swob change, but is back now.

Change-Id: I13b3154080a7c601235711b274e4899efb6adc93
2012-12-18 01:18:57 +00:00
gholt
4fcbeff22f Added override for swift-init's KILL_WAIT
You can now give swift-init a -k N (or --kill-wait N) option to
override the default 15 second wait for a process to die after
sending it the die signal. This is useful for boxes that are awfully
slow for whatever reason.

DocImpact

Change-Id: I328ec254f6e0ee1cd423c1d062ba4c5331bd8337
2012-12-17 23:09:07 +00:00
David Goetz
2a9bf20065 one dot, 5% increase in coverage
Change-Id: I1a2d603be983aa3291d22f7258437ee264e6c559
2012-12-17 09:45:46 -08:00
Jenkins
7f6099707c Merge "Fix needed for keystone middleware logging" 2012-12-15 18:50:47 +00:00
Jenkins
2ed1d3ba41 Merge "Fix permissions from last commit" 2012-12-14 20:12:29 +00:00
gholt
9302c5ffc1 Fix permissions from last commit
Change-Id: I3bad8c2995d4daf1e7798fae2c59b409608cbc45
2012-12-14 18:06:29 +00:00
clayg
3dbc1a9b9c document correct config in dispersion-report help
The --help message of swift-dispersion-report used to say
/etc/swift/stats.conf instead of the correct and consistent
/etc/swift/dispersion.conf - this change updates that
commandline help message.

Change-Id: I69ad64d31bb86eb0d36fcf5b17aa8bf42f646ed1
2012-12-14 10:03:04 -08:00
Sascha Peilicke
08a110bdbc Add a license header to functionalnosetests
Change-Id: I413d8bb9cbdea1f67ab2649ab0cc4a05a7a65883
2012-12-13 11:13:50 +01:00
Chuck Thier
a064fa4227 Fix needed for keystone middleware logging
This is required for a fix in keystone middleware to log to the proxy
logs.  Since the keystone middleware doesn't initialize the log with
swift.commong.utils.config_logger, it doesn't have the server and
transaction id setup.  This is required to fix bug #1089664

Change-Id: Icbb44076495a4d56065445c7a4d972ebede5d1e0
2012-12-12 17:31:04 -06:00
Julien Danjou
dcff5ff516 Use install_requires in setup.py
Using install_requires makes sure that if some code is using Swift internal
and wants to require Swift, all its dependencies have been already pulled.
This is really useful on test automation for example, otherwise, code might
be failing because on of the module listed in pip-requires is not instaled.

Also, we change the pip-requires files to use >= rather than ==, so the
requirements are easily fulfiled with distribution provided packages.

Change-Id: I65814bcd8ce798da21a5c17b4d5916a23f59e962
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-12-12 11:18:45 +01:00
Darrell Bishop
ea95d0092a Avoid infinite recursion in swift.obj.replicator.get_hashes.
Fixes bug 1089140.

Turns out that if an exception bails out of the pickle loading (eg.
zero-byte hahes_file), the if clause to determine whether or not to
write out a fresh hashes_file can evaluate to false, leading to an
infinite loop.

This patch fixes this infinite loop generally, by ensuring that if any
exception is thrown, a new hashes_file is written.

Change-Id: I344c5f8e261ce7c667bdafe1687263a4150b21dc
2012-12-11 15:32:09 -08:00
Jenkins
1135c9e256 Merge "Allow dot test runners from any dir" 2012-12-11 22:07:22 +00:00
Jenkins
8b770aa55e Merge "Add config option to turn eventlet debug on/off" 2012-12-10 20:37:31 +00:00
Jenkins
a6ee9b446d Merge "capture resetswift output in probetests" 2012-12-10 17:19:04 +00:00
Jenkins
1619cee011 Merge "Add config of server start timeouts for probetests" 2012-12-10 17:14:49 +00:00
Jenkins
067335a6e7 Merge "Add dispersion report flags to limit reports" 2012-12-10 16:49:33 +00:00
Chuck Thier
4c6a354483 Add config option to turn eventlet debug on/off
By default, this will be turned off.  This will cause eventlet to not
print stack traces to stderr which can be very annoying on production
systems.  It is still recommended to turn it on for development or
debuging purposes.

DocImpact
Change-Id: I5e5b902d3d9ed85f784549e53f2ee2fc87cbe2e5
2012-12-10 10:22:09 -06:00
Florian Hines
e474dfb720 Add dispersion report flags to limit reports
- Add two optional flags that let you limit swift-dispersion-report to only
reporting on containers OR objects.
- Also make dispersion.conf and swift-dispersion-report manpages
  current.

DocImpact

Change-Id: Iad56133cad261241db27d0e2103098e3c2f3c245
2012-12-09 18:20:08 -06:00
clayg
3a70112d03 Add config of server start timeouts for probetests
Currently the timeout for a wsgi server successfully binding to a port
and for a probetest background service to finish starting are hard coded
to 30 seconds.  While a reasonable default for most configurations, a
small virtualized environment may need a little more time in order for
probe tests to complete successfully.

This patch adds a 'bind_timeout' option to the DEFAULT section of the
main wsgi servers' config.  Also a new [probe_test] section and
'check_server_timeout' option to test.conf

DocImpact

Change-Id: Ibcaff153c7633bbf32e460fd9dbf04932eddb56f
2012-12-07 14:47:08 -08:00
clayg
1f83f007e8 Allow dot test runners from any dir
Currently the .*test files in the source tree root seem to assume you're
in that directory when you run them.  This change should work exactly
the same except for removing that restriction.

Change-Id: I9b037016490dd6d5b515cb2c3cad2f99ee40bb6d
2012-12-07 14:08:49 -08:00
clayg
b852f2274b capture resetswift output in probetests
This change makes the dots prettier during probetests

When calling the resetswift script, the probetests will use subprocess
to redirect stderr to stdout and capture stdout into a buffer.  We print
the captured buffer from resetswift's combined stdout/stderr and let
nosetests stdout capturing handle printing the output for debug only if a
test fails.

Change-Id: I022512f2ef5a4c43b0e49264bad1bca98c1f0299
2012-12-06 22:34:28 -08:00
Jenkins
13937ad696 Merge "bp/cross-tenant-acls: allow tenantId:user, tenantName:user, and *:user ALCs" 2012-12-05 19:48:24 +00:00
Jenkins
7e8959ff0a Merge "drop_privileges should also set HOME" 2012-12-04 20:08:29 +00:00
Jenkins
db6d62a162 Merge "Allow optional, temporary healthcheck failure." 2012-12-04 19:43:50 +00:00
Darrell Bishop
b8e3e9e1c2 Allow optional, temporary healthcheck failure.
A deployer may want to remove a Swift node from a load balancer for
maintenance or upgrade.  This patch provides an optional mechanism for
this.  The healthcheck filter config can specify "disable_path" which is
a filesystem path.  If a file is present at that location, the
healthcheck middleware returns a 503 with a body of "DISABLED BY FILE".

So a deployer can configure "disable_path" and then touch that
filesystem path, wait for the proxy to be removed from the load balancer
pool, perform maintenance/upgrade, and then remove the "disable_path"
file.

Also cleaned up the conf file man pages a bit.

Change-Id: I1759c78c74910a54c720f298d4d8e6fa57a4dab4
2012-12-04 09:14:27 -08:00
Peter Portante
37da61bf30 Ignore pycscope files
Change-Id: I5fe38f28896d086e56ba9e718b02227d87dd4a2d
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2012-12-04 11:17:38 -05:00
Eugene Kirpichov
772da0a004 drop_privileges should also set HOME
E.g. if HOME is not set, swift-proxy will create the
keystone_signing file not in HOME but in /root.
This is because the swift user doesn't have a shell
in /etc/passwd and so it doesn't set environment variables
when impersonating.

Change-Id: I3013007e0dadf6ddccc176e142b7c78c5d63a351
2012-12-04 12:13:27 +00:00
Jenkins
8a6922b73e Merge "406 if we can't satisfy Accept" 2012-12-03 23:20:10 +00:00
Jenkins
4f617f49b6 Merge "Added --top option to swift-recon -d" 2012-12-03 21:39:26 +00:00
Michael Barton
064ee2b583 406 if we can't satisfy Accept
The container and account servers should respond with 406 if the Accept header
isn't satisfiable.  This behavior is defined in RFC 2616 section 14.1.

Change-Id: I8a67ccafe33dc70ef4f7794686a54fbc8581f4dc
2012-12-03 11:42:37 -08:00
Jenkins
4ac6904793 Merge "Improve container-sync docs." 2012-12-01 00:55:44 +00:00
Guang Yee
795acd40f1 bp/cross-tenant-acls: allow tenantId:user, tenantName:user, and *:user ALCs
Change-Id: I7cfe77b3f03172814814f2e2bae04a3ae184efb0
2012-11-30 13:53:00 -08:00