2886 Commits

Author SHA1 Message Date
Vincent Untz
7f1aa9d1e8 Allow dispersion tools to use keystone server with insecure certificate
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
2013-08-05 22:44:12 +02:00
Koert van der Veer
657a0e4e26 Add swift-basicauth and better-staticweb to associated projects.
As announced here:
http://openstack.markmail.org/thread/jjjbdpurhb5jwaxe

Change-Id: I683c463745b34c003ecb79ba8261b94b9dc166b6
2013-08-05 09:57:50 +02:00
Jenkins
06402c05af Merge "Correct misspell in comments" 2013-08-03 00:14:10 +00:00
Wu Wenxiang
6895bb6589 Correct misspell in comments
In file: test/functional/tests.py

Change-Id: I4440123b95e38b40a7a0a5f1f031941f42c1085e
2013-08-03 07:06:00 +08:00
Jenkins
e10c8bfde9 Merge "Make pending_timeout an argument of __init__" 2013-08-02 18:49:04 +00:00
Jenkins
8cb5241614 Merge "Remove duplicated code in direct_client." 2013-08-02 10:42:59 +00:00
Jenkins
19603328e7 Merge "some container serialization cleanup" 2013-08-01 19:03:25 +00:00
Jenkins
ac78185fa1 Merge "Fake http_connect in test_replicator test" 2013-08-01 17:30:04 +00:00
Jenkins
b7907f3a9c Merge "give value [] if disallowed_metadata_keys is None" 2013-08-01 17:16:01 +00:00
gholt
d819354c76 Just a tiny doc fix for a Sphinx warning
Change-Id: Iede31212065eafb94fd29a63103e1e73e2de770d
2013-08-01 13:09:13 +00:00
Pete Zaitcev
f242311b20 Make pending_timeout an argument of __init__
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
2013-07-31 16:05:05 -06:00
Jenkins
def2b850f3 Merge "Return name of header larger than MAX_HEADER_SIZE" 2013-07-31 20:28:27 +00:00
Jenkins
948d34f3db Merge "Tell swift to figure out content type" 2013-07-31 20:26:29 +00:00
Kun Huang
6c36194692 give value [] if disallowed_metadata_keys is None
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
2013-07-31 03:12:52 -07:00
Chmouel Boudjnah
e448b2f5f7 Fake http_connect in test_replicator test
- 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
2013-07-31 10:07:26 +02:00
Jenkins
a11ecc35b7 Merge "log return value before arguments when rsync error" 2013-07-31 05:20:32 +00:00
Jenkins
efe8d0105c Merge "add utf-8 charset to multipart-manifest=get resp" 2013-07-31 02:03:49 +00:00
Jenkins
c5edf4cc10 Merge "Merge object base module into diskfile." 2013-07-30 23:11:30 +00:00
David Goetz
3035a93ed2 Tell swift to figure out content type
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
2013-07-30 15:17:38 -07:00
Jenkins
af9447490d Merge "fix(gitignore) : ignore *.egg and *.egg-info" 2013-07-30 21:10:43 +00:00
Jenkins
daed7409de Merge "Add option to make probetests more brittle" 2013-07-30 20:59:06 +00:00
Jenkins
f830c9a266 Merge "Obscure the X-Auth-Token in proxy log" 2013-07-30 20:58:59 +00:00
Jenkins
b5d0fadf99 Merge "Eliminate can_delete_db" 2013-07-30 19:35:57 +00:00
Jenkins
a2126add0b Merge "Set default wsgi workers to cpu_count" 2013-07-30 19:12:28 +00:00
TheSriram
47e34cf15e fix(gitignore) : ignore *.egg and *.egg-info
Change-Id: I9496dab9e8f779a7ae045bb73b2cf8e77bda0d30
2013-07-30 15:11:00 -04:00
Alex Gaynor
22e7cbceed When iterating over a range of a file, always close it
This is needed on Pythons without reference counting garbage collectors (e.g.
PyPy).

Change-Id: I1d06eb8fe08ee6eeb45caa47b653d6af0bb18267
2013-07-30 10:00:09 -07:00
Peter Portante
1e3ad44784 Merge object base module into diskfile.
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>
2013-07-30 09:38:22 -04:00
Donagh McCabe
eb99e8f84c Obscure the X-Auth-Token in proxy log
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
2013-07-30 09:37:27 +01:00
Jenkins
6a9f55d876 Merge "Removed unnecessary monkeypatching of __builtin__" 2013-07-30 04:02:10 +00:00
Pete Zaitcev
f9e73a0fe6 Eliminate can_delete_db
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
2013-07-29 19:12:10 -06:00
Michael Barton
53345da70e some container serialization cleanup
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
2013-07-29 17:35:08 -07:00
Alex Gaynor
be688c3156 Encode unicode from JSON before using it as a string.
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
2013-07-29 14:56:50 -07:00
Jenkins
87ab2f6e8c Merge "Fix incorrect status handling at staticweb" 2013-07-29 21:54:50 +00:00
Jenkins
82aeacf5bf Merge "Allow floating point value for dispersion_coverage" 2013-07-29 21:53:19 +00:00
Jenkins
3349013dff Merge "Configuration options for error regex and log file in the config now" 2013-07-29 18:23:39 +00:00
Alex Gaynor
0f3b0410e3 Removed unnecessary monkeypatching of __builtin__
Replaced it with explicitly importing the gettext function, which is
significantly more readable.

Change-Id: Ia0a7edcf685fb6e4052a8290367b233169529ab8
2013-07-27 21:34:35 -07:00
Jenkins
e155f6da18 Merge "Add bulk middleware to proxy-server.conf-sample" 2013-07-26 23:04:20 +00:00
David Goetz
750684f754 add utf-8 charset to multipart-manifest=get resp
Change-Id: Ic06e8b07a4db4ccde633f3b56a49f198cdd467cb
2013-07-26 10:00:33 -07:00
Pete Zaitcev
db2a4787b4 Unify _commit_puts for accounts and containers
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
2013-07-25 18:18:46 -06:00
Jenkins
76f12c8c10 Merge "Ignore coverage HTML directory and MANIFEST." 2013-07-25 23:05:20 +00:00
Jenkins
898e344a2e Merge "remove assert syntax" 2013-07-25 22:03:33 +00:00
Peter Portante
934cd9d9a5 Ignore coverage HTML directory and MANIFEST.
Change-Id: I5286cd1b066da11eef98dbfea9252366ca3ffd9c
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-07-25 16:48:38 -04:00
Jenkins
3e82858a21 Merge "Catch swob responses that are raised." 2013-07-25 17:51:43 +00:00
Kun Huang
741c3166d1 fix name 'recon_container' to 'rcache'
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
2013-07-25 19:55:59 +08:00
Jenkins
ac6ff8d7b9 Merge "Tempurl md use of split_path in _get_account" 2013-07-25 02:11:05 +00:00
Jenkins
bf95bb0a04 Merge "Corrected many style violations in the tests." 2013-07-25 02:05:20 +00:00
Kota Tsuyuzaki
0508842470 Fix incorrect status handling at staticweb
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
2013-07-24 18:46:15 -07:00
Samuel Merritt
df7fc9658b Catch swob responses that are raised.
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
2013-07-24 16:59:45 -07:00
Jon Snitow
eb0629fc82 Make sure users can't remove their account quotas
Protect X-Remove-Account-Meta-Quota-Bytes same as X-Account-Meta-Quota-Bytes

Fixes bug 1204110

Change-Id: Ibac5b555f50b1fe41b2999c0d5776d90f9c9f3d1
2013-07-24 16:11:03 -07:00
Jenkins
d1eeab9560 Merge "Unified format of boolean params in conf files" 2013-07-24 18:14:40 +00:00