30d74af6534b754e6ad9bfdcbff4ec494277ca83
Commit Graph

5252 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Alistair Coles
30d74af653 Insert versioned_writes in correct pipeline position
If not explicitly configured the versioned_writes middleware
should be auto-inserted in the pipeline after slo and dlo, which
is where the versioned_writes filter section's comments say it
should be in proxy-server.conf-sample. At the moment it can end up
being placed ahead of slo and dlo if they have been explicitly
configured, which results in the linked bug manifesting.
Closes-Bug: #1537042
Change-Id: I6ac95a331f4ef0d4887311940acc6f8bc00fb4eb
2016年02月02日 18:30:06 +00:00
Jenkins
0e91aa8368 Merge "Expose token expiration time in tempauth auth response" 2016年01月23日 08:00:12 +00:00
Jenkins
222649de45 Merge "Allow smaller segments in static large objects" 2016年01月23日 06:13:26 +00:00
Jenkins
fcdb2fa2a1 Merge "Container-Sync to iterate only over synced containers" 2.6.0 2016年01月22日 22:49:17 +00:00
Jenkins
702022d7da Merge "remove unneeded duplicate dict keys" 2016年01月22日 16:04:55 +00:00
Jenkins
b49ddf847d Merge "Stop overriding builtin range" 2016年01月22日 10:40:47 +00:00
Jenkins
4634153c8b Merge "Validate X-Timestamps" 2016年01月22日 05:50:01 +00:00
Jenkins
213acb289a Merge "authors and changelog updates for 2.6.0" 2016年01月22日 05:49:21 +00:00
Jenkins
55fee9415a Merge "Bump eventlet min version to 0.17.4" 2016年01月22日 04:39:38 +00:00
Jenkins
67235901ff Merge "Fix memory/socket leak in proxy on truncated SLO/DLO GET" 2016年01月22日 03:41:07 +00:00
Jenkins
c804be26e3 Merge "Fix a comment's indentation" 2016年01月21日 11:04:03 +00:00
Jenkins
994f3a7370 Merge "Deleted comment about part power in FakeRing" 2016年01月21日 10:59:50 +00:00
Jenkins
6bb3325f31 Merge "Look for device holes that can be reused when adding new device." 2016年01月21日 09:10:28 +00:00
Jenkins
66076b595b Merge "Add more description for write_affinity_node_count parameter in the doc." 2016年01月21日 09:10:18 +00:00
Jenkins
3d7cac02b5 Merge "Use the correct split_path in handle_request" 2016年01月21日 09:09:27 +00:00
Tim Burke
e13a03c379 Stop overriding builtin range
Change-Id: I315f8b554bb9e96659b455f4158f074961bd6498
2016年01月20日 16:06:26 -08:00
John Dickinson
0a404def7d remove unneeded duplicate dict keys
Change-Id: I926d7aaa9df093418aaae54fe26e8f7bc8210645
2016年01月20日 15:19:35 -08:00
John Dickinson
221f94fdd3 authors and changelog updates for 2.6.0
Change-Id: Idd0ff9e70abc0773be183c37cd6125fe852da7c0
2016年01月20日 09:35:14 -08:00
Samuel Merritt
58359269b0 Fix memory/socket leak in proxy on truncated SLO/DLO GET
When a client disconnected while consuming an SLO or DLO GET response,
the proxy would leak a socket. This could be observed via strace as a
socket that had shutdown() called on it, but was never closed. It
could also be observed by counting entries in /proc/<pid>/fd, where
<pid> is the pid of a proxy server worker process.
This is due to a memory leak in SegmentedIterable. A SegmentedIterable
has an 'app_iter' attribute, which is a generator. That generator
references 'self' (the SegmentedIterable object). This creates a
cyclic reference: the generator refers to the SegmentedIterable, and
the SegmentedIterable refers to the generator.
Python can normally handle cyclic garbage; reference counting won't
reclaim it, but the garbage collector will. However, objects with
finalizers will stop the garbage collector from collecting them* and
the cycle of which they are part.
For most objects, "has finalizer" is synonymous with "has a __del__
method". However, a generator has a finalizer once it's started
running and before it finishes: basically, while it has stack frames
associated with it**.
When a client disconnects mid-stream, we get a memory leak. We have
our SegmentedIterable object (call it "si"), and its associated
generator. si.app_iter is the generator, and the generator closes over
si, so we have a cycle; and the generator has started but not yet
finished, so the generator needs finalization; hence, the garbage
collector won't ever clean it up.
The socket leak comes in because the generator *also* refers to the
request's WSGI environment, which contains wsgi.input, which
ultimately refers to a _socket object from the standard
library. Python's _socket objects only close their underlying file
descriptor when their reference counts fall to 0***.
This commit makes SegmentedIterable.close() call
self.app_iter.close(), thereby unwinding its generator's stack and
making it eligible for garbage collection.
* in Python < 3.4, at least. See PEP 442.
** see PyGen_NeedsFinalizing() in Objects/genobject.c and also
 has_finalizer() in Modules/gcmodule.c in Python.
*** see sock_dealloc() in Modules/socketmodule.c in Python. See
 sock_close() in the same file for the other half of the sad story.
This closes CVE-2016-0738.
Closes-Bug: 1493303
Co-Authored-By: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>
Change-Id: Ib86c4c45641485ce1034212bf6f53bb84f02f612
2016年01月20日 06:54:14 -08:00
Samuel Merritt
bc4b298b6e Fix a comment's indentation
Change-Id: I34514525b606cf82767ddce7769bc42fa5457717
2016年01月19日 15:33:13 -08:00
Sivasathurappan Radhakrishnan
3a0486e532 Deleted comment about part power in FakeRing
Deleted comment about parameter part power in Class FakeRing as its
behavior got dropped in I8bfc388a04eff6491038991cdfd7686c9d961545.
Change-Id: Iec7d2565a77e48493b0056021066d8d8eab65d0b
Closes-Bug: #1488704 
2016年01月19日 20:01:08 +00:00
John Dickinson
999479f9b1 Bump eventlet min version to 0.17.4
IPv6 support in Swift is dependent on IPv6 support in eventlet.
eventlet itself only claims support for IPv6 post v0.17
(https://github.com/eventlet/eventlet/issues/8). This update matches
the OpenStack global requirements version.
Change-Id: I9d8433cdd3bf7d7a93b8f50b991cc21721a80d22
2016年01月19日 10:30:30 -08:00
Jenkins
b9fd530657 Merge "Sleep enough for trampoline" 2016年01月19日 17:01:43 +00:00
Christopher Bartz
133a3ea601 Use the correct split_path in handle_request
Change-Id: I86d423309f0b2091ee2e82b2245caf925b6a75ef
Closes-Bug: #1528189 
2016年01月19日 10:01:51 +01:00
Tim Burke
bf10974cde Expose token expiration time in tempauth auth response
Previously, we gave no indication of when a token would expire. Users
would have to just use it until it stopped working, then re-auth.
Now, a successful auth response will include a new header,
X-Auth-Token-Expires, with the number of seconds remaining until the
token is invalid. This allows the client to attempt to re-auth before
sending a request that will definitely fail.
For comparison, swauth already uses the X-Auth-Token-Expires header with
identical semantics. Additionally, Keystone (v2 and v3) already exposes
expiration times in its JSON responses. The security impact should be
minimal.
Change-Id: I5a4a74276bc0df6dda94e4bc150065c0d77de0eb
2016年01月18日 10:23:48 -08:00
Jenkins
6a473e3d7b Merge "Imported Translations from Zanata" 2016年01月18日 16:46:30 +00:00
Jenkins
b46209e7a0 Merge "Allow to change auditor sleep interval in config" 2016年01月18日 12:19:08 +00:00
OpenStack Proposal Bot
47e226418b Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: Ic416c9afc8a1c76f552803a7c70fc905eda7b3cb
2016年01月18日 06:20:14 +00:00
Jenkins
4db7e2e2e4 Merge "Speed up get_more_nodes() when there is an empty zone" 2016年01月16日 12:30:15 +00:00
Jenkins
5b35235200 Merge "Drop python 2.6 support" 2016年01月15日 23:48:36 +00:00
Jenkins
f138535854 Merge "Remove some Python 2.6 leftovers" 2016年01月15日 23:34:42 +00:00
Jenkins
7c94b6bfe1 Merge "Show UTC time in swift-recon." 2016年01月15日 06:03:21 +00:00
Samuel Merritt
5d449471b1 Remove some Python 2.6 leftovers
Change-Id: I798d08722c90327c66759aa0bb4526851ba38d41
2016年01月14日 17:26:01 -08:00
Samuel Merritt
3c0cf549f1 Speed up get_more_nodes() when there is an empty zone
The ring has some optimizations in get_more_nodes() so that it can
find handoffs that span all the regions/zones/et cetera and then stop
looking. The stopping is the important part.
Previously, it would quickly find a handoff in each unused region,
then spend way too long looking for more unused regions; the same was
true for zones, IPs, and so on. Thus, in commit 9cd7c6c, we started
counting regions and zones, then stopping when we found them all.
This count included all regions and zones in the ring, regardless of
whether or not there were actually any parts assigned or not. In rings
with an empty region, i.e. a region for which there are only
zero-weight devices, get_more_nodes() would be very slow.
This commit ignores devices with no assigned partitions when counting
regions, zones, and so forth, thus greatly speeding things up.
The output of get_more_nodes() is unchanged. This is purely an
optimization.
Closes-Bug: 1534303
Change-Id: I4a5c57205e87e1205d40fd5d9458d4114e524332
2016年01月14日 13:50:19 -08:00
keliang
70047709fc Drop python 2.6 support
Change-Id: Id6329c863dacb189fccfc304453ed7b6f9607c14
2016年01月15日 00:31:51 +08:00
Jenkins
8460ddd607 Merge "Make object-auditor storage-policy-aware" 2016年01月14日 12:57:57 +00:00
Ondřej Nový
a4c2fe95ab Allow to change auditor sleep interval in config
Change-Id: Ic451c5e0b686509f8982ed1bf65a223a2d77b9a0
2016年01月14日 12:52:52 +01:00
Ondřej Nový
edc823e803 Show UTC time in swift-recon.
It's not consistent now for example local time in replication part and
UTC time at begging of line. Use _ptime in swift-recon for all time
printing and this function returns UTC now.
Change-Id: I732d9851db157130a08e825e8093b7e244b63e9c
2016年01月14日 12:49:09 +01:00
Tim Burke
fa5b32d279 Make object-auditor storage-policy-aware
Previously, the object-auditor would always use a (replication)
DiskFileManager when walking through AuditLocations, which would cause
it to skip EC fragment archives with a warning like:
 Unexpected file <hash_path>/1452557187.03610#3.data:
 Invalid Timestamp value in filename '1452557187.03610#3.data'
Now, the AuditLocation's policy will be used to find an appropriate
manager to get the diskfile. Additionally, several .commit()s were added
to the auditor tests so the .durable will be written, which is required
when auditing EC fragment archives.
Change-Id: I960e7d696fd9ad704ca1872b4ac821f9078838c7
Closes-Bug: 1533002
2016年01月13日 12:48:59 -08:00
Jenkins
f7c8a1834e Merge "Functional tests for if-match with multiple etags" 2016年01月13日 18:01:27 +00:00
Jenkins
dd405d9dd4 Merge "Fix ClientException handling in Container Sync" 2016年01月13日 14:44:00 +00:00
Jenkins
5961c5f7fb Merge "fixups for ipv6 memcache_servers docs" 2016年01月13日 13:41:34 +00:00
Jenkins
00a4e2ce4b Merge "Install liberasurecode packages in SAIO." 2016年01月13日 13:38:29 +00:00
Clay Gerrard
3347646023 fixups for ipv6 memcache_servers docs
Change-Id: I20d91c1e276014eaf210fa9eb43788bc17f4e8df
2016年01月12日 21:08:58 -08:00
Jenkins
a66e5733dd Merge "Print min_part_hours lockout time remaining" 2016年01月13日 03:07:26 +00:00
Jenkins
3077639d3f Merge "swift-init: New option kill-after-timeout" 2016年01月13日 02:53:04 +00:00
Samuel Merritt
d5ff5447be Install liberasurecode packages in SAIO.
Change-Id: If673afa2b61a3e388612debf4860d561960963a3
2016年01月12日 16:42:06 -08:00
Jonathan Hinson
4ffc4ba411 Functional tests for if-match with multiple etags
Multiple etags can be provided on an if-match or if-none-match
request. This is currently being tested in the unit tests, but not
in the functional tests. Since these etags can be modified by
middleware, we need functional tests to assert multiple-etag
requests are handled correctly.
Change-Id: Idc409c85e8aa82b59dc2bc28af6ca2617de82699
2016年01月12日 14:26:38 -06:00
Jenkins
cf94d36bbf Merge "Add note COPY with conditional headers" 2016年01月12日 13:54:31 +00:00
Tim Burke
e6194113a3 Validate X-Timestamps
Previously, attempting to PUT a new object with an X-Timestamp header
less than or equal to zero (ie, for a timestamp on or before 1970年01月01日
00:00:00) would cause the object-server to 500.
While we're at it, cap X-Timestamp at 9999999999 (2286年11月20日 17:46:40)
so we don't get an eleventh digit before the decimal point.
Closes-Bug: 1532471
Change-Id: I23666ec8a067d829eaf9bfe54bd086c320b3429e
2016年01月11日 15:44:30 -08:00