[systemd-commits] 7 commits - NEWS TODO man/systemd-system.conf.xml man/systemd.unit.xml src/core src/journal units/basic.target units/poweroff.target units/reboot.target

Lennart Poettering lennart at kemper.freedesktop.org
Mon Oct 27 18:20:31 PDT 2014


 NEWS                                  |   21 +++++++++++++----
 TODO                                  |   10 --------
 man/systemd-system.conf.xml           |   26 ---------------------
 man/systemd.unit.xml                  |   41 ++++++++++++++++++++++++----------
 src/core/dbus-unit.c                  |    3 ++
 src/core/job.c                        |    8 ++++--
 src/core/load-fragment-gperf.gperf.m4 |    2 +
 src/core/main.c                       |   12 ---------
 src/core/manager.c                    |   37 ------------------------------
 src/core/manager.h                    |    8 ------
 src/core/system.conf                  |    3 --
 src/core/unit.c                       |    8 ++++++
 src/core/unit.h                       |    4 +++
 src/journal/journal-file.c            |    5 ++--
 units/basic.target                    |    2 +
 units/poweroff.target                 |    2 +
 units/reboot.target                   |    2 +
 17 files changed, 77 insertions(+), 117 deletions(-)

New commits:
commit ca4a7a9a364fba4396ebed393bc4e9194cd9caea
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 28 02:19:37 2014 +0100

    update TODO

diff --git a/TODO b/TODO
index af224e9..d453251 100644
--- a/TODO
+++ b/TODO
@@ -2,8 +2,6 @@ Fixes needed before 217:
 
 * sd_session_get_desktop() yells at me?
 
-* change startup timeout to not cover the full bootup, but only sysinit part (see below)
-
 * remove Discard= in .mount units and replace it by Options=, to prepare for later swapon fix
 
 * verify that both resolved and timesyncd work OK without networkd around
@@ -65,8 +63,6 @@ Features:
 
 * what to do about udev db binary stability for apps?
 
-* add a system-wide shutdown timeout, similar to the startup timeout we already have (see fdo bz #84110)
-
 * maybe provide an API to allow migration of foreign PIDs into existing scopes.
 
 * kdbus: maybe rename "connection name" concept to something that doesn't reuse the word "name"?
@@ -108,10 +104,6 @@ Features:
 
 * exponential backoff in timesyncd and resolved when we cannot reach a server
 
-* apply start timeout during the "initializing" manager state only,
-  instead of both "initializing" and "starting". maybe rename the
-  timeout to "initialization-timeout" then or so?
-
 * journald: make use of uid-range.h to managed uid ranges to split
   journals in.
 

commit 4ffd29fda1a2621d8f1711ccaad723d327fef93a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 28 02:17:12 2014 +0100

    Update NEWS

diff --git a/NEWS b/NEWS
index f44db4a..e86516c 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,23 @@ CHANGES WITH 217:
           /run/systemd/user directory that was already previously
           supported, but is under the control of the user.
 
+        * Job timeouts (i.e. time-outs on the time a job that is
+          queued stays in the run queue) can now optionally result in
+          immediate reboot or power-off actions (JobTimeoutAction= and
+          JobTimeoutRebootArgument=). This is useful on ".target"
+          units, to limit the maximum time a target remains
+          undispatched in the run queue, and to trigger an emergency
+          operation in such a case. This is now used by default to
+          turn off the system if boot-up (as defined by everything in
+          basic.target) hangs and does not complete for at least
+          15min. Also, if power-off or reboot hang for at least 30min
+          an immediate power-off/reboot operation is triggered. This
+          functionality is particularly useful to increase reliability
+          on embedded devices, but also on laptops which might
+          accidentally get powered on when carried in a backpack and
+          whose boot stays stuck in a hard disk encryption passphrase
+          question.
+
         * systemd-logind can be configured to also handle lid switch
           events even when the machine is docked or multiple displays
           are attached (HandleLidSwitchDocked= option).

commit 3898b80d409ae16b049d46f883bf763417bb4c8a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 28 01:49:39 2014 +0100

    units: define appropriate job timeout actions when boot or shutdown timeouts are hit
    
    Using the new JobTimeoutAction= setting make sure we power off the
    machine after basic.target is queued for longer than 15min but not
    executed. Similar, if poweroff.target is queued for longer than 30min
    but does not complete, forcibly turn off the system. Similar, if
    reboot.target is queued for longer than 30min but does not complete,
    forcibly reboot the system.

diff --git a/units/basic.target b/units/basic.target
index b890d48..228f62c 100644
--- a/units/basic.target
+++ b/units/basic.target
@@ -11,3 +11,5 @@ Documentation=man:systemd.special(7)
 Requires=sysinit.target
 Wants=sockets.target timers.target paths.target slices.target
 After=sysinit.target sockets.target timers.target paths.target slices.target
+JobTimeoutSec=15min
+JobTimeoutAction=poweroff-force
diff --git a/units/poweroff.target b/units/poweroff.target
index 7187103..dd92d81 100644
--- a/units/poweroff.target
+++ b/units/poweroff.target
@@ -12,6 +12,8 @@ DefaultDependencies=no
 Requires=systemd-poweroff.service
 After=systemd-poweroff.service
 AllowIsolate=yes
+JobTimeoutSec=30min
+JobTimeoutAction=poweroff-force
 
 [Install]
 Alias=ctrl-alt-del.target
diff --git a/units/reboot.target b/units/reboot.target
index dec8f56..668b98d 100644
--- a/units/reboot.target
+++ b/units/reboot.target
@@ -12,6 +12,8 @@ DefaultDependencies=no
 Requires=systemd-reboot.service
 After=systemd-reboot.service
 AllowIsolate=yes
+JobTimeoutSec=30min
+JobTimeoutAction=reboot-force
 
 [Install]
 Alias=ctrl-alt-del.target

commit f189ab18de69d3dee81117d7925fb370cd038f0f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 28 01:49:07 2014 +0100

    job: optionally, when a job timeout is hit, also execute a failure action

diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 88c9d7f..803eff2 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -888,20 +888,22 @@
 
                         <varlistentry>
                                 <term><varname>JobTimeoutSec=</varname></term>
-
-                                <listitem><para>When clients are
-                                waiting for a job of this unit to
-                                complete, time out after the specified
-                                time. If this time limit is reached,
-                                the job will be cancelled, the unit
-                                however will not change state or even
-                                enter the <literal>failed</literal>
-                                mode. This value defaults to 0 (job
-                                timeouts disabled), except for device
+                                <term><varname>JobTimeoutAction=</varname></term>
+                                <term><varname>JobTimeoutRebootArgument=</varname></term>
+
+                                <listitem><para>When a job for this
+                                unit is queued a time-out may be
+                                configured. If this time limit is
+                                reached, the job will be cancelled,
+                                the unit however will not change state
+                                or even enter the
+                                <literal>failed</literal> mode. This
+                                value defaults to 0 (job timeouts
+                                disabled), except for device
                                 units. NB: this timeout is independent
                                 from any unit-specific timeout (for
                                 example, the timeout set with
-                                <varname>Timeout=</varname> in service
+                                <varname>StartTimeoutSec=</varname> in service
                                 units) as the job timeout has no
                                 effect on the unit itself, only on the
                                 job that might be pending for it. Or
@@ -911,7 +913,22 @@
                                 timeout set with this option however
                                 is useful to abort only the job
                                 waiting for the unit state to
-                                change.</para></listitem>
+                                change.</para>
+
+                                <para><varname>JobTimeoutAction=</varname>
+                                optionally configures an additional
+                                action to take when the time-out is
+                                hit. It takes the same values as the
+                                per-service
+                                <varname>StartLimitAction=</varname>
+                                setting, see
+                                <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                                for details. Defaults to
+                                <option>none</option>. <varname>JobTimeoutRebootArgument=</varname>
+                                configures an optional reboot string
+                                to pass to the
+                                <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+                                system call.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 8fe83ae..5f2276a 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -33,6 +33,7 @@
 
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_load_state, unit_load_state, UnitLoadState);
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_job_mode, job_mode, JobMode);
+static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_failure_action, failure_action, FailureAction);
 
 static int property_get_names(
                 sd_bus *bus,
@@ -562,6 +563,8 @@ const sd_bus_vtable bus_unit_vtable[] = {
         SD_BUS_PROPERTY("IgnoreOnSnapshot", "b", bus_property_get_bool, offsetof(Unit, ignore_on_snapshot), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("NeedDaemonReload", "b", property_get_need_daemon_reload, 0, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("JobTimeoutUSec", "t", bus_property_get_usec, offsetof(Unit, job_timeout), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("JobTimeoutAction", "s", property_get_failure_action, offsetof(Unit, job_timeout_action), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("JobTimeoutRebootArgument", "s", NULL, offsetof(Unit, job_timeout_reboot_arg), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("ConditionResult", "b", bus_property_get_bool, offsetof(Unit, condition_result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         BUS_PROPERTY_DUAL_TIMESTAMP("ConditionTimestamp", offsetof(Unit, condition_timestamp), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("Conditions", "a(sbbsi)", property_get_conditions, 0, 0),
diff --git a/src/core/job.c b/src/core/job.c
index ef5dbce..aa205ba 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -858,14 +858,18 @@ finish:
 
 static int job_dispatch_timer(sd_event_source *s, uint64_t monotonic, void *userdata) {
         Job *j = userdata;
+        Unit *u;
 
         assert(j);
         assert(s == j->timer_event_source);
 
-        log_warning_unit(j->unit->id, "Job %s/%s timed out.",
-                         j->unit->id, job_type_to_string(j->type));
+        log_warning_unit(j->unit->id, "Job %s/%s timed out.", j->unit->id, job_type_to_string(j->type));
 
+        u = j->unit;
         job_finish_and_invalidate(j, JOB_TIMEOUT, true);
+
+        failure_action(u->manager, u->job_timeout_action, u->job_timeout_reboot_arg);
+
         return 0;
 }
 
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
index 8805411..26d40fb 100644
--- a/src/core/load-fragment-gperf.gperf.m4
+++ b/src/core/load-fragment-gperf.gperf.m4
@@ -152,6 +152,8 @@ Unit.OnFailureIsolate,           config_parse_job_mode_isolate,      0,
 Unit.IgnoreOnIsolate,            config_parse_bool,                  0,                             offsetof(Unit, ignore_on_isolate)
 Unit.IgnoreOnSnapshot,           config_parse_bool,                  0,                             offsetof(Unit, ignore_on_snapshot)
 Unit.JobTimeoutSec,              config_parse_sec,                   0,                             offsetof(Unit, job_timeout)
+Unit.JobTimeoutAction,           config_parse_failure_action,        0,                             offsetof(Unit, job_timeout_action)
+Unit.JobTimeoutRebootArgument,   config_parse_string,                0,                             offsetof(Unit, job_timeout_reboot_arg)
 Unit.ConditionPathExists,        config_parse_unit_condition_path,   CONDITION_PATH_EXISTS,         0
 Unit.ConditionPathExistsGlob,    config_parse_unit_condition_path,   CONDITION_PATH_EXISTS_GLOB,    0
 Unit.ConditionPathIsDirectory,   config_parse_unit_condition_path,   CONDITION_PATH_IS_DIRECTORY,   0
diff --git a/src/core/unit.c b/src/core/unit.c
index e40e6f2..afb760d 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -520,6 +520,8 @@ void unit_free(Unit *u) {
         strv_free(u->dropin_paths);
         free(u->instance);
 
+        free(u->job_timeout_reboot_arg);
+
         set_free_free(u->names);
 
         unit_unwatch_all_pids(u);
@@ -921,6 +923,12 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
         if (u->job_timeout > 0)
                 fprintf(f, "%s\tJob Timeout: %s\n", prefix, format_timespan(timespan, sizeof(timespan), u->job_timeout, 0));
 
+        if (u->job_timeout_action != FAILURE_ACTION_NONE)
+                fprintf(f, "%s\tJob Timeout Action: %s\n", prefix, failure_action_to_string(u->job_timeout_action));
+
+        if (u->job_timeout_reboot_arg)
+                fprintf(f, "%s\tJob Timeout Reboot Argument: %s\n", prefix, u->job_timeout_reboot_arg);
+
         condition_dump_list(u->conditions, f, prefix);
 
         if (dual_timestamp_is_set(&u->condition_timestamp))
diff --git a/src/core/unit.h b/src/core/unit.h
index 43ab4d1..bbad546 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -41,6 +41,7 @@ typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
 #include "condition.h"
 #include "install.h"
 #include "unit-name.h"
+#include "failure-action.h"
 
 enum UnitActiveState {
         UNIT_ACTIVE,
@@ -112,7 +113,10 @@ struct Unit {
         /* JOB_NOP jobs are special and can be installed without disturbing the real job. */
         Job *nop_job;
 
+        /* Job timeout and action to take */
         usec_t job_timeout;
+        FailureAction job_timeout_action;
+        char *job_timeout_reboot_arg;
 
         /* References to this */
         LIST_HEAD(UnitRef, refs);

commit fa1b91632c5220e6589007af4cd573ca909f915a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 28 01:42:13 2014 +0100

    core: remove system start timeout logic again
    
    The system start timeout as previously implemented would get confused by
    long-running services that are included in the initial system startup
    transaction for example by being cron-job-like long-running services
    triggered immediately at boot. Such long-running jobs would be subject
    to the default 15min timeout, esily triggering it.
    
    Hence, remove this again. In a subsequent commit, introduce per-target
    job timeouts instead, that allow us to control these timeouts more
    finegrained.

diff --git a/NEWS b/NEWS
index e909046..f44db4a 100644
--- a/NEWS
+++ b/NEWS
@@ -22,12 +22,6 @@ CHANGES WITH 217:
           /run/systemd/user directory that was already previously
           supported, but is under the control of the user.
 
-        * A timeout for the bootup of the whole system can now be
-          configured. The system can be configured to reboot or
-          poweroff if the basic system default target is not reached
-          before the timeout (new StartTimeoutSec=,
-          StartTimeoutAction=, StartTimeoutRebootArgument= options).
-
         * systemd-logind can be configured to also handle lid switch
           events even when the machine is docked or multiple displays
           are attached (HandleLidSwitchDocked= option).
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
index 1fad1db..284516d 100644
--- a/man/systemd-system.conf.xml
+++ b/man/systemd-system.conf.xml
@@ -280,32 +280,6 @@
                         </varlistentry>
 
                         <varlistentry>
-                                <term><varname>StartTimeoutSec=</varname></term>
-                                <term><varname>StartTimeoutAction=</varname></term>
-                                <term><varname>StartTimeoutRebootArgument=</varname></term>
-
-                                <listitem><para>Configures an over-all
-                                system start-up timeout and controls
-                                what to do when the timeout is
-                                reached. <varname>StartTimeoutSec=</varname>
-                                specifies the timeout, and defaults to
-                                <literal>15min</literal>. <varname>StartTimeoutAction=</varname>
-                                configures the action to take when the
-                                system did not finish boot-up within
-                                the specified time. It takes the same
-                                values as the per-service
-                                <varname>StartLimitAction=</varname>
-                                setting, see
-                                <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-                                for details. Defaults to
-                                <option>poweroff-force</option>. <varname>StartTimeoutRebootArgument=</varname>
-                                configures an optional reboot string
-                                to pass to the
-                                <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
-                                system call.</para></listitem>
-                        </varlistentry>
-
-                        <varlistentry>
                                 <term><varname>DefaultTimerAccuracySec=</varname></term>
 
                                 <listitem><para>Sets the default
diff --git a/src/core/main.c b/src/core/main.c
index 95597de..a0a6ae1 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -116,9 +116,6 @@ static FILE* arg_serialization = NULL;
 static bool arg_default_cpu_accounting = false;
 static bool arg_default_blockio_accounting = false;
 static bool arg_default_memory_accounting = false;
-static usec_t arg_start_timeout_usec = DEFAULT_MANAGER_START_TIMEOUT_USEC;
-static FailureAction arg_start_timeout_action = FAILURE_ACTION_POWEROFF_FORCE;
-static char *arg_start_timeout_reboot_arg = NULL;
 
 static void nop_handler(int sig) {}
 
@@ -673,9 +670,6 @@ static int parse_config_file(void) {
                 { "Manager", "DefaultCPUAccounting",      config_parse_bool,             0, &arg_default_cpu_accounting            },
                 { "Manager", "DefaultBlockIOAccounting",  config_parse_bool,             0, &arg_default_blockio_accounting        },
                 { "Manager", "DefaultMemoryAccounting",   config_parse_bool,             0, &arg_default_memory_accounting         },
-                { "Manager", "StartTimeoutSec",           config_parse_sec,              0, &arg_start_timeout_usec                },
-                { "Manager", "StartTimeoutAction",        config_parse_failure_action,   0, &arg_start_timeout_action              },
-                { "Manager", "StartTimeoutRebootArgument",config_parse_string,           0, &arg_start_timeout_reboot_arg          },
                 {}
         };
 
@@ -1635,9 +1629,6 @@ int main(int argc, char *argv[]) {
         m->default_memory_accounting = arg_default_memory_accounting;
         m->runtime_watchdog = arg_runtime_watchdog;
         m->shutdown_watchdog = arg_shutdown_watchdog;
-        m->start_timeout_usec = arg_start_timeout_usec;
-        m->start_timeout_action = arg_start_timeout_action;
-        free_and_strdup(&m->start_timeout_reboot_arg, arg_start_timeout_reboot_arg);
 
         m->userspace_timestamp = userspace_timestamp;
         m->kernel_timestamp = kernel_timestamp;
@@ -1827,9 +1818,6 @@ finish:
         set_free(arg_syscall_archs);
         arg_syscall_archs = NULL;
 
-        free(arg_start_timeout_reboot_arg);
-        arg_start_timeout_reboot_arg = NULL;
-
         mac_selinux_finish();
 
         if (reexecute) {
diff --git a/src/core/manager.c b/src/core/manager.c
index b790d18..7091789 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -459,8 +459,6 @@ int manager_new(SystemdRunningAs running_as, bool test_run, Manager **_m) {
         m->running_as = running_as;
         m->exit_code = _MANAGER_EXIT_CODE_INVALID;
         m->default_timer_accuracy_usec = USEC_PER_MINUTE;
-        m->start_timeout_usec = DEFAULT_MANAGER_START_TIMEOUT_USEC;
-        m->start_timeout_action = FAILURE_ACTION_POWEROFF_FORCE;
 
         m->idle_pipe[0] = m->idle_pipe[1] = m->idle_pipe[2] = m->idle_pipe[3] = -1;
 
@@ -863,9 +861,6 @@ void manager_free(Manager *m) {
 
         manager_close_idle_pipe(m);
 
-        sd_event_source_unref(m->start_timeout_event_source);
-        free(m->start_timeout_reboot_arg);
-
         udev_unref(m->udev);
         sd_event_unref(m->event);
 
@@ -1013,20 +1008,6 @@ static int manager_distribute_fds(Manager *m, FDSet *fds) {
         return 0;
 }
 
-static int on_start_timeout(sd_event_source *s, usec_t usec, void *userdata) {
-        Manager *m = userdata;
-
-        assert(s);
-        assert(m);
-
-        m->start_timeout_event_source = sd_event_source_unref(m->start_timeout_event_source);
-
-        log_error("Startup timed out.");
-
-        failure_action(m, m->start_timeout_action, m->start_timeout_reboot_arg);
-        return 0;
-}
-
 int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
         int r, q;
 
@@ -1099,22 +1080,6 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
                 m->send_reloading_done = true;
         }
 
-        /* Possibly set up a start timeout */
-        if (!dual_timestamp_is_set(&m->finish_timestamp)) {
-                m->start_timeout_event_source = sd_event_source_unref(m->start_timeout_event_source);
-
-                if (m->start_timeout_usec) {
-                        r = sd_event_add_time(
-                                        m->event,
-                                        &m->start_timeout_event_source,
-                                        CLOCK_MONOTONIC,
-                                        now(CLOCK_MONOTONIC) + m->start_timeout_usec, 0,
-                                        on_start_timeout, m);
-                        if (r < 0)
-                                log_error("Failed to add start timeout event: %s", strerror(-r));
-                }
-        }
-
         return r;
 }
 
@@ -2558,8 +2523,6 @@ void manager_check_finished(Manager *m) {
 
         dual_timestamp_get(&m->finish_timestamp);
 
-        m->start_timeout_event_source = sd_event_source_unref(m->start_timeout_event_source);
-
         if (m->running_as == SYSTEMD_SYSTEM && detect_container(NULL) <= 0) {
 
                 /* Note that m->kernel_usec.monotonic is always at 0,
diff --git a/src/core/manager.h b/src/core/manager.h
index 8e3c146..6582167 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -33,8 +33,6 @@
 /* Enforce upper limit how many names we allow */
 #define MANAGER_MAX_NAMES 131072 /* 128K */
 
-#define DEFAULT_MANAGER_START_TIMEOUT_USEC (15*USEC_PER_MINUTE)
-
 typedef struct Manager Manager;
 
 typedef enum ManagerState {
@@ -284,12 +282,6 @@ struct Manager {
 
         /* Used for processing polkit authorization responses */
         Hashmap *polkit_registry;
-
-        /* System wide startup timeouts */
-        usec_t start_timeout_usec;
-        sd_event_source *start_timeout_event_source;
-        FailureAction start_timeout_action;
-        char *start_timeout_reboot_arg;
 };
 
 int manager_new(SystemdRunningAs running_as, bool test_run, Manager **m);
diff --git a/src/core/system.conf b/src/core/system.conf
index 5a723bb..65a35a0 100644
--- a/src/core/system.conf
+++ b/src/core/system.conf
@@ -23,9 +23,6 @@
 #CapabilityBoundingSet=
 #SystemCallArchitectures=
 #TimerSlackNSec=
-#StartTimeoutSec=15min
-#StartTimeoutAction=poweroff-force
-#StartTimeoutRebootArgument=
 #DefaultTimerAccuracySec=1min
 #DefaultStandardOutput=journal
 #DefaultStandardError=inherit

commit cea358fe1b600c40670da96e62c9187f0a7c2bed
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 28 00:52:48 2014 +0100

    update TODO

diff --git a/TODO b/TODO
index 37fa643..af224e9 100644
--- a/TODO
+++ b/TODO
@@ -58,8 +58,6 @@ Features:
 
 * send SIGABRT when a service watchdog is triggered, by default, so that we acquire a backtrace of the hang.
 
-* shouldn't RouteMetric= in networkd's [DHCP] section move to [Network]?
-
 * dhcp: do we allow configuring dhcp routes on interfaces that are not the one we got the dhcp info from?
 
 * maybe allow timer units with an empty Units= setting, so that they

commit 294330896d1ad26c10eecf6c3bf20d73b5ec624b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Oct 27 23:50:51 2014 +0100

    journald: be nice to coverity, add an extra assert
    
    coverity otherwise assumes that the chain object might be NULL.

diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index d06dbc2..8a2c0fc 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1380,9 +1380,10 @@ static void chain_cache_put(
                 if (array == first)
                         return;
 
-                if (ordered_hashmap_size(h) >= CHAIN_CACHE_MAX)
+                if (ordered_hashmap_size(h) >= CHAIN_CACHE_MAX) {
                         ci = ordered_hashmap_steal_first(h);
-                else {
+                        assert(ci);
+                } else {
                         ci = new(ChainCacheItem, 1);
                         if (!ci)
                                 return;



More information about the systemd-commits mailing list