|
1 In-house removal of PyECLib in Swift since we do not support the |
|
2 Erasure Code storage policy. |
|
3 This patch is Solaris-specific and not suitable for upstream. |
|
4 |
|
5 --- swift-2.3.0/requirements.txt.~1~ 2015-04-30 09:57:42.000000000 -0400 |
|
6 +++ swift-2.3.0/requirements.txt 2016-01-22 14:34:21.669065681 -0500 |
|
7 @@ -9,4 +9,3 @@ |
|
8 pastedeploy>=1.3.3 |
|
9 simplejson>=2.0.9 |
|
10 xattr>=0.4 |
|
11 -PyECLib>=1.0.7 |
|
12 --- swift-2.3.0/swift.egg-info/requires.txt.~1~ 2015-04-30 09:59:12.000000000 -0400 |
|
13 +++ swift-2.3.0/swift.egg-info/requires.txt 2016-01-22 14:35:06.808030835 -0500 |
|
14 @@ -5,4 +5,3 @@ |
|
15 pastedeploy>=1.3.3 |
|
16 simplejson>=2.0.9 |
|
17 xattr>=0.4 |
|
18 -PyECLib>=1.0.7 |
|
19 --- swift-2.3.0/swift/common/storage_policy.py.~1~ 2015-04-30 09:57:42.000000000 -0400 |
|
20 +++ swift-2.3.0/swift/common/storage_policy.py 2016-01-22 14:34:21.669774386 -0500 |
|
21 @@ -19,7 +19,12 @@ |
|
22 from swift.common.ring import Ring |
|
23 from swift.common.utils import quorum_size |
|
24 from swift.common.exceptions import RingValidationError |
|
25 -from pyeclib.ec_iface import ECDriver, ECDriverError, VALID_EC_TYPES |
|
26 + |
|
27 +# Attempt to load PyEClib if installed |
|
28 +try: |
|
29 + from pyeclib.ec_iface import ECDriver, ECDriverError, VALID_EC_TYPES |
|
30 +except ImportError: |
|
31 + pass |
|
32 |
|
33 LEGACY_POLICY_NAME = 'Policy-0' |
|
34 VALID_CHARS = '-' + string.letters + string.digits |
|
35 --- swift-2.3.0/swift/proxy/controllers/obj.py.~1~ 2015-04-30 09:57:42.000000000 -0400 |
|
36 +++ swift-2.3.0/swift/proxy/controllers/obj.py 2016-01-22 14:34:21.670425554 -0500 |
|
37 @@ -60,7 +60,7 @@ |
|
38 HTTP_SERVICE_UNAVAILABLE, HTTP_INSUFFICIENT_STORAGE, |
|
39 HTTP_PRECONDITION_FAILED, HTTP_CONFLICT, is_informational) |
|
40 from swift.common.storage_policy import (POLICIES, REPL_POLICY, EC_POLICY, |
|
41 - ECDriverError, PolicyError) |
|
42 + PolicyError) |
|
43 from swift.proxy.controllers.base import Controller, delay_denial, \ |
|
44 cors_validation |
|
45 from swift.common.swob import HTTPAccepted, HTTPBadRequest, HTTPNotFound, \ |
|
46 @@ -70,6 +70,11 @@ |
|
47 from swift.common.request_helpers import is_sys_or_user_meta, is_sys_meta, \ |
|
48 remove_items, copy_header_subset, close_if_possible |
|
49 |
|
50 +# Load PyEClib if installed |
|
51 +try: |
|
52 + from swift.common.storage_policy import ECDriverError |
|
53 +except ImportError: |
|
54 + pass |
|
55 |
|
56 def copy_headers_into(from_r, to_r): |
|
57 """ |