18c03d9aa77880f2f39af11dc27cdcdac3f65684
207 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Christian Schwede
|
28c75db0e7 |
Account quotas
Add a new middleware implementing account quotas. This middleware blocks write requests (PUT, POST) if a given quota (in bytes) is exceeded while DELETE requests are still allowed. Quotas are stored in the x-account-meta-quota-bytes metadata entry. Write requests to this metadata setting are only allowed for resellers. Change-Id: I57fd7c6209f34cc79d4bab72d500d43ba2a62083 |
||
|
Sergey Lukjanov
|
7d5095c122 |
Support listing endpoints for an object.
Implements blueprint list-endpoints. DocImpact: new middleware list_endpoints. Change-Id: I0c4911ff726abd4cb8ce2b6245c99786ad46b410 |
||
|
David Goetz
|
5d73da158b |
Static Large Object Support
DocImpact Change-Id: I7edaa5e44208ab451f7f7566b64bb571b8eea1f9 |
||
|
Jenkins
|
a06c71c624 | Merge "Add cache=swift.cache for authtoken example." | ||
|
Jenkins
|
1dc38b4672 | Merge "timing-based affinity sorting for primary replicas" | ||
|
Jenkins
|
249a65461e | Merge "Adding speed limit options for DB auditor" | ||
|
Samuel Merritt
|
a4a047c4ec |
Fix descriptions in sample configs.
Change-Id: I7aca3c6cafd9391031f7a10cc233f99e81ee0393 |
||
|
Chmouel Boudjnah
|
e69f3bef8f |
Add cache=swift.cache for authtoken example.
- Things swill go badly with swift if we leave the default to authtoken to use its own memcache cache connection based python-memcache c based binding. Change-Id: I293b875acdcb06e5a7a0cfa9a9bb5d7678675da0 |
||
|
yuan-zhou
|
09370862ca |
Adding speed limit options for DB auditor
Fix bug 1129760 Without speed limit, DB auditor will likely consume high CPU% on storage node. That will highly impact the cluster's performance. This patch adds two options for account/container auditor: - containers_per_second: Maximum containers audited per second - accounts_per_second: Maximum accounts audited per second DocImpact Change-Id: I9faa506438185a83ca77db4906969328624d015f |
||
|
John Dickinson
|
69917347cf |
timing-based affinity sorting for primary replicas
This changes the way primary replicas can be sorted on GET requests. Previously, replicas were shuffled. Now, if configured, the replicas are sorted based on the most recent connection time data to that node. This patch adds a config value that changes the sorting method. get_more_nodes() (ie handoffs) is unaffected by this patch because sorting by affinity would break the durability provided by the current as-unique-as-possible handoff selection. Timing data is collected for each node each time the proxy makes a connection to that node (IP address). If timing data for a node doesn't exist, then it is assumed at -1 (ie will sort earlier) so that timing data can be collected for that node. Change-Id: I837fa21c3a566b10cce33eb75788665e1d01cd8a |
||
|
Jenkins
|
23f33b2069 | Merge "Make statsd sample rate behave better." | ||
|
Jenkins
|
3df9229dae | Merge "Use a doubled proxy-logging instead of each middleware handling it differently (if at all)" | ||
|
David Goetz
|
a622349eda |
Use a doubled proxy-logging instead of each middleware handling it
differently (if at all) Adding a swift.source to wsgi pre_auth funcs and all middleware that makes subrequests to proxy server. NOTE: This change will result in a change in the number of proxy logs made for staticweb, formpost, tempurl, and any other middleware that performs sub requests (including swauth and SOS). Please see docs for details. DocImpact Change-Id: I80cf2806add1c3d34054147e2515944be340455b |
||
|
Jenkins
|
c0e8ad609b | Merge "Allow change the endpoint_type when use swift-dispersion tools" | ||
|
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 |
||
|
gholt
|
85529531d6 |
Remove tempauth allowed_sync_hosts conf option
Seems we missed these references when committing
|
||
|
Mehdi Abaakouk
|
a1395ec672 |
Allow change the endpoint_type when use swift-dispersion tools
Fixes bug 1102319 DocImpact Change-Id: I8fb0417ab9468e97ed01a6cb1e262630905e7f29 |
||
|
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 |
||
|
David Goetz
|
2f663ff9a0 |
Bulk Requests: auto extract archive and bulk delete middleware.
Fix small problem in ratelimiting middleware. DocImpact Change-Id: Ide3e0b9f4887626c30cae0b97eb7e2237b1df3ed |
||
|
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 |
||
|
Jenkins
|
8b770aa55e | Merge "Add config option to turn eventlet debug on/off" | ||
|
Jenkins
|
1619cee011 | Merge "Add config of server start timeouts for probetests" | ||
|
Jenkins
|
067335a6e7 | Merge "Add dispersion report flags to limit reports" | ||
|
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 |
||
|
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 |
||
|
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 |
||
|
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 |
||
|
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 |
||
|
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 |
||
|
John Dickinson
|
ec75d1e343 |
add OPTIONS to proxy_logging configs and docs
Change-Id: I77e1d7fdcf217826402beeb7d583e3c7279c416c |
||
|
Scott Simpson
|
74b27d504d |
Adding CORS support
Change-Id: I894473994cdfea0996ad16e7619aff421f604abc |
||
|
Jenkins
|
1ef17d8284 | Merge "add support for custom log handlers" | ||
|
Florian Hines
|
92826d0602 |
add support for custom log handlers
Add a hook to get_logger to run custom functions to add custom log handlers or the like. Change-Id: Ib04b12939dcac7e4ad6453dea9795682044c6ae0 |
||
|
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 |
||
|
John Dickinson
|
a2ac5efaa6 |
swift constraints are now settable via config
Change previously hard-coded constants into config variables. This allows deployers to tune their cluster more specifically based on their needs. For example, a deployment that uses direct swift access for public content may need to set a larger header value constraint to allow for the full object name to be represented in the Content- Disposition header (which browsers check to determine the name of a downloaded object). The new settings are set in the [swift-constraints] section of /etc/swift/swift.conf. Comments were also added to this config file. Cleaned up swift/common/constraints.py to pass pep8 1.3.3 Funtional tests now require constraints to be defined in /etc/test.conf or in /etc/swift/swift.conf (in the case of running the functional tests against a local swift cluster). To have any hope of tests passing, the defined constraints must match the constraints on the tested cluster. Removed a ton of "magic numbers" in both unit and functional tests. Change-Id: Ie4588e052fd158314ddca6cd8fca9bc793311465 |
||
|
Darrell Bishop
|
4a2ae2b460 |
Upating proxy-server StatsD logging.
Removed many StatsD logging calls in proxy-server and added
swift-informant-style catch-all logging in the proxy-logger middleware.
Many errors previously rolled into the "proxy-server.<type>.errors"
counter will now appear broken down by response code and with timing
data at: "proxy-server.<type>.<verb>.<status>.timing". Also, bytes
transferred (sum of in + out) will be at:
"proxy-server.<type>.<verb>.<status>.xfer". The proxy-logging
middleware can get its StatsD config from standard vars in [DEFAULT] or
from access_log_statsd_* config vars in its config section.
Similarly to Swift Informant, request methods ("verbs") are filtered
using the new proxy-logging config var, "log_statsd_valid_http_methods"
which defaults to GET, HEAD, POST, PUT, DELETE, and COPY. Requests with
methods not in this list use "BAD_METHOD" for <verb> in the metric name.
To avoid user error, access_log_statsd_valid_http_methods is also
accepted.
Previously, proxy-server metrics used "Account", "Container", and
"Object" for the <type>, but these are now all lowercase.
Updated the admin guide's StatsD docs to reflect the above changes and
also include the "proxy-server.<type>.handoff_count" and
"proxy-server.<type>.handoff_all_count" metrics.
The proxy server now saves off the original req.method and proxy_logging
will use this if it can (both for request logging and as the "<verb>" in
the statsd timing metric). This fixes bug 1025433.
Removed some stale access_log_* related code in proxy/server.py. Also
removed the BaseApplication/Application distinction as it's no longer
necessary.
Fixed up the sample config files a bit (logging lines, mostly).
Fixed typo in SAIO development guide.
Got proxy_logging.py test coverage to 100%.
Fixed proxy_logging.py for PEP8 v1.3.2.
Enhanced test.unit.FakeLogger to track more calls to enable testing
StatsD metric calls.
Change-Id: I45d94cb76450be96d66fcfab56359bdfdc3a2576
|
||
|
gholt
|
c509ac2371 |
Added ability to disable fallocate
Change-Id: Id8872c581ed23378a8e14cbf3bf049b5c0d21577 |
||
|
Jenkins
|
6e524a3a72 | Merge "Misc. swift-bench improvements." | ||
|
Jenkins
|
e375e7edd7 | Merge "Do not use pickle for serialization in memcache, but JSON" | ||
|
Darrell Bishop
|
9bda92d54a |
Misc. swift-bench improvements.
swift-bench now honors the environment variables, ST_AUTH, ST_USER, and ST_KEY like python-swiftclient does. Added --lower-object-size (or -l) command-line option which, if specified, will turn a specified --object-size into --upper-object-size. It will raise a ValueError if --object-size is not specified or is <= --lower-object-size. BenchController how handles SIGINT (KeyboardInterrupt) similarly to the swift command-line client: the first Ctrl-C will make it fast-track to completion (no new PUT or GET operations are started, but everything PUT is DELETE'ed). A second Ctrl-C will immediately exit. The behavior for SIGTERM is unchanged (a single SIGTERM will immediately terminate the process). Added a sample configuration file for swift-bench, with documenting comments. Change-Id: I6f394ad995300fc8af3d565d95c3b45559ee510a |
||
|
Darrell Bishop
|
1a6c42fccd |
Fix when rate_limit_after_segment kicks in.
If rate_limit_after_segment was 10 in the proxy config, then after 10 segments were coughed up by _load_next_segment() with no calls to sleep(), the 11th segment would not trigger a sleep() call. The 12th segment triggered a sleep(0) call, but it was only after the 13th segment was loaded that an actual rate-limiting (non-zero) sleep got called. With this patch, a rate_limit_after_segment of 10 will start sleeping the correct amount after the 11th segment. Updated proxy-server.conf-sample with rate_limit_after_segment and rate_limit_segments_per_sec. Change-Id: I937c366996e6d6ab47c614d6db470e3be9657c07 |
||
|
Vincent Untz
|
e1ff51c045 |
Do not use pickle for serialization in memcache, but JSON
We don't want to use pickle as it can execute arbitrary code. JSON is safer. However, note that it supports serialization for only some specific subset of object types; this should be enough for what we need, though. To avoid issues on upgrades (unability to read pickled values, and cache poisoning for old servers not understanding JSON), we add a memcache_serialization_support configuration option, with the following values: 0 = older, insecure pickle serialization 1 = json serialization but pickles can still be read (still insecure) 2 = json serialization only (secure and the default) To avoid an instant full cache flush, existing installations should upgrade with 0, then set to 1 and reload, then after some time (24 hours) set to 2 and reload. Support for 0 and 1 will be removed in future versions. Part of bug 1006414. Change-Id: Id7d6d547b103b4f23ebf5be98b88f09ec6027ce4 |
||
|
gholt
|
a1a4d35362 |
Logging improvements: handoffs and thread locals
A warning log line is emitted whenever the proxy has to use a handoff node. Monitoring these warnings can indicate a problem within your cluster; however, you can disable these log lines by setting the proxy conf's log_handoffs to false. While working on this, I also noticed why many proxy log lines did not have txn_id and client_ip -- subcoroutines. Now the logger thread locals are copied to the subcoroutines. Change-Id: Ibac086e1b985f566c068d083620287509de35da8 |
||
|
Jenkins
|
a9887c0e15 | Merge "Move swift_auth middleware from keystone to swift." | ||
|
Vincent Untz
|
faff4ae769 |
Forbid substrings based on a regexp in name_filter middleware
In comments from https://review.openstack.org/8798 it was raised that it might make sense to forbid some substrings in the name_filter middleware. There is now a new forbidden_regexp option for the name_filter middleware to specify which substrings to forbid. The default is "/\./|/\.\./|/\.$|/\.\.$" (or in a non-regexp language: the /./ and /../ substrings as well as strings ending with /. or /..). This can be useful for extra paranoia to avoid directory traversals (bug 1005908), or for more general filtering. Change-Id: I39bf2de45b9dc7d3ca4d350d24b3f2276e958a62 DocImpact: new forbidden_regexp option for the name_filter middleware |
||
|
Florian Hines
|
5f72a8db4a |
Fix Dispersion report and swift-bench on saio
We're still using saio:11000 in a few spots so a few things don't work out of the box on the saio. Fixes bug #1024561 Change-Id: I226de54c2785b0d0b681c8d0cc24260adbd3d663 |
||
|
Chmouel Boudjnah
|
afa4f70024 |
Move swift_auth middleware from keystone to swift.
- Rename it to keystoneauth for consistenties. - Implements blueprint keystone-middleware. Change-Id: I208fecdf3ee991694b4239f065032324d297fd35 |
||
|
Vincent Untz
|
1125368624 |
Remove ambiguity in memcache_servers documentation
The documentation could be understood like the following: memcache_servers from memcache.conf is always used if set, even if memcache_servers in proxy-server.conf is set. This is clearly not the case, as proxy-server.conf has a higher priority if it memcache_servers is set there. Change-Id: I967c7e80796a0e296c5c65bd097df1669d16203e |
||
|
Victor Rodionov
|
13e4de1899 |
Patch for Swift Solaris (Illumos) compability.
* Add new configuration option log_address. Change-Id: I636bd4116687629c997b70a0d804b7ed4bc46032 |
||
|
Samuel Merritt
|
28cd9b2da8 |
Make object server's caching more configurable.
The object server had a constant KEEP_CACHE_SIZE = 5*1024*1024;
unauthenticated GET requests for files smaller than KEEP_CACHE_SIZE
would not evict the file from the kernel's buffer cache after it was
read from disk.
Now that hardcoded constant is a configuration parameter
("keep_cache_size"), and now there is also another parameter called
"keep_cache_private". If set, then both authenticated and
unauthenticated GET requests for small files will not evict the data
from the buffer cache. The default values are 5 MiB and False,
respectively, so the default behavior is the same.
Bonus: the "mb_per_sync" parameter is now documented in the deployment
guide.
Change-Id: I9a11dbe861f4c23535c6aa82a9111a6fe2db2a59
|