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
Changing that complex dd to a functionally equivalent truncate that's easier
to read and modify.
DocImpact
Change-Id: I64404318364608e62a1d80f6a0550271eb4cd03a
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>
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
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
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
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
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
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
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>
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
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
- 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
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
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
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
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
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
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