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
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
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
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
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
* ensure all responses are 200 OK
* report missing sub-SLO manifests or other error messages in bulk
delete response
Change-Id: Iaf88c94bc7114ff3c9751f9f31f8f748de911f8a
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
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>
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>
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
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
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
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
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
Implicit relative imports don't work on Python3, and are also prone to
several different classes of errors.
Change-Id: I7b62e9bfbe9c0b1fc9876413e3139fda019a4e57
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