RLIMIT_NPROC isn't implemented on Solaris, and it's not even clear what it
would mean, given the differences between the Solaris and Linux thread
models. Solaris has some resource controls that are similar: per-task and
per-project max-lwps and max-processes.
For the time being, just ignore the use of RLIMIT_NPROC. This might be
appropriate for upstream (but has not been submitted), depending on whether
RLIMIT_NPROC is unavailable on any platforms other than Solaris.
--- 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?"))
+ except AttributeError:
+ pass
# Set PYTHON_EGG_CACHE if it isn't already set
os.environ.setdefault('PYTHON_EGG_CACHE', '/tmp')
--- 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_PROCS)),
]
+ if getattr(resource, "RLIMIT_NPROC", None):
manager.os.environ['PYTHON_EGG_CACHE'].startswith('/tmp'))