8a6922b73e5bbb10dc045129099d4ac527bb4551
Commit Graph

2252 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
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
Jenkins
fc1c5a5fd0 Merge "remove configobj from deps" 2012年10月09日 00:00:03 +00:00
Victor Rodionov
4bc1b1f185 fix typing in swift/common.db, swift/container/server.db
Change-Id: I5efb3712faa7d159be2d86913fa5fbdf09b7f98f
2012年10月09日 01:37:46 +04:00
Michael Barton
c7e2e9a1f3 remove configobj from deps
Change-Id: Ie566e712ba0d3dca543e99efbdb576b19623e73c
2012年10月08日 14:20:00 -07:00
Darrell Bishop
e2b03267fd Fix two edge cases with Range: header
This fixes swob to handle "Range: bytes=-X" where X > len(content); ex.
"Range: bytes=-17" when the object has 10 bytes. Based on the RFC, the
range is satisfiable and all bytes should be returned.
It also fixes "Range: bytes=-0" to be, correctly, not satisfiable. In
addition, this case's response has Content-Length: 0 and has a zero-byte
body.
It also fixes an existing regression in swob for the case
"Range: bytes=100-" for a body of length < 100 (Content-Length was
negative and the body was returned).
The relevant RFC is 2616, section 14.35.1.
Change-Id: Ib3dc672e083173eb970c10801283813623f26e0e
2012年10月07日 15:53:08 -07:00
Jenkins
1ef17d8284 Merge "add support for custom log handlers" 2012年10月05日 21:34:48 +00:00
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
2012年10月05日 15:56:34 -05:00
Greg Lange
e7f3a9865e internal client unicode paths
made internal client handle unicode path parts by adding make_path method
fixed pep8 problems in internal client and its test
moved internal client unit test file to correct directory
Change-Id: Id1c81c9cb0db05342e4e8a8393db93552fda4647
2012年10月05日 18:57:24 +00:00
Victor Rodionov
5b02fded4e cleanup double repeated response.headers['X-Timestamp'] = file.metadata['X-Timestamp']
in swift.obj.server.HEAD
Change-Id: Ie7cf853319589db7c48836dd5d7fd5e68cb009cd
2012年10月04日 02:47:22 +04:00
Jenkins
6801920785 Merge "close_swift_conn is a method of swift.proxy.controllers.base.Controller, not function" 2012年10月03日 21:25:21 +00:00
Jenkins
026846c7b5 Merge "local WSGI Request and Response classes" 2012年10月03日 20:49:05 +00:00
Victor Rodionov
0b756d75c4 close_swift_conn is a method of swift.proxy.controllers.base.Controller, not function
Change-Id: I84dd7bc2fc5ebd1190a7184f42fc5ecf5fd7b4d3
2012年10月04日 00:48:25 +04:00
Darrell Bishop
57ebd17910 Warn when killing fails with EPERM
Have swift-init warn when the running user doesn't have permissions to
signal processes. Fixes bug 1017494.
Change-Id: Icb9048ab36f1ca73bb93b11c9c2aed882d99dfa7
2012年10月03日 08:28:36 -07:00
Jenkins
550e876869 Merge "Allow underscores in account/user in tempauth via encoding." 2012年10月02日 23:42:59 +00:00
Jenkins
a0d96b184d Merge "catch no such file in hash_suffix" 2012年10月02日 18:49:02 +00:00
David Goetz
6f9473d31d catch no such file in hash_suffix
Change-Id: I70ee55d12b1ca91fdfe4891c3f82ab0f832f15d3
2012年10月02日 10:42:28 -07: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
Jenkins
f0bd91dd14 Merge "allow replicator run_once to check specific devices/partitions" 2012年09月28日 21:24:36 +00:00
Jenkins
e6d720cde5 Merge "Fix errors with fdatasync on BSD platforms" 2012年09月28日 21:13:36 +00:00
David Goetz
a6c44d2764 allow replicator run_once to check specific devices/partitions
Change-Id: If45f77fda269ae6e251579542e70eb71bd11fe2a
2012年09月28日 12:24:15 -07:00
Brian Cline
f91198d09b Fix errors with fdatasync on BSD platforms
Abstracts fdatasync/fsync/fcntl into an FsyncWrapper to determine, the
first time it is used, which fsync-like call is supported on the host
platform:
 - Linux: use fdatasync(fd) as Swift already does today.
 - Darwin: use fcntl(fd, F_FULLFSYNC), since Darwin provides the
 F_FULLFSYNC flag when you wish to fsync data you care about, ensuring
 that it is written to disk and not simply a buffer.
 - BSD/Other: use fsync for non-Darwin BSDs and as a fallback for other
 platforms.
Change-Id: Ibcfdeef7843b2f10cf8a17a6b989038ea2364376
2012年09月28日 10:01:03 -05:00
Michael Barton
bc60cc1160 base controller GETorHEAD refactor
simplify, reduce the amount of code
Change-Id: I443a43030291f35a0b283cdd036cb09ec2ef9444
2012年09月27日 15:19:27 -07:00
Jenkins
be8777965f Merge "replace a value set with utils.TRUE_VALUES" 2012年09月27日 17:40:06 +00:00
John Dickinson
b530e62313 updated with 1.7.5 version bump and changelog update
Change-Id: I04be779539b2bff76e2f614f50ddba2592fe4a36
2012年09月25日 14:37:45 -07:00
gholt
7e0c4eb152 Fixed leak on 499s
This fixes an issue where Request objects (and related objects) were
not getting garbage collected when a 499 (client disconnect) occurred
for responses that still would have had more than the proxy server's
client chunk size left to send.
Fixed bug #1055834
Change-Id: Ib7b5fffe970dcdec60b90a9bdcd67c49b68fb914
2012年09月25日 19:23:31 +00:00
Darrell Bishop
57b10cd38c Restore old SIGPIPE handler in a proxy server test.
I think not doing this was setting the SIGPIPE handler to signal.SIG_DFL
instead of the Python default of signal.SIG_IGN. This could cause other
tests which make a client stop reading before all data "chunks" are read
to fail harder than they should (i.e. the SIGPIPE there is benign and
even expected--the other side of the socket really did get closed
early).
Change-Id: I946a1913714a34ec677b701a2b5724bc8b715f70
2012年09月25日 11:22:11 -07:00
Jenkins
4b858c1860 Merge "Gracefully handle stdin flush failure on BSD" 2012年09月23日 05:12:16 +00:00
Brian Cline
87c1c5dce9 Gracefully handle stdin flush failure on BSD
Catches an IOError that is thrown when starting Swift on BSD-based
platforms, as the underlying system call to flush returns errno 9 (bad
file descriptor), whereas on Linux it succeeds.
Change-Id: Ic143d2fe6c3e1e0b39794958b40b0f5efdc17c06
2012年09月21日 14:17:59 -05:00
Brian Cline
da99c3390b Only set TCP_KEEPIDLE where supported
Resolves an issue preventing Swift from starting on BSD-based platforms
that do not have this TCP flag (FreeBSD, OSX/Darwin, OpenBSD); identical
to Glance bug 879195, change I2f062a34, Glance commit efcdac36
(originally reported and patched by Brian Waldon).
Change-Id: Ifd696fe1080464d060e608c075ad0c113baab5ab
2012年09月21日 11:06:18 -05:00
John Dickinson
8a7afa535f 1.7.2. changelog and version bump to 1.7.3-dev
Change-Id: Id398b4c0764ca0995cec03c5f0ea6198ef877ade
2012年09月18日 15:45:40 -07:00
Jenkins
73aa3cbda1 Merge "Fix bug where serialization_format is ignored" 2012年09月18日 18:54:11 +00:00
Jenkins
b0a2f795f4 Merge "builder.add_devs gets next id if not provided" 2012年09月18日 18:53:43 +00:00
gholt
c97fb37e10 Fix bug where serialization_format is ignored
Change-Id: I5a5ac8b5f18e077105ab12e9b1f0ccafac3983f7
2012年09月18日 18:24:47 +00:00
dk647
568b61af22 replace a value set with utils.TRUE_VALUES
replace a value set with utils.TRUE_VALUES, and fix some pep8 issues
Change-Id: If4db41d0d538afddee0d78449d229ce319c5efba
2012年09月18日 16:16:24 +08:00
Dan Prince
411c7cb8ff Add README.md to the tarball.
Fixes LP Bug #1051125
Change-Id: If1f96e1d759276cafd5378b4e74b0dbcb1fa2358
2012年09月14日 20:42:05 -04:00
Florian Hines
c4f5761101 builder.add_devs gets next id if not provided
Have builder.add_devs get the next id to use when adding a new device
if its not specified in the dict.
Change-Id: I5a0defab43f5cfc5d997080bfd8563bfe72368ad
2012年09月14日 16:11:50 -05:00
Jenkins
30337a8875 Merge "added errno.EINVAL check to fallocate" 2012年09月14日 20:50:20 +00:00
John Dickinson
bfc114bc1d new more helpful README
Change-Id: Ie5e88178e061955aea8759e5451a2d33ccc76511
2012年09月13日 20:59:41 -07:00
John Dickinson
343968b2d3 added disable_fallocate info to docs
Change-Id: I8130e258d77f47bfa28ecf79a51a6e34671ada22
2012年09月12日 11:15:25 -07:00
John Dickinson
2ca379d40f added errno.EINVAL check to fallocate
On some systems (eg Illumos), posix_fallocate() returns
EINVAL when the underlying filesystem doesn't support the
operation. On Linux, the fallocate() call returns
EOPNOTSUPP.
The need for this patch was revealed by Victor Rodionov
<victor.rodionov@nexenta.com>.
Change-Id: I06fa9d49e7ec4084135843b7e0c91948dc098d27
2012年09月12日 09:00:10 -07:00
Jenkins
a7e6d44706 Merge "Adds Error Handling to swift-drive-audit for missing or unreadable /var/log/kern.log" 2012年09月11日 20:54:46 +00:00
Jenkins
5c67f1a695 Merge "container_info returns a dict" 2012年09月11日 20:24:13 +00:00
Andy McCrae
463da7e170 Adds Error Handling to swift-drive-audit for missing or unreadable /var/log/kern.log
Fixes Bug 1049081
Change-Id: If977080350cc5cdb6bc633b6af7d3c490ed23d46
2012年09月11日 16:23:32 +00:00
David Goetz
d24e280bf4 obj replicator speed up
Change-Id: If02b573353dedea9c2368ce4733fe97599229b2e
2012年09月10日 15:12:39 -07:00
Michael Barton
063789b14e container_info returns a dict
This change refactors container_info to return a dict instead of a tuple
with 6 (and counting...) values.
Also adds container size to cached info.
Change-Id: If68a06ab170504fbf07323354f3d0e073850493d
2012年09月09日 03:18:26 -07:00
Jenkins
3482eb26f9 Merge "swift constraints are now settable via config" 2012年09月07日 23:21:47 +00:00
Jenkins
67f21f5e4a Merge "Breakout search_devs & add get_builder() for reuse" 2012年09月07日 22:09:58 +00:00
Jenkins
d96a7a89f4 Merge "format some code according to pep8" 2012年09月07日 22:03:03 +00:00
Jenkins
aee707b78d Merge "Fix pep8 issues" 2012年09月07日 22:01:48 +00:00