In-house removal of PyECLib in Swift since we do not support the
Erasure Code storage policy.
This patch is Solaris-specific and not suitable for upstream.
--- swift-2.3.0/requirements.txt.~1~ 2015-04-30 06:57:42.000000000 -0700
+++ swift-2.3.0/requirements.txt 2016-02-10 22:26:24.654342455 -0800
@@ -9,4 +9,3 @@ netifaces>=0.5,!=0.10.0,!=0.10.1
pastedeploy>=1.3.3
simplejson>=2.0.9
xattr>=0.4
-PyECLib>=1.0.7
--- swift-2.3.0/swift.egg-info/requires.txt.~1~ 2015-04-30 06:59:12.000000000 -0700
+++ swift-2.3.0/swift.egg-info/requires.txt 2016-02-10 22:26:28.217050442 -0800
@@ -4,5 +4,4 @@ greenlet>=0.3.1
netifaces>=0.5,!=0.10.0,!=0.10.1
pastedeploy>=1.3.3
simplejson>=2.0.9
-xattr>=0.4
-PyECLib>=1.0.7
+xattr>=0.4
\ No newline at end of file
--- swift-2.3.0/swift/common/storage_policy.py.~1~ 2015-04-30 06:57:42.000000000 -0700
+++ swift-2.3.0/swift/common/storage_policy.py 2016-02-10 22:26:24.656850844 -0800
@@ -19,7 +19,12 @@ from swift.common.utils import config_tr
from swift.common.ring import Ring
from swift.common.utils import quorum_size
from swift.common.exceptions import RingValidationError
-from pyeclib.ec_iface import ECDriver, ECDriverError, VALID_EC_TYPES
+
+# Attempt to load PyEClib if installed
+try:
+ from pyeclib.ec_iface import ECDriver, ECDriverError, VALID_EC_TYPES
+except ImportError:
+ pass
LEGACY_POLICY_NAME = 'Policy-0'
VALID_CHARS = '-' + string.letters + string.digits
--- swift-2.3.0/swift/proxy/controllers/obj.py.~2~ 2016-02-10 22:26:24.472991667 -0800
+++ swift-2.3.0/swift/proxy/controllers/obj.py 2016-02-10 22:26:24.659144290 -0800
@@ -60,7 +60,7 @@ from swift.common.http import (
HTTP_SERVICE_UNAVAILABLE, HTTP_INSUFFICIENT_STORAGE,
HTTP_PRECONDITION_FAILED, HTTP_CONFLICT, is_informational)
from swift.common.storage_policy import (POLICIES, REPL_POLICY, EC_POLICY,
- ECDriverError, PolicyError)
+ PolicyError)
from swift.proxy.controllers.base import Controller, delay_denial, \
cors_validation
from swift.common.swob import HTTPAccepted, HTTPBadRequest, HTTPNotFound, \
@@ -70,6 +70,12 @@ from swift.common.swob import HTTPAccept
from swift.common.request_helpers import is_sys_or_user_meta, is_sys_meta, \
remove_items, copy_header_subset
+# Load PyEClib if installed
+try:
+ from swift.common.storage_policy import ECDriverError
+except ImportError:
+ pass
+
def copy_headers_into(from_r, to_r):
"""