--- a/components/openstack/swift/patches/rlimit_nproc.patch Wed Sep 07 14:48:42 2016 -0700
+++ b/components/openstack/swift/patches/rlimit_nproc.patch Wed Sep 07 14:48:42 2016 -0700
@@ -7,20 +7,20 @@
appropriate for upstream (but has not been submitted), depending on whether
RLIMIT_NPROC is unavailable on any platforms other than Solaris.
---- swift-2.3.0/swift/common/manager.py.~2~ 2016-02-08 01:15:05.393368607 -0800
-+++ swift-2.3.0/swift/common/manager.py 2016-02-08 01:15:05.487373162 -0800
-@@ -76,6 +76,8 @@ def setup_env():
+--- swift-2.7.0/swift/common/manager.py.~2~ 2016-08-08 19:02:27.957723715 -0700
++++ swift-2.7.0/swift/common/manager.py 2016-08-08 19:02:28.057288615 -0700
+@@ -81,6 +81,8 @@ def setup_env():
except ValueError:
- print _("WARNING: Unable to modify max process limit. "
- "Running as non-root?")
+ print(_("WARNING: Unable to modify max process limit. "
+ "Running as non-root?"))
+ except AttributeError:
+ pass
# Set PYTHON_EGG_CACHE if it isn't already set
os.environ.setdefault('PYTHON_EGG_CACHE', '/tmp')
---- swift-2.3.0/test/unit/common/test_manager.py.~2~ 2016-02-08 01:15:05.394490747 -0800
-+++ swift-2.3.0/test/unit/common/test_manager.py 2016-02-08 01:20:25.280013617 -0800
-@@ -105,9 +105,10 @@ class TestManagerModule(unittest.TestCas
+--- swift-2.7.0/test/unit/common/test_manager.py.~2~ 2016-08-08 19:02:27.958990495 -0700
++++ swift-2.7.0/test/unit/common/test_manager.py 2016-08-08 19:02:28.058387965 -0700
+@@ -107,9 +107,10 @@ class TestManagerModule(unittest.TestCas
manager.MAX_DESCRIPTORS)),
(resource.RLIMIT_DATA, (manager.MAX_MEMORY,
manager.MAX_MEMORY)),
@@ -30,6 +30,6 @@
+ if getattr(resource, "RLIMIT_NPROC", None):
+ expected.append((resource.RLIMIT_NPROC,
+ (manager.MAX_PROCS, manager.MAX_PROCS)))
- self.assertEquals(manager.resource.called_with_args, expected)
+ self.assertEqual(manager.resource.called_with_args, expected)
self.assertTrue(
manager.os.environ['PYTHON_EGG_CACHE'].startswith('/tmp'))