[systemd-commits] 3 commits - TODO src/core src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Wed Jul 10 14:51:46 PDT 2013


 TODO                     |    5 -----
 src/core/main.c          |    8 +++++---
 src/shared/cgroup-util.c |   13 ++++++++++++-
 3 files changed, 17 insertions(+), 9 deletions(-)

New commits:
commit 66713f77e851c12452729d37e22ef66673852b8f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jul 10 23:50:28 2013 +0200

    core: uninstall cgroup agent only if we are running outside of a container
    
    Since the cgroupfs is currently not virtualized for containers we
    shouldn't reset the hosts agent from the container.

diff --git a/src/core/main.c b/src/core/main.c
index efc5791..0ba1d15 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1943,9 +1943,11 @@ finish:
                         watchdog_close(true);
                 }
 
-                /* avoid the creation of new processes forked by the kernel; at this
-                 * point, we will not listen to the signals anyway */
-                cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER);
+                /* Avoid the creation of new processes forked by the
+                 * kernel; at this point, we will not listen to the
+                 * signals anyway */
+                if (detect_container(NULL) <= 0)
+                        cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER);
 
                 execve(SYSTEMD_SHUTDOWN_BINARY_PATH, (char **) command_line, env_block);
                 free(env_block);

commit ac9ef33358b6e6277cfca86a85a49a022824549e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jul 10 23:47:15 2013 +0200

    cgroup: when uninstalling agent, actually turn it off first

diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index 73013d1..8f3c64f 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -794,6 +794,17 @@ int cg_uninstall_release_agent(const char *controller) {
         _cleanup_free_ char *fs = NULL;
         int r;
 
+        r = cg_get_path(controller, NULL, "notify_on_release", &fs);
+        if (r < 0)
+                return r;
+
+        r = write_string_file(fs, "0");
+        if (r < 0)
+                return r;
+
+        free(fs);
+        fs = NULL;
+
         r = cg_get_path(controller, NULL, "release_agent", &fs);
         if (r < 0)
                 return r;
@@ -802,7 +813,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-	return 0;
+        return 0;
 }
 
 int cg_is_empty(const char *controller, const char *path, bool ignore_self) {

commit 49998ede042907b0ba7f5e85e02fa569da26bc04
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jul 10 23:46:30 2013 +0200

    update TODO

diff --git a/TODO b/TODO
index 7d413a8..420f0cc 100644
--- a/TODO
+++ b/TODO
@@ -90,14 +90,9 @@ Features:
 
 * journald: make sure ratelimit is actually really per-service with the new cgroup changes
 
-* move systemctl dump to systemd-analyze
-
 * libsystemd-logind: sd_session_is_active() and friends: verify
   validity of session name before appending it to a path
 
-* logind: when a PAM client calls ReleaseSession() start a timeout and
-  kill the session entirely after that is reached.
-
 * gparted needs to disable auto-activation of mount units somehow, or
   maybe we should stop doing auto-activiation of this after boot
   entirely. https://bugzilla.gnome.org/show_bug.cgi?id=701676



More information about the systemd-commits mailing list