[systemd-commits] src/core

Kay Sievers kay at kemper.freedesktop.org
Mon May 5 09:54:21 PDT 2014


 src/core/cgroup.c      |    6 ------
 src/core/main.c        |   16 ----------------
 src/core/mount-setup.c |    8 ++++----
 3 files changed, 4 insertions(+), 26 deletions(-)

New commits:
commit 99a17ada9caa8e190b5cafa5cd3c19618feeff48
Author: Kay Sievers <kay at vrfy.org>
Date:   Mon May 5 18:49:43 2014 +0200

    core: require cgroups filesystem to be available
    
    We should no longer pretend that we can run in any sensible way
    without the kernel supporting us with cgroups functionality.

diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 1c05c23..3aeaf56 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -862,12 +862,6 @@ int manager_setup_cgroup(Manager *m) {
 
         assert(m);
 
-        /* 0. Be nice to Ingo Molnar #628004 */
-        if (path_is_mount_point("/sys/fs/cgroup/systemd", false) <= 0) {
-                log_warning("No control group support available, not creating root group.");
-                return 0;
-        }
-
         /* 1. Determine hierarchy */
         free(m->cgroup_root);
         m->cgroup_root = NULL;
diff --git a/src/core/main.c b/src/core/main.c
index a6a5aa7..c1b0ffd 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1184,21 +1184,6 @@ static void test_usr(void) {
                     "Consult http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken for more information.");
 }
 
-static void test_cgroups(void) {
-
-        if (access("/proc/cgroups", F_OK) >= 0)
-                return;
-
-        log_warning("CONFIG_CGROUPS was not set when your kernel was compiled. "
-                    "Systems without control groups are not supported. "
-                    "We will now sleep for 10s, and then continue boot-up. "
-                    "Expect breakage and please do not file bugs. "
-                    "Instead fix your kernel and enable CONFIG_CGROUPS. "
-                    "Consult http://0pointer.de/blog/projects/cgroups-vs-cgroups.html for more information.");
-
-        sleep(10);
-}
-
 static int initialize_join_controllers(void) {
         /* By default, mount "cpu" + "cpuacct" together, and "net_cls"
          * + "net_prio". We'd like to add "cpuset" to the mix, but
@@ -1586,7 +1571,6 @@ int main(int argc, char *argv[]) {
 
                 test_mtab();
                 test_usr();
-                test_cgroups();
         }
 
         if (arg_running_as == SYSTEMD_SYSTEM && arg_runtime_watchdog > 0)
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 0a45b24..34d71e5 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -92,13 +92,13 @@ static const MountPoint mount_table[] = {
         { "tmpfs",      "/run",                      "tmpfs",      "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME,
           NULL,       MNT_FATAL|MNT_IN_CONTAINER },
         { "tmpfs",      "/sys/fs/cgroup",            "tmpfs",      "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
-          NULL,       MNT_IN_CONTAINER },
+          NULL,       MNT_FATAL|MNT_IN_CONTAINER },
 #ifdef HAVE_XATTR
         { "cgroup",     "/sys/fs/cgroup/systemd",    "cgroup",     "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,
-          NULL,       MNT_IN_CONTAINER },
+          NULL,       MNT_FATAL|MNT_IN_CONTAINER },
 #endif
         { "cgroup",     "/sys/fs/cgroup/systemd",    "cgroup",     "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV,
-          NULL,       MNT_IN_CONTAINER },
+          NULL,       MNT_FATAL|MNT_IN_CONTAINER },
         { "pstore",     "/sys/fs/pstore",            "pstore",     NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
           NULL,       MNT_NONE },
 #ifdef ENABLE_EFI
@@ -188,7 +188,7 @@ static int mount_one(const MountPoint *p, bool relabel) {
                   p->type,
                   p->flags,
                   p->options) < 0) {
-                log_full((p->mode & MNT_FATAL) ? LOG_ERR : LOG_DEBUG, "Failed to mount %s: %m", p->where);
+                log_full((p->mode & MNT_FATAL) ? LOG_ERR : LOG_DEBUG, "Failed to mount %s at %s: %m", p->type, p->where);
                 return (p->mode & MNT_FATAL) ? -errno : 0;
         }
 



More information about the systemd-commits mailing list