[systemd-commits] 2 commits - fixme man/systemctl.xml man/systemd.unit.xml man/systemd.xml src/automount.c src/automount.h src/manager.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon Aug 30 15:18:37 PDT 2010


 fixme                |    6 +-----
 man/systemctl.xml    |   25 +++++++++++++------------
 man/systemd.unit.xml |   30 ++++++++++++++++--------------
 man/systemd.xml      |    2 +-
 src/automount.c      |   14 +++++++-------
 src/automount.h      |    2 +-
 src/manager.c        |    3 ++-
 7 files changed, 41 insertions(+), 41 deletions(-)

New commits:
commit 74ac3cbd509de2f5995542aa5db39328e8cbd22a
Author: Matthew Miller <mattdm at mattdm.org>
Date:   Tue Aug 31 00:17:56 2010 +0200

    manager: rename 'maintenance' state to 'failed' to avoid user confusion
    
    https://bugzilla.redhat.com/show_bug.cgi?id=614619

diff --git a/fixme b/fixme
index f68de38..f244b5c 100644
--- a/fixme
+++ b/fixme
@@ -50,7 +50,7 @@
 
 * io priority during initialization
 
-* if a service fails too often, make the service enter maintenance mode, and the socket, too.
+* if a service fails too often, make the service enter failed mode, and the socket, too.
 
 * systemctl: warning wenn [Install] leer ist bei enable
 
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 6af8e61..466d990 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -399,18 +399,19 @@
                         </varlistentry>
 
                         <varlistentry>
-                                <term><command>reset-maintenance [NAME...]</command></term>
-
-                                <listitem><para>Reset maintenance
-                                state of the specified units, or if no
-                                unit name is passed of all units. When
-                                a unit fails in some way (i.e. process
-                                exiting with non-zero error code,
-                                terminating abnormally or timing out)
-                                it will automatically enter
-                                maintenance state and its exit codes
-                                and status is recorded for
-                                introspection by the administrator
+                                <term><command>reset-failed [NAME...]</command></term>
+
+                                <listitem><para>Reset the
+                                '<literal>failed</literal>' state of the
+                                specified units, or if no unit name is
+                                passed of all units. When a unit fails
+                                in some way (i.e. process exiting with
+                                non-zero error code, terminating
+                                abnormally or timing out) it will
+                                automatically enter the
+                                '<literal>failed</literal>' state and
+                                its exit code and status is recorded
+                                for introspection by the administrator
                                 until the service is restarted or
                                 reset with this
                                 command.</para></listitem>
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 250989f..3bc5d3c 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -418,8 +418,9 @@
 
                                 <listitem><para>Lists one or more
                                 units that are activated when this
-                                unit fails (i.e. enters maintenance
-                                state).</para></listitem>
+                                unit enters the
+                                '<literal>failed</literal>'
+                                state.</para></listitem>
                         </varlistentry>
 
                         <varlistentry>
@@ -552,22 +553,23 @@
                                 time. If this time limit is reached
                                 the job will be cancelled, the unit
                                 however will not change state or even
-                                enter maintenance 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
+                                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
-                                units) as the job timeout has no effect
-                                on the unit itself, only on the job
-                                that might be pending for it. Or in
-                                other words: unit-specific timeouts
+                                units) as the job timeout has no
+                                effect on the unit itself, only on the
+                                job that might be pending for it. Or
+                                in other words: unit-specific timeouts
                                 are useful to abort unit state
                                 changes, and revert them. The job
                                 timeout set with this option however
-                                is useful to abort only the job waiting
-                                for the unit state to change.</para></listitem>
+                                is useful to abort only the job
+                                waiting for the unit state to
+                                change.</para></listitem>
                         </varlistentry>
 
                 </variablelist>
diff --git a/man/systemd.xml b/man/systemd.xml
index edd824d..428e17f 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -256,7 +256,7 @@
                 as well as in the process of being activated or
                 deactivated, i.e. between the two states (these states
                 are called 'activating', 'deactivating'). A special
-                'maintenance' state is available as well which is very
+                'failed' state is available as well which is very
                 similar to 'inactive' and is entered when the service
                 failed in some way (process returned error code on
                 exit, or crashed, or an operation timed out). If this
diff --git a/src/automount.c b/src/automount.c
index b32e002..414816b 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -43,7 +43,7 @@ static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = {
         [AUTOMOUNT_DEAD] = UNIT_INACTIVE,
         [AUTOMOUNT_WAITING] = UNIT_ACTIVE,
         [AUTOMOUNT_RUNNING] = UNIT_ACTIVE,
-        [AUTOMOUNT_MAINTENANCE] = UNIT_MAINTENANCE
+        [AUTOMOUNT_FAILED] = UNIT_FAILED
 };
 
 static int open_dev_autofs(Manager *m);
@@ -294,7 +294,7 @@ static void automount_enter_dead(Automount *a, bool success) {
         if (!success)
                 a->failure = true;
 
-        automount_set_state(a, a->failure ? AUTOMOUNT_MAINTENANCE : AUTOMOUNT_DEAD);
+        automount_set_state(a, a->failure ? AUTOMOUNT_FAILED : AUTOMOUNT_DEAD);
 }
 
 static int open_dev_autofs(Manager *m) {
@@ -606,7 +606,7 @@ static int automount_start(Unit *u) {
 
         assert(a);
 
-        assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_MAINTENANCE);
+        assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_FAILED);
 
         if (path_is_mount_point(a->where)) {
                 log_error("Path %s is already a mount point, refusing start for %s", a->where, u->meta.id);
@@ -794,12 +794,12 @@ static void automount_shutdown(Manager *m) {
                 close_nointr_nofail(m->dev_autofs_fd);
 }
 
-static void automount_reset_maintenance(Unit *u) {
+static void automount_reset_failed(Unit *u) {
         Automount *a = AUTOMOUNT(u);
 
         assert(a);
 
-        if (a->state == AUTOMOUNT_MAINTENANCE)
+        if (a->state == AUTOMOUNT_FAILED)
                 automount_set_state(a, AUTOMOUNT_DEAD);
 
         a->failure = false;
@@ -809,7 +809,7 @@ static const char* const automount_state_table[_AUTOMOUNT_STATE_MAX] = {
         [AUTOMOUNT_DEAD] = "dead",
         [AUTOMOUNT_WAITING] = "waiting",
         [AUTOMOUNT_RUNNING] = "running",
-        [AUTOMOUNT_MAINTENANCE] = "maintenance"
+        [AUTOMOUNT_FAILED] = "failed"
 };
 
 DEFINE_STRING_TABLE_LOOKUP(automount_state, AutomountState);
@@ -841,7 +841,7 @@ const UnitVTable automount_vtable = {
 
         .fd_event = automount_fd_event,
 
-        .reset_maintenance = automount_reset_maintenance,
+        .reset_failed = automount_reset_failed,
 
         .bus_interface = "org.freedesktop.systemd1.Automount",
         .bus_message_handler = bus_automount_message_handler,
diff --git a/src/automount.h b/src/automount.h
index 9786222..1a6cc98 100644
--- a/src/automount.h
+++ b/src/automount.h
@@ -30,7 +30,7 @@ typedef enum AutomountState {
         AUTOMOUNT_DEAD,
         AUTOMOUNT_WAITING,
         AUTOMOUNT_RUNNING,
-        AUTOMOUNT_MAINTENANCE,
+        AUTOMOUNT_FAILED,
         _AUTOMOUNT_STATE_MAX,
         _AUTOMOUNT_STATE_INVALID = -1
 } AutomountState;
commit c88e7f4e57fcef7998dcd570e8a8866c5116f0de
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Aug 30 23:51:52 2010 +0200

    manager: don't try to minimize transaction when using isolate
    
    We should not avoid stopping services when using isolate, since that
    kinda defeats the point of it.
    
    http://bugzilla.redhat.com/show_bug.cgi?id=627014

diff --git a/fixme b/fixme
index 1ac8ba2..f68de38 100644
--- a/fixme
+++ b/fixme
@@ -80,14 +80,10 @@ v9:
 
 * kill-mode=cgroup muss auch die mainpid killen! https://bugzilla.redhat.com/show_bug.cgi?id=626477
 
-* o_ndelay ausschalten für stdin/stderr/stdout auf socket
-
 * follow LSB exit codes spec in "systemctl start"
 
 * oom_score_adj
 
-* fix isolate as runlevel  https://bugzilla.redhat.com/show_bug.cgi?id=627014
-
 * rename failed/maintenance https://bugzilla.redhat.com/show_bug.cgi?id=614619
 
 * systemctl wrapping https://bugzilla.redhat.com/show_bug.cgi?id=626891 https://bugzilla.redhat.com/show_bug.cgi?id=626443
diff --git a/src/manager.c b/src/manager.c
index f542883..eada82a 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -1226,7 +1226,8 @@ static int transaction_activate(Manager *m, JobMode mode, DBusError *e) {
         /* Second step: Try not to stop any running services if
          * we don't have to. Don't try to reverse running
          * jobs if we don't have to. */
-        transaction_minimize_impact(m);
+        if (mode != JOB_ISOLATE)
+                transaction_minimize_impact(m);
 
         /* Third step: Drop redundant jobs */
         transaction_drop_redundant(m);


More information about the systemd-commits mailing list