Also bring unit test coverage to 100% (well, at least every line is
reported as "covered").
Change-Id: I659d0c02008368897b1307a7a5c9aaba73b80588
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Mark Seger at HP has been looking at small objects, 1 and 2 KB size,
and with Rick Jones' help noticed that TCP protocol traces showed
effects from the Nagel algorithm client-to-server and
server-to-client.
This patch just addresses our WSGI server responses, but does not
address out-bound connections from the various servers.
Change-Id: I11f86df1f56fba1c6ab6084dc1f580c395f072dc
Signed-off-by: Peter Portante <peter.portante@redhat.com>
When including branch coverage results, also generate HTML reports into
a "cover" subdirectory under the directory in which .unittests resides
(i.e. known location at the top of the swift tree).
Change-Id: I493d74f38755f7bf0d7043052585efb27840b238
The "not" in front of the ismount() call got accidentally dropped in a
recent change. This patch adds it back along with a few more tests.
Note that this bug only showed up on an SAIO during probe tests because
I used actually-mounted (virtual) "disks". So keep that in mind when
building SAIOs for development/testing.
Change-Id: Ia193f3c4b73203605954036863575c22ddab6b03
The documentation rightly said to use "memcache_max_connections", but
the code was looking for "max_connections", and only looking for it in
proxy-server.conf, not in memcache.conf as a fall back.
This commit brings the code coverage for the memcache middleware to
100%.
Closes-Bug: 1252893
Change-Id: I6ea64baa2f961a09d60b977b40d5baf842449ece
Signed-off-by: Peter Portante <peter.portante@redhat.com>
The early quorum change has maybe added a little bit too much
eventual to the consistency of requests in Swift, and users can
sometimes get unexpected
results.
This change gives us a knob to turn in finding the right balance,
by adding a timeout where pending requests can finish after quorum
is achieved.
Change-Id: Ife91aaa8653e75b01313bbcf19072181739e932c
This works around an eventlet bug in eventlet 0.9.16.
This version properly keeps track of pool size accounting, and
therefore doesn't let the pool grow without bound. This patched
version is the result of commit
f5e5b2bda7b442f0262ee1084deefcc5a1cc0694 in eventlet and is
documented at https://bitbucket.org/eventlet/eventlet/issue/91
This patch includes full test coverage of the back-ported code, even
when the actually-installed eventlet is newer.
This fixes bug #1254119
Change-Id: I075bb5e40e08571d52fe17fcc3fa0e25be5befed
ELIBBAD doesn't exist on OS X. The exact value we use here isn't
important, so use something more portable.
Change-Id: Id03dc1773f416a94bbd14ad31b2b2a70f16b9a51
New replication_one_per_device (True by default)
that restricts incoming REPLICATION requests to
one per device, replication_currency allowing.
Also has replication_lock_timeout (15 by default)
to control how long a request will wait to obtain
a replication device lock before giving up.
This should be very useful in that you can be
assured any concurrent REPLICATION requests are
each writing to distinct devices. If you have 100
devices on a server, you can set
replication_concurrency to 100 and be confident
that, even if 100 replication requests were
executing concurrently, they'd each be writing to
separate devices. Before, all 100 could end up
writing to the same device, bringing it to a
horrible crawl.
NOTE: This is only for ssync replication. The
current default rsync replication still has the
potentially horrible behavior.
Change-Id: I36e99a3d7e100699c76db6d3a4846514537ff685
If a source times out on read try another one of them with a
modified range. There had to be a lot of moved around code
to get this working but it should all make sense.
Change-Id: Ieaf045690a8823927a6f38098a95b37a4d4adb70
All the other daemons do this, and since the out deamon wrapper
scripts pass all the command line options through directly, seems
simple enough to handle them by ignoring.
This is also applied to run_once().
Change-Id: I1df83bdf78f0dc3d911019f67f78301967b5da72
Closes-Bug: #1253891
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Giving the inline query parameter will cause the tempurl
response to be given a "Content-Disposition: inline" header,
regardless of other query parameters or metadata. This allows
easy in-line viewing, eg in browsers.
DocImpact
Change-Id: Icd5c544d6a749d4f58e8a921968f4e432a2185db
According to GNU documents, the priority order of language variables
is LANGUAGE, LC_ALL, LC_*, LANG. Therefore, if LANGUAGE is set, it
overrides the LC_ALL setting from the test. An empty value is ignored,
and setting it to empty is easier to deal with than just deleting the
variable.
Also fixed the Google translate fail esperanto grammar.
Fixes bug 1235058
Change-Id: Ic97b90dfc21997e19cc473250794a9b3c526beb5
This bug was introduced in ef7f9e27; while moving timeout for execute
to the cursor wrapper, commit was moved as well; however commit is
purely a connection method, only execute is passed on to a cursor.
Added unit tests to check both methods for correct timeouts.
This manifested in a test failure as:
ERROR __call__ error with POST /sdb1/418/AUTH_d1c4b610b16a48de83219c696261009c/TestContainer-tempest-1572414684 :
Traceback (most recent call last):
File "/opt/stack/new/swift/swift/container/server.py", line 486, in __call__
res = method(req)
File "/opt/stack/new/swift/swift/common/utils.py", line 1915, in wrapped
return func(*a, **kw)
File "/opt/stack/new/swift/swift/common/utils.py", line 687, in _timing_stats
resp = func(ctrl, *args, **kwargs)
File "/opt/stack/new/swift/swift/container/server.py", line 464, in POST
broker.update_metadata(metadata)
File "/opt/stack/new/swift/swift/common/db.py", line 677, in update_metadata
conn.commit()
OperationalError: database is locked (txn: tx5065394f288740e69fcec-00528e184e)
Change-Id: I269b133fac53d4792d21b62f801cc0c0ccf337ea
The module used to simply "import swift", and then reference
the classes:
swift.common.middleware.catch_errors.CatchErrorsMiddleware
swift.proxy.server.Application
in order to very that the WSGI services loaded the proper filters and
apps.
However, those references only happen to work, as the WSGI loading
would properly import the rest of the path so that the namespace
reference would be okay. If the WSGI configuration were to change, or
if the behavior of WSGI broke, instead of of seeing the actual failure
condition, a module attribute error would result instead:
AttributeError: 'module' object has no attribute 'middleware'
The referenced names are now properly imported with this change to
avoid misleading error conditions.
Change-Id: Ifff4271bc5be1136bf17e4e5b291b01033d608db
Signed-off-by: Peter Portante <peter.portante@redhat.com>