b587d1606c5bd524efc473182f6048580fae33c8
6035 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Clay Gerrard
|
cf1f7af387 |
Use self.ts more consistently in obj.test_server
A make_timestamp_iter was added into setUp in the Related-Change. There was a couple of different tests that were using timestamp iters in different ways, consistently we apply the use of next(self.ts) which I believe is becoming more common/standardized in unitests. Related-Change: I074fbecb6440fb1d04279cd892d38d2acc44b47d Change-Id: Ib6b883afec242355ae08c50c1e685a20e5efadc7 |
||
|
Clay Gerrard
|
a97537e158 |
Split up backend/sysmeta header/footer preference tests
The change in preference to the Related-Change is simply to prefer sysmeta overrides in the headers to backend overrides in the footers: Before: sysmeta footers > backend footers > sysmeta headers > backend headers After: sysmeta footers > sysmeta headers > backend footers > backend headers This change just breaks up the tests to try to make it more obvious what already worked and what has changed. The justification seems to be that overrides in sysmeta headers only work on policies that don't send backend footers, but sysmeta overrides should always have a higher preference than backend overrides. Related-Change: Idb40361ac72da51e1390dff690723dbc2c653a13 Change-Id: I074fbecb6440fb1d04279cd892d38d2acc44b47d |
||
|
Alistair Coles
|
77e476376c |
Mention SWIFT_TEST_DEBUG_LOGS in development guide
Change-Id: If764de0a28f5afb858b3e892b35fe5fa147a0650 |
||
|
Jenkins
|
e7e9cfff68 | Merge "Use extract_swift_bytes in override_bytes_from_content_type" | ||
|
Jenkins
|
82c342c88e | Merge "Fix X-*-Container-Update-Override-* header/footer precedence" | ||
|
Ellen Leahy
|
7958638e8f |
Added quotes to example echo in swift-temp-url
If the curl command is used exactly as in the help, the ampersand in the signature is interpreted as an operator and the curl command breaks. I am aware of developers who have wasted a lot of time because of this. Change-Id: I6468c9a098b56db8242a2cf2c23b7a4857bd8574 |
||
|
Victor Stinner
|
a81d60472f |
Fix Python 3 issues in diskfile
* Fix bytes vs Unicode issues * On Python 3, encode JSON to UTF-8 and decode it from UTF-8 * Open files in binary mode to avoid Unicode issues * test_auditor: use bytes for content, open files in binary mode Change-Id: Ifa84001493cfb57975d3b140b0d7e09020504bca |
||
|
Christian Schwede
|
699953508a |
Add doc entry to check partition count
An high or increasing partition count due to storing handoffs can have some severe side-effects, and replication might never be able to catch up. This patch adds a note to the admin_guide how to check this. Change-Id: Ib4e161d68f1a82236dbf5fac13ef9a13ac4bbf18 |
||
|
cheng
|
c1c18da82c |
check _last_part_moves when pretend_min_part_hours_passed
pretend_min_part_hours_passed do things like this: self._last_part_moves[part] = 0xff this will throw exception if self._last_part_moves is None. this patch is to check self._last_part_moves to prevent exception. Closes-bug: #1578835 Change-Id: Ic83c7a338b45bfcf61f5ab6100e6db335c3fa81a |
||
|
Jenkins
|
25cdd52c6a | Merge "Python 3: Fix usage of dict methods" | ||
|
Jenkins
|
220275e611 | Merge "Python 3: fix usage of reload()" | ||
|
Tim Burke
|
bf17d96800 |
Use extract_swift_bytes in override_bytes_from_content_type
About half the logic was the same, and it seems better to just implement that once. Change-Id: I350da34ef7a3cd0cb74f585f4691992ae64c7eab |
||
|
Jenkins
|
68cb2f1e74 | Merge "Python3 fixes generator object issue" | ||
|
Jenkins
|
53bf2e4e50 | Merge "Python3 eventlet patched httplib _MAXHEADERS" | ||
|
Victor Stinner
|
5677a04c8f |
Python 3: Fix usage of dict methods
* Replace "c = dict(a.items() + b.items())" with "c = dict(a); c.update(b)". It works on Python 2 and Python 3, and it may be a little bit more efficient on Python 2 (no need to create a temporary list of items). * Replace "dict.values() + dict.values()" with "list(dict.values()) + list(dict.values())": on Python 3, dict.values() is a view which doesn't support a+b operator. Change-Id: Id5a65628fe2fb7a02c713b758fcaa81154db28a0 |
||
|
Victor Stinner
|
e6776306b7 |
Python 3: fix usage of reload()
Replace reload() builtin function with six.moves.reload_module() to make the code compatible with Python 2 and Python 3. Change-Id: I7572d613fef700b392d412501facc3bd5ee72a66 |
||
|
Kota Tsuyuzaki
|
1eb96397e7 |
Fix EC ring validation at ring reload
Swift EC has a strong constraint about the ring must have a number of replicas which fits ec_k + ec_m. That is validated when servers waking up. However, Swift has more chance to load such an invalid ring when a request comming, calling some node iteration like get_nodes, get_part_nodes or so, and no ring validation is there. This patch moves ring validation from policy validate_ring into the ring instance as validation_hook that will run at ring reload. Since this patch, ring instance will allow to use the old ring if the reload is not fourced. Note that the exception if invalid ring found was changed from RingValidationError to RingLoadError because RingValidationError is a child of RingBuilderError but the ring reload is obviously outside of "builder". Closes-Bug: #1534572 Change-Id: I6428fbfb04e0c79679b917d5e57bd2a34f2a0875 |
||
|
Kota Tsuyuzaki
|
3a1a198780 |
Raise ValueError if empty value coming into encrypt_header_val
encrypt_header_val is used to translate a raw header value into an
encrypted value. Semantically, a header with an empty value won't be stored
and all callers seem to remove such a header before calling
encrypted_header_val.
So if no reason for returning ('', None), I think it's better to change it to
raise ValueError not to cause another error for users of the return value.
(e.g. dump_crypto_meta)
Plus this patch addes a few unit tests for those cases above.
Change-Id: Ic1237f4afb8c0e466be5ce59fe31b667c39242b0
|
||
|
Jenkins
|
574a666a43 | Merge "Cache fragment size for EC policy" | ||
|
Jenkins
|
7c5a2c2900 | Merge "Update dnspython to 1.14" | ||
|
Kota Tsuyuzaki
|
2876f59d4c |
Cache fragment size for EC policy
ECStoragePolicy.fragment_size is never changed on running Swift because it is from ec_segment_size and ec_type defined in swift.conf statically so let's cache the value after retrieving the value from the pyeclib driver. And more, pyeclib <= 1.2.1 (current newest) has a bug [1] to leak the reference count of the items in the returned dict (i.e. causes memory leak) so that this caching will be mitigation of the memory leak because this saves the call count fewer than current as possible. Note that the complete fix for the memory leak for pyeclib is proposed at https://review.openstack.org/#/c/344066/ 1: https://bugs.launchpad.net/pyeclib/+bug/1604335 Related-Bug: #1604335 Change-Id: I6bbaa4063dc462383c949764b6567b2bee233689 |
||
|
Alistair Coles
|
afe3968dd1 |
Copy headers correctly when copying object
Fix copy middleware so that all client-defined object headers that object servers allow to be persisted are copied. For example, content-encoding and content-disposition will now be copied. Fix treatment of x-fresh-metadata header so that, when it is used, new object sysmeta is applied to the object copy in the same way as a copy without x-fresh-metadata. Remove unnecessary passing of original request headers to sink PUT request constructor: passing the environ is sufficient to have the new request inherit the original's headers. Add tests for this change and to verify that content-type gets either copied or updated if supplied with the copy request. Add tests for x-fresh-metadata treatment. Closes-Bug: #1391826 Closes-Bug: #1600247 Co-Authored-By: Thiago da Silva <thiago@redhat.com> Change-Id: I917fb0b4e831c13e04ade1c5e0b9821802dec967 |
||
|
Jenkins
|
3c30fad957 | Merge "Use more specific asserts in functional tests" | ||
|
Jenkins
|
50bd138cdb | Merge "Add log format to i18n" | ||
|
Jenkins
|
4bb98bcfe6 | Merge "Avoid docs warning: Duplicate explicit target name" | ||
|
Jenkins
|
45080a5177 | Merge "Prevent CPU spinning when there are no children" | ||
|
Lokesh S
|
26d91f2b10 |
Python3 eventlet patched httplib _MAXHEADERS
This change patches the correct eventlet monkey patched httplib's _MAXHEADERS as required by Swift. It also makes the configparser inside the copy middleware py3 compatable. Change-Id: I2f7dbcecbbecd7cb69b7031faa39f35bcfadcfc8 |
||
|
Jenkins
|
02e046fdb6 | Merge "Use more specific asserts in test/unit/common/ring" | ||
|
John Dickinson
|
8733311857 |
Prevent CPU spinning when there are no children
If you deploy an object server but have no rings at all (and are using servers-per-port), then the CPU will spin as it checks for child processes since there are actually no child processes to check. This patch adds a sleep so that the CPU doesn't spin. Change-Id: Iece62367aa2481a21752144b1f4477a3713282fe |
||
|
Lokesh S
|
49f250736d |
Python3 fixes generator object issue
Fixes generator' object has no attribute 'next' issues Change-Id: I1f21eaed0ae7062073438503d3f6860d8b4f36c8 |
||
|
Tim Burke
|
cdf505a50c |
Make swift-oldies py3-compatible
Change-Id: I0388f4738966bc453e922e9598ff9df60ecda4eb |
||
|
Jenkins
|
3382a0e80e | Merge "Make comparision simplely" | ||
|
Mohit Motiani
|
d9b765320d |
Fixed Typo in updater.py
Change-Id: Ic0b5445e313924c683e9889d94569c2554fd0b8b |
||
|
Jenkins
|
d731a4d031 | Merge "Change assertTrue to assertEqual" | ||
|
Jenkins
|
9d52dcd2a1 | Merge "Imported Translations from Zanata" | ||
|
Jenkins
|
5d10819f3c | Merge "Remove red herring from logs" | ||
|
Cheng Li
|
f337421273 |
Change assertTrue to assertEqual
In test_ringbuilder.py, there is one assertTrue should be replaced with assertEqual. Change-Id: I9a0e4a7363a5e16cc9b6df045953dfbb4f9dbd07 Closes-bug: #1604320 |
||
|
OpenStack Proposal Bot
|
aaa6315587 |
Imported Translations from Zanata
For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Ica92e45dbc3f83ec806e092fd3ea5ada636ab7e9 |
||
|
Jenkins
|
c69a49a473 | Merge "Simplify chained comparison" | ||
|
Clay Gerrard
|
cc0016399d |
Remove red herring from logs
The object replicator can log some junk about the cluster ip instead of the replication ip in some specific error log lines that can make you think either you're crazy or your rings are crazy. ... in this case it was just the logging was crazy - so fix that. Change-Id: Ie5cbb2d1b30feb2529c17fc3d72af7df1aa3ffdd |
||
|
Mohit Motiani
|
c7e5afb9c3 |
Fixed typo in reaper.py
Change-Id: I9b98da30e5f934164e490beb4d6cde840f08832a |
||
|
zheng yin
|
bc09be4375 |
Make comparision simplely
For example: a>b and a<=c is equal to b<a<=c Change-Id: Iae1532f0946c6d4aa7321f3957820b486869c59f |
||
|
zheng yin
|
ecce7947dd |
Add log format to i18n
Change-Id: I3aff0de418b52b1f16f5863c95ad2700678143ae |
||
|
Maria Malyarova
|
45bde710a9 |
Simplify chained comparison
For example: a < b and b <= c is equal to a < b <= c Change-Id: I91ceb194bce60f6160ebdf0aadf0e8f0d7a35975 |
||
|
Jenkins
|
5ace495562 | Merge "Improve Keystone v3 token support" | ||
|
Gábor Antal
|
e278179b08 |
Use more specific asserts in functional tests
I changed asserts with more specific assert methods. e.g.: from assertTrue(sth == None) to assertIsNone(*) or assertTrue(isinstance(inst, type)) to assertIsInstace(inst, type) or assertTrue(not sth) to assertFalse(sth). The code gets more readable, and a better description will be shown on fail. Change-Id: I80ec96e0b729bef38213a6be4ff4b6eb65c7612d |
||
|
Gábor Antal
|
75a58a6dd8 |
Use more specific asserts in test/unit/proxy tests
I changed asserts with more specific assert methods. e.g.: from assertTrue(sth == None) to assertIsNone(*) or assertTrue(isinstance(inst, type)) to assertIsInstace(inst, type) or assertTrue(not sth) to assertFalse(sth). The code gets more readable, and a better description will be shown on fail. Change-Id: If6aad8681aab7c9a41d65a4f449d8abbe3e64616 |
||
|
Gábor Antal
|
77d6d015f6 |
Use more specific asserts in test/unit/common/ring
I changed asserts with more specific assert methods. e.g.: from assertTrue(sth == None) to assertIsNone(*) or assertTrue(isinstance(inst, type)) to assertIsInstace(inst, type) or assertTrue(not sth) to assertFalse(sth). The code gets more readable, and a better description will be shown on fail. Change-Id: I9531c9939aa7c2dac127b5dc865b8d396dab318f |
||
|
Béla Vancsics
|
5d02b9578e |
Reduce code duplication
Reduced source code by extracting duplicated code (swift/cli/ringbuilder.py) Change-Id: Ibd000df1dc9042e31b65b000199dff4a645e63b4 |
||
|
Jenkins
|
7b28ac1d36 | Merge "Remove some unnecessary error handling in healthcheck" |