3119 Commits

Author SHA1 Message Date
Jenkins
9b9e50cec0 Merge "Set path_info in sub_slo manifest GET requests" 2013-10-02 06:46:00 +00:00
Jenkins
fe69cab3fd Merge "Fedora 19 updates" 2013-10-01 17:41:18 +00:00
Jenkins
c7a9cb9182 Merge "Move location of HTTPException in swift_testing" 2013-10-01 08:13:07 +00:00
Jenkins
d7bab86619 Merge "Use created container in unit test" 2013-10-01 05:48:56 +00:00
Peter Portante
e8a07c4ca7 Fedora 19 updates
Change-Id: I95138852e45aa7632218a7107e0e7ba1f6ef373c
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-09-30 10:23:04 -04:00
Jenkins
5eea524d3e Merge "bulk delete bug with trailing whitespace" 2013-09-29 03:15:10 +00:00
Jenkins
9befc70b21 Merge "Install libffi-dev in SAIO docs." 2013-09-28 21:54:39 +00:00
anc
8ab06eb8cc Set path_info in sub_slo manifest GET requests
The new_req Request object created for fetching
nested sub_slo manifests does not have its
path_info set to the sub_slo path before being
passed to GETorHEAD_base.

The sub manifest GET works fine because
GETorHEAD_base uses its path argument
(not req.path) to set up its connection,
BUT if an exception is thrown,
GETorHEAD_base uses req.path to construct
the log message - so the exception log would
have the wrong path.

Fixes bug 1231872

Change-Id: I0f0f969958f814d8a7053440d9de4e50796169e4
2013-09-27 10:10:55 +01:00
Kun Huang
4c4a8abaa5 improve bulk document
This a very small change which just tell users request url of bulk
delete request. In original docstrings, it just states the request
parameters, request body and request method but not request url.

Change-Id: I0bbc302a0e072910bb58e4814614d7f761433b10
2013-09-27 15:27:59 +08:00
David Goetz
df39602c41 bulk delete bug with trailing whitespace
Change-Id: Ia48224a1a187a8ed6b0c9a3c72cac06f084a6fc8
2013-09-26 11:17:18 -07:00
Jenkins
c1f9f668ee Merge "Update SAIO doc to have double proxy-logging in pipeline." 2013-09-26 00:27:43 +00:00
Samuel Merritt
d8e0492ea8 Fix internal swift.source tracking.
In 1.8.0 (Grizzly), your proxy logs would indicate which middleware
was responsible for an internal request, e.g. TU for tempurl or BD for
bulk delete. At some point, those all turned into GET_INFO, which does
not give you any idea which specific middleware was responsible, only
that it came from a get_account_info/get_container_info call.

This commit puts it back to how it was in 1.8.0. Also, the
new-since-1.8.0 function get_object_info() got swift_source plumbing
added to it, so source tracking for the quota middlewares'
get_object_info() calls will happen now too.

Note that due to the new-since-1.8.0 in-environment caching of
account/container info, you may not see as many lines in the proxy log
as you would with 1.8.0. This is because there are actually fewer
internal requests being made.

Change-Id: I2b2ff7823c612dc7ed7f268da979c4500bbbe911
2013-09-25 10:21:56 -07:00
Jenkins
d65cbecb01 Merge "update SLO delete error handling" 2013-09-25 01:04:20 +00:00
Samuel Merritt
d9d7b2135a Install libffi-dev in SAIO docs.
If you don't, then newer versions of xattr won't install, and since
our xattr requirement is simply ">= 0.4" in requirements.txt, this
affects anyone setting up a new SAIO.

This happened with xattr 0.7, which was released on 2013-07-19.

Change-Id: Iaf335fa25a2908953d1fd218158ebedf5d01cc27
2013-09-24 16:54:58 -07:00
Samuel Merritt
ce5e810fed Update SAIO doc to have double proxy-logging in pipeline.
Change-Id: I0a034ca1420761cbf4e35dcea1d9cd18a92f90bd
2013-09-24 16:54:58 -07:00
Jenkins
bb3f9657f2 Merge "Log x-copy-from when it could be useful" 2013-09-24 20:36:25 +00:00
Brian Curtin
180cd18da6 Move location of HTTPException in swift_testing
While doing some work around swiftclient Python 3 support, httplib
imports were changed to use six.moves in order to access httplib in Py2
and http.client in Py3. Tests related to those changes are failing
because these functional tests are depending on HTTPException being
a name in swiftclient.client. These tests should acces that name from
its canonical location in httplib (or, eventually, a Py3 friendly
location like six.moves).

Change-Id: I6335d465574045daedab47e5fe23c415d171a83a
2013-09-24 15:15:00 -05:00
Peter Portante
4e8b2ffc2e Use created container in unit test
Change-Id: I2573be1ac14f65b8008611edf940363b31c8d86e
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-09-24 02:29:54 -04:00
Brian D. Burns
3e6f9293b8 update SLO delete error handling
* ensure all responses are 200 OK
* report missing sub-SLO manifests or other error messages in bulk
  delete response

Change-Id: Iaf88c94bc7114ff3c9751f9f31f8f748de911f8a
2013-09-22 16:26:15 -04:00
Jenkins
10bb74a872 Merge "SLOs broken for range requests" 2013-09-20 19:09:23 +00:00
ZhiQiang Fan
92ae497800 Fix unsuitable assertTrue
assertTrue accepts a parameter msg which will be printed when
assertion fails, usually msg is a str. This patch fixes unsuitable
usage of assertTrue which set msg to bool type True.

Change-Id: I731f8ea553c935eba0e112ffded16f41a5ea86c0
Fixes-Bug: #1226374
2013-09-20 23:52:56 +08:00
David Goetz
01f58d6826 SLOs broken for range requests
Change-Id: I21175a4be0cda9a8a98c425bff11c80895cd6d3e
2013-09-20 08:51:21 -07:00
Jenkins
ddcf26c729 Merge "Add a user variable to templates" 2013-09-20 03:36:00 +00:00
Jenkins
9ca708550f Merge "add seek() to CompressingFileReader" 2013-09-19 23:39:57 +00:00
gholt
4a5c2fa0c6 Log x-copy-from when it could be useful
Change-Id: Ia28a9b47213f848ab5ea59572e14ac710ed881e3
2013-09-19 21:05:46 +00:00
Greg Lange
285a3a88a1 add seek() to CompressingFileReader
Change-Id: I33d9119684497b53101db3bc380953e86bdf25f0
2013-09-19 19:26:30 +00:00
gholt
58efcb3b3e Fix probe tests
Change-Id: I03573bf24baf031b1874c3ff2e2d89d34473c266
2013-09-19 17:14:35 +00:00
Jenkins
dad4bf3208 Merge "Add HTTPSeeOther(303) and HTTPTemporaryRedirect(307) to swob" 2013-09-18 22:46:01 +00:00
Jenkins
60beab79bc Merge "Refactor common/utils methods to common/ondisk" 2013-09-18 21:29:54 +00:00
Jenkins
4453218f76 Merge "Handle X-Copy-From header in account_quota mw" 2013-09-18 20:53:17 +00:00
Jenkins
a9af8dd811 Merge "Optimizations to Ring.get_more_nodes()" 2013-09-18 16:51:31 +00:00
Prashanth Pai
a6443f7068 Add HTTPSeeOther(303) and HTTPTemporaryRedirect(307) to swob
RFC 1945 and RFC 2068 specify that the client is not allowed to change the
method on the redirected request.  However, most existing user agent
implementations treat 302 as if it were a 303 response, performing a GET on
the Location field-value regardless of the original request method. The status
codes 303 and 307 have been added for servers that wish to make unambiguously
clear which kind of reaction is expected of the client.

HTTP/1.1 RFC for 302: http://tools.ietf.org/html/rfc2616#section-10.3.4
HTTP/1.1 RFC for 307: http://tools.ietf.org/html/rfc2616#section-10.3.8

Change-Id: I354e2f4f3e3eb6a1553b3d9c60b613d8f0c37531
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2013-09-18 12:26:08 +05:30
Peter Portante
7760f41c3c Refactor common/utils methods to common/ondisk
Place all the methods related to on-disk layout and / or configuration
into a new common module that can be shared by the various modules
using the same on-disk layout.

Change-Id: I27ffd4665d5115ffdde649c48a4d18e12017e6a9
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-09-17 17:32:04 -04:00
Jamie Lennox
da78035043 Add a user variable to templates
This is a common configuration option and allows devstack (and others)
to configure a mod_wsgi user to run the daemon process.

Change-Id: Idf134b3bc6b08e3c3a80dde8830d5a4f3da5a06c
Fixes: bug 1226346
2013-09-17 11:46:04 +10:00
Jenkins
8e48dd6b7f Merge "remove useless if from slo" 2013-09-16 20:46:15 +00:00
Jenkins
b335a2ff76 Merge "Remove unused method iter_devices_partition" 2013-09-16 19:17:24 +00:00
Jenkins
0192a62212 Merge "Supply correct arguments to __init__ of a base class" 2013-09-16 17:17:33 +00:00
Jenkins
61db4d6ef8 Merge "Removed many unnecessary uses of dict.keys" 2013-09-16 17:15:32 +00:00
Pete Zaitcev
75086a1330 Supply correct arguments to __init__ of a base class
Hopefuly this extra test case is not too inane and slows us
down for nothing. It is verified to fail with the old code.

Change-Id: I604eca09f7f9ae044a8ad75284cd82a37325f99c
2013-09-14 16:09:53 -06:00
Jenkins
31f706b97b Merge "Add support for POST commit coverage runs" 2013-09-14 00:19:05 +00:00
Alex Gaynor
a9c119d440 Removed many unnecessary uses of dict.keys
This has a few advantages: some of these locations will perform
slightly faster, it's minutely less code, and dict.keys has a different
behavior on Python 3. Also removes usage of dict.iterkeys, which is
identical to just iterating over the dict, except it doesn't exist on
Python 3 at all.

Change-Id: Ia91e97232dc8d78cf63fa807de288fc25cf5425d
2013-09-13 15:40:32 -07:00
Samuel Merritt
9cd7c6c155 Optimizations to Ring.get_more_nodes()
When we're looking for handoffs, we first try to span all the regions,
then zones, then devices. However, the search loops would always go
over a big subset of the ring, regardless of whether or not there was
anything left to find.

In particular, this would result in long runtimes for the first call
to get_more_nodes() if you didn't have more regions than replicas, as
the region-search loop would chew through a ton of devices and not
find any (since there weren't any). Now we do a little arithmetic,
think about the pigeonhole principle a little bit, and bail out when
there's nothing left to find, rather than waiting until there's no
space left to search.

Similar changes were made for the different-zone and different-device
search loops.

On a 4800-device test ring (4 regions, 5 zones each, 20 node each, 12
drives each), the time to get all handoffs dropped to about 5% of its
previous value (a 95% improvement).

More usefully, on a 1200-device test ring (same as above but only 1
region), the time to get just the first 6 handoffs dropped to about
0.01% of its original runtime, or a 10,000x speedup.

Fixes bug 1225018.

Change-Id: I4c77094186f0032a3e19a099a1a0e71b2ba06719
2013-09-13 15:12:37 -07:00
Jenkins
0fe02a6140 Merge "Use a local variable auditor_worker" 2013-09-13 21:40:56 +00:00
Jenkins
bed2adec43 Merge "Switched some relative imports to be absolute" 2013-09-13 21:08:05 +00:00
Pete Zaitcev
cfa4f9497d Use a local variable auditor_worker
This patch is only a cleanup, but our code makes me rage every time
I read it. In short, we have a class with a variable self.auditor,
and we assign ObjectAuditor to it at some ties, AuditorWorker at
other times. So, whenever there's a mismerge or whatever, you cannot
tell if self.auditor.broker_class makes sense or not.

Since all cases of using self.auditor as AuditorWorker are purely
local, just evict it to a local variable auditor_worker. Leave
self.auditor to represent ObjectAuditor, because it's used as
a class variable in places.

Change-Id: I811b80ac6c69a4daacfed7a5918bc0b15761d72e
2013-09-13 13:55:10 -06:00
Jenkins
5650bdb27a Merge "Add handoffs_first and handoff_delete to obj-repl" 2013-09-13 18:50:42 +00:00
Alex Gaynor
5026e45691 Switched some relative imports to be absolute
Implicit relative imports don't work on Python3, and are also prone to
several different classes of errors.

Change-Id: I7b62e9bfbe9c0b1fc9876413e3139fda019a4e57
2013-09-13 10:36:54 -07:00
Alex Gaynor
5b0788d37d Use an existing local var rather than doing alookup
This should make ``Ring.get_more_nodes`` microscopically faster.

Change-Id: Ibf0988fe0630ad94ac0c04040766d89ef86d1488
2013-09-13 09:50:14 -07:00
Chuck Thier
a30a7ced9c Add handoffs_first and handoff_delete to obj-repl
If handoffs_first is True, then the object replicator will give
partitions that are not supposed to be on the node priority.

If handoff_delete is set to a number (n), then it will delete a handoff
partition if at least n replicas were successfully replicated

Also fixed a couple of things in the object replicator unit tests and
added some more

DocImpact

Change-Id: Icb9968953cf467be2a52046fb16f4b84eb5604e4
2013-09-13 15:44:07 +00:00
Jenkins
cb114e5ecf Merge "Tinker with dockstrings in back-ends and related places" 2013-09-12 23:25:49 +00:00