375 Commits

Author SHA1 Message Date
Jenkins
23f33b2069 Merge "Make statsd sample rate behave better." 2013-02-13 08:19:46 +00:00
Joe Gordon
45f0502b52 Fix spelling mistakes
git ls-files | misspellings -f -
Source: https://github.com/lyda/misspell-check

Change-Id: I4132e6a276e44e2a8985238358533d315ee8d9c4
2013-02-12 16:39:40 -08:00
Jenkins
af3bd46679 Merge "Add generated keystone documentation to misc.rst." 2013-02-12 12:03:21 +00:00
Jenkins
e4e55588fb Merge "Replaces Copyright statements for LLC with Foundation, removes date." 2013-02-12 06:25:45 +00:00
annegentle
72428434f7 Replaces Copyright statements for LLC with Foundation, removes date.
Replaced GA code for cross-domain tracking.

Patchset addresses reviewer's comments
and follows new guidance from Foundation:
http://wiki.openstack.org/Documentation/Copyright

Adds current year to each Sphinx-built page.

Addresses only the docs copyright attribution, not code files.

Change-Id: Ib90fd1c92c8fafce2db821bc2b17cef1377cfc1e
2013-02-11 16:32:33 -06:00
Chmouel Boudjnah
1b86380e2e Add generated keystone documentation to misc.rst.
- Change a bit the formatting of the documention as well.
- Fix WARNING: Title underline too short. in misc.rst.

Change-Id: I2f4e36bcb5e01e984f0af0152bc5b3b9f7e942ce
2013-02-11 21:44:53 +01:00
David Hadas
83d89228a9 minor development doc changes
Reviewed development saio and guidelines while installing
a new dev and test node.

Change-Id: I59238a4d43fa08a89be14f43681ad4693f1261dd
2013-02-09 11:11:05 +02:00
Jenkins
c0e8ad609b Merge "Allow change the endpoint_type when use swift-dispersion tools" 2013-02-08 23:55:03 +00:00
Michael Barton
24ef12027c Basic container quotas
Add a new middleware implementing some basic container quotas.

Quotas are subject to several limitations: eventual consistency, the timeliness
of the cached container_info (60 second ttl by default), and it’s unable to
reject chunked transfer uploads that exceed the quota (though once the quota
is exceeded, new chunked transfers will be refused).

However, they get most of the way to container quotas fairly inexpensively.

Quotas are set by adding meta values to the container, and are validated when
set:

  X-Container-Meta-Quota-Bytes: Maximum size of the container, in bytes.
  X-Container-Meta-Quota-Count: Maximum object count of the container.

DocImpact

Change-Id: I77cfbf6dc231a2e522bd67328e4c082424a93eee
2013-02-05 06:03:38 -08:00
Mehdi Abaakouk
a1395ec672 Allow change the endpoint_type when use swift-dispersion tools
Fixes bug 1102319
DocImpact

Change-Id: I8fb0417ab9468e97ed01a6cb1e262630905e7f29
2013-01-31 16:10:37 +01:00
Jenkins
0dfd705b98 Merge "Added fallocate_reserve option" 2013-01-30 23:45:36 +00:00
gholt
87a42ab9ca Added fallocate_reserve option
Some systems behave badly when they completely run out of space. To
alleviate this problem, you can set the fallocate_reserve conf value
to a number of bytes to "reserve" on each disk. When the disk free
space falls at or below this amount, fallocate calls will fail, even
if the underlying OS fallocate call would succeed. For example, a
fallocate_reserve of 5368709120 (5G) would make all fallocate calls
fail, even for zero-byte files, when the disk free space falls under
5G.

The default fallocate_reserve is 0, meaning "no reserve", and so the
software behaves exactly as it always has unless you set this conf
value to something non-zero.

Also fixed ring builder's search_devs doc bugs.

Related: To get rsync to do the same, see
https://github.com/rackspace/cloudfiles-rsync
Specifically, see this patch:
https://github.com/rackspace/cloudfiles-rsync/blob/master/debian/patches/limit-fs-fullness.diff

DocImpact

Change-Id: I8db176ae0ca5b41c9bcfeb7cb8abb31c2e614527
2013-01-29 20:07:26 +00:00
Florian Hines
00dbad0825 Add optional locking to swift-ring-builder
If invoked as 'swift-ring-builder-safe' the directory containing the builder
file provided will be locked (via lock_parent_directory()). This provides a
small safe guard against multiple instances of the swift-ring-builder (or
other utilities that observe this lock) from attempting to write to or read
the builder/ring files while operations are in progress.

This is particularly useful in environments where ring management has been
automated (via Chef or custom solutions) but the operator still occasionally
needs to manually interact with the ring.

DocImpact

Change-Id: Ia362744a8151a91bfb586d01da582906726852e6
2013-01-25 08:00:33 -08:00
David Goetz
2f663ff9a0 Bulk Requests: auto extract archive and bulk delete middleware.
Fix small problem in ratelimiting middleware.

DocImpact

Change-Id: Ide3e0b9f4887626c30cae0b97eb7e2237b1df3ed
2013-01-24 12:34:56 -08:00
Jenkins
77a562dbf1 Merge "Add handler for CORS "actual requests"" 2013-01-23 22:18:11 +00:00
Adrian Smith
89ee10bd92 Add handler for CORS "actual requests"
Fix for bug 1095130

* Added a wrapper function around public methods to handle
  CORS actual requests. These requests need to return some
  extra headers to be valid responses to a CORS request.
  Access-Control-Expose-Headers and Access-Control-Allow-Origin.

* Added support for the CORS header Access-Control-Expose-Headers.

* Some refactoring of the OPTIONS method so the
  "is_origin_allowed" logic can be reused.

* Added a little extra detail to the CORS documentation.

DocImpact

Change-Id: I68538e472a900775427f21a8a59e738a83dcc8bc
2013-01-23 19:31:18 +00:00
John Dickinson
ee98288345 Update auto-generated docs
Removed sidebar with broken (static) links referencing out-of-date docs.

Added an external link to the Swift API docs

fixes bug #1025099

Change-Id: I7f3106175b84b1063f74aa6c5693ab1e422cdb59
2013-01-22 15:24:06 -08:00
Darrell Bishop
8801b74090 Make statsd sample rate behave better.
As Dieter pointed out in bug 1090495
(https://bugs.launchpad.net/swift/+bug/1090495), the volume of metrics
can vary wildly between StatsD metrics.

This patch implements a partial solution by reducing the sample_rate
used for known high-volume metrics (operational experience will need to
inform this over time) and introducing a new tunable,
log_statsd_sample_rate_factor which is multiplied by the sample_rate for
every statsd stat.  This tunable can be used to reduce StatsD traffic
proportionally for all metrics and is intended to replace
log_statsd_default_sample_rate, which is left alone for
backward-compatibility, should anyone be using it.

This patch also includes a drive-by fix for log_udp_port which wasn't
being converted to an int (I didn't verify that actually causes trouble
in SysLogHandler(), but it's definitely an improvement regardles).

Change-Id: Id404636e3629f6431cf1c4e64a143959750a3c23
2013-01-19 15:25:27 -08:00
Chmouel Boudjnah
0df6fe817d Add container-sync to container-server.conf doc.
- In howto install multi nodes container-sync was not included in the
  config example.

Change-Id: I2682d47c5cae28ff321ba03d70dae2fea00c276f
2013-01-12 23:37:25 +01: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
Michael Barton
5d5b262be8 Revert "suggest fallocate instead of dd in saio"
Change-Id: I3742c4580d920e09de434e86b75b134c62f1732e
2012-12-20 13:35:45 -08:00
Michael Barton
e81ca8daf3 suggest fallocate instead of dd in saio
Change-Id: I4d5ba8e58216749c2858dc1c0b8225b3619a7287
2012-12-19 14:10:07 -08:00
Jenkins
8b770aa55e Merge "Add config option to turn eventlet debug on/off" 2012-12-10 20:37:31 +00:00
Jenkins
1619cee011 Merge "Add config of server start timeouts for probetests" 2012-12-10 17:14:49 +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
Jenkins
4ac6904793 Merge "Improve container-sync docs." 2012-12-01 00:55:44 +00:00
Dan Prince
abcd872394 Updates to use new keystoneclient middleware.
Updates the proxy-server.conf-sample and docs to use
the new Keystoneclient middleware class name.

Change-Id: I3727f7b7328a2513347b8ef257c270126df36d7b
2012-11-28 16:08:05 -05:00
John Dickinson
46f26b3034 added GoLang binding and CDMI to associated projects
Change-Id: I720a0e0e886d25eec52556e8ce93bf9c49f6b452
2012-11-27 09:49:56 -08:00
Samuel Merritt
89a871d42f Improve container-sync docs.
Two improvements: first, document that the container-sync process
connects to the remote cluster's proxy server, so outbound
connectivity is required.

Second, rewrite the behind-the-scenes container-sync example and add
some ASCII-art diagrams.

Fixes bug 1068430.

Bonus fix of docstring in wsgi.py to squelch a sphinx warning.

Change-Id: I85bd56c2bd14431e13f7c57a43852777f14014fb
2012-11-21 14:59:26 -08:00
Samuel Merritt
357b12dc2b Remove IP-based container-sync ACLs from auth middlewares.
The determination of the client IP looked at the X-Cluster-Client-Ip
and X-Forwarded-For headers in the incoming HTTP request. This is
trivially spoofable by a malicious client, so there's no security
gained by having the check there.

Worse, having the check there provides a false sense of security to
cluster operators. It sounds like it's based on the client IP, so an
attacker would have to do IP spoofing to defeat it. However, it's
really just a shared secret, and there's already a secret key set
up. Basically, it looks like 2-factor auth (IP+key), but it's really
1-factor (key).

Now, the one case where this might provide some security is where the
Swift cluster is behind an external load balancer that strips off the
X-Cluster-Client-Ip and X-Forwarded-For headers and substitutes its
own. I don't think it's worth the tradeoff, hence this commit.

Fixes bug 1068420 for very small values of "fixes".

DocImpact

Change-Id: I2bef64c2e1e4df8a612a5531a35721202deb6964
2012-11-16 18:47:06 -08:00
Chmouel Boudjnah
101f566e92 Updating doc reflecting the move of auth_token.
The auth_token middleware has moved, updating the doc.

Change-Id: I8133b876a53d61bf94169cf08c8b1fa6bbf9681a
2012-11-16 12:30:28 +10:00
Jenkins
e9a41ed550 Merge "Remove outdated Debian packaging guide." 2012-11-15 22:15:55 +00:00
Jenkins
6b8f966364 Merge "Better TempAuth storage URL guessing" 2012-11-14 21:10:18 +00:00
Samuel Merritt
bf90ba2de1 Remove outdated Debian packaging guide.
There are 3 sections in there, all useless.

Section 1 tells you how to install Swift packages from the swift-core
PPA. However, the latest version there is ancient.

Section 2 tells you how to build your own Swift packages. However, it
talks about getting the source code from the "debian" branch in bzr,
which is obviously really old.

Section 3 tells you how to take the packages from section 2 and
install them. This isn't too out-of-date, but since section 2 doesn't
work any more, section 3 is useless.

Since stale docs are worse than no docs, there's no current
information in this document, and bringing it up-to-date requires a
whole pile of work, I've chosen to delete it entirely.

Also pulled out a couple references to the PPA elsewhere.

Fixes bug 917385.
Fixes bug 1026145.

Change-Id: I510bd8619531fe110419e5488bd20d3602868d66
2012-11-13 13:06:48 -08:00
Yee
53ab2e150d fix bug1039861, remove license header in doc/source/conf.py.
Change-Id: Iab43ac342faf3722ccab1ed034f08752dbbfaae1
2012-11-11 00:15:39 -08:00
gholt
47ee1d7e17 Better TempAuth storage URL guessing
I know it's just TempAuth, but bug #959953 just caught my eye as
something interesting to solve.

This does a best guess on the storage URL to return for a given
request. It allows $HOST to be used in the storage URL configuration,
where $HOST will resolve to scheme://host:port. It bases the scheme
on how the server is running or on storage_url_scheme if set. The
host:port comes from the request's Host header if it exists, and
falls back to the WSGI SERVER_NAME:SERVER_PORT otherwise.

Fixes: bug #959953
DocImpact

Change-Id: Ia494bcb99a04490911ee8d2cb8b12a94e77820c5
2012-11-10 16:39:25 +00:00
Jenkins
3af76e1096 Merge "statsd timing refactor" 2012-11-07 01:27:56 +00:00
Michael Barton
3586f829b0 statsd timing refactor
Change-Id: I99d9ddfbcad0f88e75c49235c8317ea97237d4e4
2012-11-06 15:39:25 -08:00
John Dickinson
ec75d1e343 add OPTIONS to proxy_logging configs and docs
Change-Id: I77e1d7fdcf217826402beeb7d583e3c7279c416c
2012-11-06 15:13:01 -08:00
Florian Hines
de09cbe6f4 Extended documentation for using custom loggers
Change-Id: I78a5c109c9440df752e390698502f57d4392fb67
2012-10-26 17:59:42 -05:00
Jenkins
1c05d62bed Merge "Adding CORS support" 2012-10-25 02:23:57 +00:00
Scott Simpson
74b27d504d Adding CORS support
Change-Id: I894473994cdfea0996ad16e7619aff421f604abc
2012-10-23 14:48:59 -05:00
Samuel Merritt
851bbe2ea9 Track unlinks of async_pendings.
It's not sufficient to just look at swift.object-updater.successes to
see the async_pending unlink rate. There are two different spots where
unlinks happen: one when an async_pending has been successfully
processed, and another when the updater notices multiple
async_pendings for the same object. Both events are now tracked under
the same name: swift.object-updater.unlinks.

FakeLogger has now sprouted a couple of convenience methods for
testing logged metrics.

Fixed pep8 1.3.3's complaints in the files this diff touches.

Also: bonus speling and, grammar fixes in the admin guide.

Change-Id: I8c1493784adbe24ba2b5512615e87669b3d94505
2012-10-23 10:27:21 -07:00
Derek Higgins
387744197e Fixing alterations to sys.path
Fixes bug 1064249

sys.path should be extended not appended to

Change-Id: I3404a50b16b843b47f5082676029a4dd3b03f812
2012-10-09 09:58:06 +01:00
Michael Barton
c7e2e9a1f3 remove configobj from deps
Change-Id: Ie566e712ba0d3dca543e99efbdb576b19623e73c
2012-10-08 14:20:00 -07:00
Jenkins
026846c7b5 Merge "local WSGI Request and Response classes" 2012-10-03 20:49:05 +00:00
Darrell Bishop
5582f166c2 Allow underscores in account/user in tempauth via encoding.
This patch introduces a new user format to tempauth which starts with
"user64_" and in which the account and user are base64 encoded (sans
padding equal signs):

user64_<account_b64>_<user_b64> = <key> [group] [group] [...] [storage_url]

This allows unambiguous parsing and adds the ability to have a user or
account name containing underscores.

The handling of tempauth configuration is fully backward compatible and
this only adds new, optional functionality.

Also beefed up unit tests to get full coverage of the user parsing code
in tempauth's __init__().

Change-Id: Id06304934ab8055a28921f2e1aa3c58a2036d8f8
2012-10-02 09:05:22 -07:00
Michael Barton
5e3e9a882d local WSGI Request and Response classes
This change replaces WebOb with a mostly compatible local library,
swift.common.swob.  Subtle changes to WebOb's API over the years have been a
huge headache.  Swift doesn't even run on the current version.

There are a few incompatibilities to simplify the implementation/interface:
 * It only implements the header properties we use.  More can be easily added.
 * Casts header values to str on assignment.
 * Response classes ("HTTPNotFound") are no longer subclasses, but partials
   on Response, so things like isinstance no longer work on them.
 * Unlike newer webob versions, will never return unicode objects.

Change-Id: I76617a0903ee2286b25a821b3c935c86ff95233f
2012-09-28 14:48:48 -07:00