[systemd-commits] 2 commits - TODO src/logind-dbus.c units/systemd-logind.service.in units/systemd-stdout-syslog-bridge.service.in

Lennart Poettering lennart at kemper.freedesktop.org
Mon Oct 10 19:44:45 PDT 2011


 TODO                                          |    6 ------
 src/logind-dbus.c                             |    7 +++++--
 units/systemd-logind.service.in               |    4 ++++
 units/systemd-stdout-syslog-bridge.service.in |    4 ++++
 4 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit f84aea434f2b014716ce9067f0af4db24a91a7c4
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 11 04:43:29 2011 +0200

    units: increase LimitNOFILE a bit
    
    since we need one fd per session (for logind) and one fd per service
    (for stdout-syslog-bridge) increase the default rlimit a bit.

diff --git a/TODO b/TODO
index 779d1a3..99e026e 100644
--- a/TODO
+++ b/TODO
@@ -26,8 +26,6 @@ Features:
 
 * default to actual 32bit PIDs, via /proc/sys/kernel/pid_max
 
-* increase RLIMIT_NOFILE for logind, logger by default
-
 * add an option to make mounts private/shareable and so on, enable this for root by default
 
 * internal restart counter for units (focus on auto-respawn)
diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in
index 82a2c6a..4241b8b 100644
--- a/units/systemd-logind.service.in
+++ b/units/systemd-logind.service.in
@@ -16,3 +16,7 @@ Type=dbus
 BusName=org.freedesktop.login1
 CapabilityBoundingSet=CAP_AUDIT_CONTROL CAP_CHOWN CAP_KILL CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE CAP_FOWNER
 StandardOutput=syslog
+
+# Increase the default a bit in order to allow many simultaneous
+# logins since we keep one fd open per session.
+LimitNOFILE=16384
diff --git a/units/systemd-stdout-syslog-bridge.service.in b/units/systemd-stdout-syslog-bridge.service.in
index 23a5137..4626145 100644
--- a/units/systemd-stdout-syslog-bridge.service.in
+++ b/units/systemd-stdout-syslog-bridge.service.in
@@ -18,3 +18,7 @@ ExecStart=@rootlibexecdir@/systemd-stdout-syslog-bridge
 NotifyAccess=all
 StandardOutput=null
 CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SETUID CAP_SETGID
+
+# Increase the default a bit in order to allow many simultaneous
+# services being run since we keep one fd open per service.
+LimitNOFILE=16384

commit 688c56ff7d124124007761f917a2950364509043
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 11 04:43:01 2011 +0200

    logind: fail gracefully if too many sessions are created
    
    https://bugzilla.redhat.com/show_bug.cgi?id=744726

diff --git a/TODO b/TODO
index aa51332..779d1a3 100644
--- a/TODO
+++ b/TODO
@@ -17,14 +17,10 @@ Bugfixes:
 
 * make polkit checks async
 
-* fail gracefully if logind reaches it RLIMIT_NFILES for fifos
-
 Features:
 
 * ConditionCapability=
 
-* read fedora style timezone name config for compat
-
 * if we can not get user quota for tmpfs, mount a separate tmpfs instance
   for every user in /run/user/$USER with a configured maximum size
 
diff --git a/src/logind-dbus.c b/src/logind-dbus.c
index bc1e49d..0550d1b 100644
--- a/src/logind-dbus.c
+++ b/src/logind-dbus.c
@@ -973,8 +973,11 @@ static DBusHandlerResult manager_message_handler(
         } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "CreateSession")) {
 
                 r = bus_manager_create_session(m, message, &reply);
-                if (r == -ENOMEM)
-                        goto oom;
+
+                /* Don't delay the work on OOM here, since it might be
+                 * triggered by a low RLIMIT_NOFILE here (since we
+                 * send a dupped fd to the client), and we'd rather
+                 * see this fail quickly then be retried later */
 
                 if (r < 0)
                         return bus_send_error_reply(connection, message, &error, r);



More information about the systemd-commits mailing list