Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: services: ovirt-engine: extend importand limits to their hard limit ......................................................................
packaging: services: ovirt-engine: extend importand limits to their hard limit Change-Id: Ib9f89a1519cf895e0e1504b3e344c9d0fc1481d6 Signed-off-by: Alon Bar-Lev <[email protected]> --- M packaging/services/ovirt-engine/ovirt-engine.py 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/23667/1 diff --git a/packaging/services/ovirt-engine/ovirt-engine.py b/packaging/services/ovirt-engine/ovirt-engine.py index 9ff2769..b23dc28 100755 --- a/packaging/services/ovirt-engine/ovirt-engine.py +++ b/packaging/services/ovirt-engine/ovirt-engine.py @@ -19,6 +19,7 @@ import sys import re import shlex +import resource import gettext _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine') @@ -45,6 +46,11 @@ 'ovirt-engine.conf', ) ) + + def _setLimits(self): + for limit in (resource.RLIMIT_NPROC, resource.RLIMIT_NOFILE): + soft, hard = resource.getrlimit(resource.RLIMIT_NPROC) + resource.setrlimit(resource.RLIMIT_NPROC, (hard, hard)) def _processTemplate(self, template, dir, mode=None): out = os.path.join( @@ -418,6 +424,8 @@ with open(self._config.get('ENGINE_UP_MARK'), 'w') as f: f.write('%s\n' % os.getpid()) + self._setLimits() + self.daemonAsExternalProcess( executable=self._executable, args=self._engineArgs, -- To view, visit http://gerrit.ovirt.org/23667 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9f89a1519cf895e0e1504b3e344c9d0fc1481d6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
