]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-wait-for-jobs: fix service result table
authorLennart Poettering <lennart@poettering.net>
Tue, 14 Jan 2025 12:56:58 +0000 (13:56 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 27 Jan 2025 18:04:50 +0000 (19:04 +0100)
We were missing one service result (oom-kill), and the ratelimit one is
called differently. Correct that so that we generate proper log messages
for these cases.

(cherry picked from commit a7620f5dd16f0386b8ddeadfcd4e89da4050beef)

src/shared/bus-wait-for-jobs.c

index e12189f298be603479cdb7c45e3b75b97121731e..f28b42b563719ce482bfe38540a6321af7e0797b 100644 (file)
@@ -161,14 +161,15 @@ static void log_job_error_with_service_result(const char* service, const char *r
         static const struct {
                 const char *result, *explanation;
         } explanations[] = {
-                { "resources",   "of unavailable resources or another system error"                      },
-                { "protocol",    "the service did not take the steps required by its unit configuration" },
-                { "timeout",     "a timeout was exceeded"                                                },
-                { "exit-code",   "the control process exited with error code"                            },
-                { "signal",      "a fatal signal was delivered to the control process"                   },
-                { "core-dump",   "a fatal signal was delivered causing the control process to dump core" },
-                { "watchdog",    "the service failed to send watchdog ping"                              },
-                { "start-limit", "start of the service was attempted too often"                          },
+                { "resources",       "of unavailable resources or another system error"                      },
+                { "protocol",        "the service did not take the steps required by its unit configuration" },
+                { "timeout",         "a timeout was exceeded"                                                },
+                { "exit-code",       "the control process exited with error code"                            },
+                { "signal",          "a fatal signal was delivered to the control process"                   },
+                { "core-dump",       "a fatal signal was delivered causing the control process to dump core" },
+                { "watchdog",        "the service failed to send watchdog ping"                              },
+                { "start-limit-hit", "start of the service was attempted too often"                          },
+                { "oom-kill",        "of an out-of-memory (OOM) siutation"                                   },
         };
 
         _cleanup_free_ char *service_shell_quoted = NULL;
@@ -205,7 +206,7 @@ static void log_job_error_with_service_result(const char* service, const char *r
 
 extra:
         /* For some results maybe additional explanation is required */
-        if (streq_ptr(result, "start-limit"))
+        if (streq_ptr(result, "start-limit-hit"))
                 log_info("To force a start use \"%1$s reset-failed %2$s\"\n"
                          "followed by \"%1$s start %2$s\" again.",
                          systemctl,