The swift-dispersion-populate and swift-dispersion-report tools now
accept a --insecure option.
Also, dispersion.conf now has a keystone_api_insecure option.
Default is obviously to use the secure path.
DocImpact
Change-Id: I4000352e547d9ce5b08ade54e0c886281caff891
Just like stale_reads_ok, this was already an argument, end even
used by the replicator that way. We only make it used exclusively
this way, so that we can document it for LFS.
Change-Id: Ib722093a476ec75d87917b37b40b77dcf2627330
The default value of DiskFile.disallowed_metadata_keys is None. And it
will be iter in following codes even if it didn't get a new value. So
it is necessary to give Diskfile.disallowed_metadata_keys an empty list
in __init__ if the default value None is used.
fixes bug #1206740
Change-Id: I8454eba47b2c691166924356ab33b0235a800951
- mock http_connect in replicator.test_delete_partition test to not
connect directly on 127.0.0.1 (which is not always avail on non
linuxies).
- Fixes bug 1203907
Change-Id: I2622223c9fe5a3db2a113b6cd8d028a5db0915a7
Be able to tell swift to figure out the content-type even if it is
sent because old client code / curl has trouble sending blank
content-type headers.
Change-Id: Ie65ddf8993a19ea74e0b85a2ae56da84a617c19d
All of the module methods of the (now defunct) base module we really
concerned with the on-disk layout which is what the DiskFile module is
really about.
Change-Id: I96e022c5f96e31537ced74139185851a2751701c
Signed-off-by: Peter Portante <peter.portante@redhat.com>
The X-Auth-Token is sensitive data. If revealed to an unauthozied person,
they can now make requests against an account until the token expires.
This implementation maintains current behavior (i.e, the token
is logged). Implementers can choose to set reveal_sensitive_prefix
to (e.g.) 12 so only first 12 characters of the token are logged.
Or, set to 0 to replace the token with "...".
DocImpact
Part of bug #1004114
Change-Id: Iecefa843d8f9ef59b9dcf0860e7a4d0e186a6cb5
The method can_delete_db() appears to be not only unused, but has
always been so. I verified this going back to Austin release. It is
very strange that we never noticed it until now, but here it is.
Change-Id: I4445c4b2c4721f880c9dbb1eac055c0601ae6372
Have json and xml use common record cleanup code.
Do a somewhat better job of parsing extensions from content-types.
Use a real XML serializer.
Change-Id: I10e14dffd1da590b4fd180b4d33ab5de862e2b55
Right now this code fails when used with a JSON
decoder that always produces unicode. This isn't
usually the case with CPython, where simplejson
is used most of the time, however with the stdlib
JSON library (as used on PyPy), this code fails.
Change-Id: Ib2343243f40194d5b2784551a807c7f58970a6e9
The _commit_puts method is exactly the same in AccountBroker and
ContainerBroker, except for what it puts on the list pending records.
It seems to be easy to factor out without victimizing the code
clarity unduly.
We also factor common checking for LockTimeout: not so much for
any code savings, but to underscore that all these little segments
really are the same, so a reader does not need to prove uniformity
every time.
Change-Id: Idf9b553a3cf28de3c8803aaa47cf9a2be6817f00
self.recon_container is called before assigned. Accounding the context
codes, this is used to store somehing like self.rcache. So I guess the
name of 'recon_container' is a mistake, and change it to 'rcache'
(we could look at other places using dump_recon_cache)
Also add unit tests
fixes bug #1201958
Change-Id: I3a6e3d22ba1dbffc4309bc22ff37873b4a3f09b3
Staticweb middleware always searchs html
for error response when response status code
is not redirect.
It causes swift to return error response
even if the request succeeded.
(e.g. When finding index.html with 200,
staticweb returns 200error.html
if it exist)
This patch modifies the constraint on response
status and fix bug 1204319.
Fixes bug #1204319.
Change-Id: Ib83c303917da7fb94999f2d4d35063b450d0e992
This lets us get rid of some really repetitive exception conversion
code, like everybody that called common.utils.get_param() had to catch
a UnicodeDecodeError and turn that into returning HTTPBadRequest. Now
get_param() just raises HTTPBadRequest directly, and the __call__
methods in the account/container/object servers catch and return
it. All that "except UnicodeDecodeError" stuff goes away.
Refactored the path splitting and device validation in the object
server too.
There are other things that can benefit from this as well, but this
patch is big enough.
Change-Id: I2be96ef757d04bfd6af180cd9c92393c841db21f