8a6922b73e5bbb10dc045129099d4ac527bb4551
Commit Graph

2252 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Jenkins
0ab4f2ab4a Merge "add UDP protocol support for logger" 2012年07月12日 20:55:07 +00:00
Jenkins
47385a2d8f Merge "Validate devices and partitions to avoid directory traversals" 2012年07月09日 21:57:08 +00:00
gholt
4a9d19197c Updated probe tests
The probe tests were woefully out of date with all the changes that
have ocurred since they were written. I've updated most of them and
removed some that are hopeless outdated.
I also greatly improved the timing issues (hopefully completely
solved them? I ran them 25 times with no problems) and made them pep8
1.3.1 safe.
Change-Id: I8e9dbb6e7d6e04e293843b1dce1ded99d84e0348
2012年07月06日 23:30:12 +00:00
Chmouel Boudjnah
afa4f70024 Move swift_auth middleware from keystone to swift.
- Rename it to keystoneauth for consistenties.
- Implements blueprint keystone-middleware.
Change-Id: I208fecdf3ee991694b4239f065032324d297fd35
2012年07月05日 14:36:14 -04:00
Vincent Untz
cc1907eef5 Validate devices and partitions to avoid directory traversals
swift.common.utils.validate_device_partition is a new function to check
that a device and a partition are valid. This means that they don't
contain '/' and are not '.' or '..'.
We use this new function every time we get devices and partitions from a
request.
Fix bug 1005908
Change-Id: Ia545ba8f877e85b4b576d6d7d09d890877ea6d34
2012年07月05日 13:35:30 +02:00
gholt
d8c2d0e1bc FormPost logging bugfix and slight refactor
In the interest of getting us to pep8 1.3.1 compliance I also fixed
all violations in the two files I was modifying anyway.
Fixes bug 1019051
Change-Id: I52eb7d59d2e2810a8cee2461f7ca869124e734e7
2012年07月03日 19:04:40 +00:00
Jenkins
329b1da07b Merge "Fixed bug 1011636 with segmented objects" 2012年07月03日 16:40:20 +00:00
Jenkins
501a3e4929 Merge "Remove ambiguity in memcache_servers documentation" 2012年07月03日 16:37:24 +00:00
Jenkins
217676c06c Merge "swift-bench should be able to use auth version 2.0" 2012年07月02日 18:49:13 +00:00
gholt
f2a61ab50e Fixed bug 1011636 with segmented objects
The X-Object-Manifest header value should be url encoded to allow for
"special" characters to be used. This fix decodes such encoding. A
corresponding fix to python-swiftclient (and any other clients) needs
to be made to url encode the header value when sending.
I also fixed any pep8 1.3.1 violations I found in the test I modified
to verify this.
Change-Id: I67f23dec1dc95ee37354dfdd9897f34758135ee6
2012年06月28日 23:25:27 +00:00
Iryoung Jeong
49a9cc7e68 Made ranged requests on large objects working correctly when size of manifest file is not 0 byte.
Fixed bug 969411
Ranged GET request checked wheter the object is large objects only when response is 416 Requested Range Not Satisfiable.
All ranged GET requests should check the object is large object or not because size of the manifest file can be larger than 0.
Change-Id: Ia3632252d6879a773be881149c10ce0f5ffbcd82
2012年06月29日 06:58:41 +09:00
Jenkins
c16b70bb3d Merge "Remove hard coded man page paths." 2012年06月28日 15:31:21 +00:00
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
2012年06月28日 16:09:10 +02:00
Iryoung Jeong
c67e56848c Use buffered gzip stream with python 2.7.
- Fixes bug 898169.
- It's possible to make GzipFile inherits io.BufferedIOBase in python
 2.6, but IMO it's better let people to use 2.7 if they really need
 this feature.
Change-Id: I4c6e4858e3f616af892e7f4fa6daae0f6ee31723
2012年06月28日 08:23:28 +00:00
Kota Tsuyuzaki
f0eb25a973 add UDP protocol support for logger
When a syslog daemon fails and SysLogHandler cannot reconnect to
it, server processes (proxy, container, object, and more)
would start consuming 100 % CPU and stop responding to requests.
It is because the server process go into an infinite loop if they
fail to reconnect to /dev/log.
This problem happens only when using unix_sockets.
This change enables us to use syslog without unix_sockets and fixes bug 780025.
Change-Id: Ibcc99a1a148b1008036146bf3bd079a9be24982c
2012年06月27日 23:48:40 -07:00
Jenkins
fcab7b7358 Merge "Fixes for probe tests" 2012年06月27日 16:45:03 +00:00
Jenkins
7538ff496a Merge "use sort_key to compare the number of partitions the device wants" 2012年06月27日 16:42:00 +00:00
Jenkins
04b77fdf4d Merge "Make proxy-logging more like eventlet.posthook" 2012年06月27日 16:41:59 +00:00
Jenkins
57008e553a Merge "Patch for Swift Solaris (Illumos) compability." 2012年06月27日 16:41:43 +00:00
gholt
be79b0884e Fixes for probe tests
Updated the imports and added a head_account to the "is the cluster
started yet?" checks. Hopefully this fixes the notorious timing
issues of these tests where auth answers requests just a bit before
the rest of the cluster is ready.
Fixes bug 1014931
Change-Id: Iea1d62db2317560371da49af5e94a0279b646294
2012年06月27日 05:09:53 +00:00
Dan Prince
69fd05f439 Remove hard coded man page paths.
Fixes LP Bug #1016656.
Change-Id: I22455d27cb82830dabd4fb0677da26915a60eb85
2012年06月22日 13:05:53 -04:00
MORITA Kazutaka
a4ebc465c3 use sort_key to compare the number of partitions the device wants
Fixes bug 1016140.
Change-Id: I0c98561f58f80408064ea178c6d6e8889604cddb
2012年06月22日 01:40:03 +09:00
Samuel Merritt
67af56b156 Make swift-get-nodes -a show all handoffs.
Commit 95786e5 made swift-get-nodes only output N handoff nodes, where
N is the ring's replica count. This change leaves that behavior in
place as the default, but adds the option -a/--all to print all the
handoff nodes.
This is handy if you're consuming the output with a script, e.g. if
you're doing some analysis of the distribution of primary+handoff
nodes for a particular set of things.
Change-Id: Ie0253575bb21ccf25559a1c5fd20570a58a2d9fa
2012年06月20日 12:45:34 -07:00
Jenkins
cc73f5cbe0 Merge "Added config options for rate limiting of large object downloads." 2012年06月20日 18:12:48 +00:00
Jenkins
609f9059c2 Merge "check disk failure before syncing for each partition" 2012年06月19日 18:15:33 +00:00
Victor Rodionov
13e4de1899 Patch for Swift Solaris (Illumos) compability.
* Add new configuration option log_address.
Change-Id: I636bd4116687629c997b70a0d804b7ed4bc46032
2012年06月19日 15:38:56 +04:00
Greg Lange
f4c319b94c Made dispersion report work with any replica count other than 3.
This changes the JSON output keys missing_one and missing_two to
missing_1 and missing_2 (if there are at least 2 replicas), drops
the missing_all key, and can add more missing_x keys depending on
the replica count. We will definitely need to post a prominent
notice of this change with the next release.
bug 862816
Change-Id: Ib747d944476638c33ee1d876b8f9db28953826e2
2012年06月18日 20:15:51 +00:00
MORITA Kazutaka
50806efdba check disk failure before syncing for each partition
If disk failure happens while object replication is ongoing,
object-replicator could replicate objects from other nodes to the root
file system. It is because object-replicator does no mount check
(error check) at all after collect_jobs() is called, and it executes
rsync based on the old partition information in update().
This change prevents many objects from being written to the root file
system wrongly and fixes bug 1014545.
Change-Id: Icf740a2683e360df89eccb71b269977f294340b9
2012年06月18日 18:27:28 +09:00
gholt
8b778c706a Make proxy-logging more like eventlet.posthook
The old use of Eventlet's posthook process meant that responses that
forgot to include content-length or transfer-encoding headers would
get one tacked on, if Eventlet could guess what was probably meant. I
added a bit of that logic into proxy-logging now as we saw some
errors resulting from this.
Fixes Bug #1012714
Change-Id: I671453eaf3704eab814ff12c4625ba7d749cc7ed
2012年06月13日 15:11:32 +00:00
François Charlier
ef3e556b72 swift-bench should be able to use auth version 2.0
Fixes Bug #1011727
Change-Id: I6681bd85a5ddb82a1059913ae90696e5994aa906
2012年06月13日 09:06:57 +02:00
gholt
95786e577c Update swift-get-nodes to return fewer more_nodes
Changed swift-get-nodes to just return up to replica_count of
more_nodes instead of all of them. When you have thousands of drives,
returning all possible handoff nodes is pretty crazy. :)
Change-Id: I864e7243726ca3ef2ac08c4ab660a05789f37878
2012年06月13日 01:56:43 +00:00
Jenkins
c0e7c38c9f Merge "Make object server's caching more configurable." 2012年06月12日 11:01:16 +00:00
Jenkins
22624aa50a Merge "added printing of 404s to dispersion report; fixed small, unrelated bug" 2012年06月11日 23:42:43 +00:00
Jenkins
429c285c96 Merge "Align tox.ini and fix coverage jobs in jenkins." 2012年06月11日 18:44:46 +00:00
Jenkins
8709ea7b1b Merge "Remove swift.common.client from here." 2012年06月11日 17:28:03 +00:00
Monty Taylor
e7180a5876 Align tox.ini and fix coverage jobs in jenkins.
The jenkins coverage jobs expect there to be a .coverage file, so deleting
it is a bad idea. Also, coverage erase will do that for us.
While we're in there, update tox.ini and setup.cfg to the latest.
Change-Id: Icd0a8fc66a5146e0d94f62a9f65a4536981d2916
2012年06月08日 20:05:14 -04:00
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
2012年06月07日 17:12:11 -07:00
Greg Lange
27455cb15b added printing of 404s to dispersion report; fixed small, unrelated bug
also fixed bug where in error_log where identifier wasn't being set to anything meaningful, set it to the right thing
bug 612722
Change-Id: I53f237ea0db2a5b2b8979a7b41189faf1275e861
2012年06月07日 21:15:18 +00:00
Greg Lange
6987d222de Added config options for rate limiting of large object downloads.
bug 786197
Change-Id: Idd73986ca4550b20dff340df4acd12f3bfc01075
2012年06月07日 20:19:31 +00:00
Vincent Untz
f7757e4ebf Fix typos in source documentation
metdata -> metadata
requets -> requests
Change-Id: Idc3c67e6415532e64e1d04c767f64e1d50269f44
2012年06月07日 17:07:18 +02:00
Chmouel Boudjnah
22572b506a Remove swift.common.client from here.
- It has been to its own gerrit project.
- direct_client should follow next.
- Implements blueprint clientbindings.
Change-Id: I3bb50c95eba81302bfec71cb7ce5288b85a41dc0
2012年06月07日 16:36:49 +02:00
Jenkins
3ba5ea354b Merge "Fixed bug with container reclaim/report race" 2012年06月06日 18:32:22 +00:00
Ionuț Arțăriși
9af3df9ee8 fix object replication on older rsync versions when using ipv4
Fixes bug 987388
Change-Id: I6eb5c45fe1f5844ad853a4ff9bc8fd23cc9abd5d
2012年06月06日 10:07:56 +02:00
Jenkins
54072cc951 Merge "Added global catchall to account-reaper." 2012年06月05日 19:14:43 +00:00
Jenkins
efb0436838 Merge "Raise ClientException for invalid auth version." 2012年06月04日 21:56:54 +00:00
Dan Prince
f48f253f4c Raise ClientException for invalid auth version.
Fixes LP Bug #1008667.
Change-Id: I1e767a804b617eff8a9700c3d98b2360c040933a
2012年06月04日 14:58:51 -04:00
Greg Lange
63ad27cd5f Added global catchall to account-reaper.
bug 644075
Change-Id: I75c73a42ddd8654a39a2fd82320941199bee4363
2012年06月04日 17:04:11 +00:00
Ionuț Arțăriși
9f5a6bba1a only allow methods which implement HTTP verbs to be called remotely
This fixes 500 server crashes caused by requests such as:
curl -X__init__ "http://your-swift-object-server:6000/sda1/p/a/c/o"
Fixes bug 1005903
Change-Id: I6c0ad39a29e07ce5f46b0fdbd11a53a9a1010a04
2012年06月04日 17:46:17 +02:00
gholt
213f385348 Fixed bug with container reclaim/report race
Before, a really lagged cluster might not get its final report for a
deleted container database sent to its corresponding account
database. In such a case, the container database file would be
permanently deleted while still leaving the container listed in the
account database, never to be updated since the actual container
database file was gone. The only way to fix such the situation before
was to recreate and redelete the container.
Now, the container database file will not be permanently deleted
until it has sent its final report successfully to its corresponding
account database.
Change-Id: I1f42202455e7ecb0533b84ce7f45fcc7b98aeaa3
2012年06月03日 03:23:51 +00:00
Samuel Merritt
783f16035a Fix starvation in object server with fast clients.
When an object server was handling concurrent GET or POST requests
from very fast clients, it would starve other connected clients. The
greenthreads responsible for servicing the fast clients would hog the
processor and only rarely yield to another greenthread.
The reason this happens for GET requests is found in
eventlet.greenio.GreenSocket, in the send() method. When you call
.send(data) on a GreenSocket, it immediately calls .send(data) on its
underlying real socket (socket._socketobject). If the real socket
accepts all the data, then GreenSocket.send() returns without yielding
to another greenthread. Only if the real socket failed to accept all
the data (either .send(data) < len(data) or by raising EWOULDBLOCK)
does the GreenSocket yield control.
Under most workloads, this isn't a problem. The TCP connection to
client X can only consume data so quickly, and therefore the
greenthread serving client X will frequently encounter a full socket
buffer and yield control, so no clients starve. However, when there's
a lot of contention for a single object from a large number of fast
clients (e.g. on a LAN connected w/10Gb Ethernet), then one winds up
in a situation where reading from the disk is slower than writing to
the network, and so full socket buffers become rare, and therefore so
do context switches. The end result is that many clients time out
waiting for data.
The situation for PUT requests is analogous; GreenSocket.recv() seldom
encounters EWOULDBLOCK, so greenthreads seldom yield.
This patch calls eventlet.sleep() to yield control after each chunk,
preventing any one greenthread's IO from blocking the hub for very
long.
This code has the flaw that it will greenthread-switch twice when a
send() or recv() does block, but since there isn't a way to find out
if a switch occurred or not, there's no way to avoid it. Since
greenlet switches are quite fast (faster than system calls, which the
object server does a lot of), this shouldn't have a significant
performance impact.
Change-Id: I8549adfb4a198739b80979236c27b76df607eebf
2012年06月01日 15:27:36 -07:00