Alon Bar-Lev has uploaded a new change for review.

Change subject: packaging: engine-service: remove setrlimit nofile
......................................................................

packaging: engine-service: remove setrlimit nofile

we install /etc/security/limits.d/10-ovirt-engine.conf with same
content, no need to do this twice.

Change-Id: I82a70741858712207752be028fbaf61a0236684f
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M backend/manager/conf/engine.conf.defaults.in
M packaging/fedora/engine-service.py.in
2 files changed, 0 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/84/13484/1

diff --git a/backend/manager/conf/engine.conf.defaults.in 
b/backend/manager/conf/engine.conf.defaults.in
index 592f359..24dc0fb 100644
--- a/backend/manager/conf/engine.conf.defaults.in
+++ b/backend/manager/conf/engine.conf.defaults.in
@@ -28,11 +28,6 @@
 ENGINE_CACHE=@ENGINE_CACHE@
 
 #
-# Resource limits:
-#
-ENGINE_NOFILE=65535
-
-#
 # Intervals for stoping the engine:
 #
 ENGINE_STOP_TIME=10
diff --git a/packaging/fedora/engine-service.py.in 
b/packaging/fedora/engine-service.py.in
index e74f2c1..76ed4dc 100644
--- a/packaging/fedora/engine-service.py.in
+++ b/packaging/fedora/engine-service.py.in
@@ -25,7 +25,6 @@
 import os
 import pwd
 import re
-import resource
 import shutil
 import signal
 import stat
@@ -378,17 +377,6 @@
         os.remove(enginePidFile)
 
 
-def setLimit(name):
-    limit = eval("resource.RLIMIT_" + name.upper())
-    value = engineConfig.getInteger("ENGINE_" + name.upper())
-    try:
-        resource.setrlimit(limit, (value, value))
-    except:
-        syslog.syslog(syslog.LOG_WARNING,
-            "Can't change the value of the resource "
-            "limit \"%s\" to %d." % (name, value))
-
-
 def startEngine():
     # perform checks:
     checkInstallation()
@@ -564,11 +552,6 @@
         "ENGINE_VAR": engineVarDir,
         "ENGINE_CACHE": engineCacheDir,
     }
-
-    # Change the resource limits while we are root as we won't be
-    # able to change them once we assume the engine identity (the
-    # values come from the configuration):
-    setLimit("nofile")
 
     # this is required to allow
     # writing after user id is changed


--
To view, visit http://gerrit.ovirt.org/13484
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82a70741858712207752be028fbaf61a0236684f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to