From 9f5830375064af920c807b57b5b36691ad346199 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Thu, 23 Apr 2020 15:12:07 +0100 Subject: run-postinsts: Set RemainAfterExit on systemd unit run-postinsts is only expected to run once, but during startup, but if any dependency is pulled into a transaction, even once it has been marked disabled, then it can be restarted. This leads to occasional failures during QA if an ssh session starts whilst the existing transaction is still running: Finished Run pending postinsts. run-postinsts.service: Succeeded. Condition check resulted in Commit a transient machine-id on disk being skipped. Condition check resulted in Bind mount volatile /srv being skipped. Condition check resulted in Bind mount volatile /var/spool being skipped. Condition check resulted in Bind mount volatile /var/lib being skipped. Condition check resulted in Bind mount volatile /var/cache being skipped. Condition check resulted in Platform Persistent Storage Archival being skipped. Condition check resulted in Rebuild Hardware Database being skipped. Starting Run pending postinsts... Condition check resulted in Kernel Configuration File System being skipped. Condition check resulted in FUSE Control File System being skipped. Condition check resulted in Load Kernel Modules being skipped. Condition check resulted in File System Check on Root Device being skipped. Condition check resulted in Huge Pages File System being skipped. Condition check resulted in Journal Audit Socket being skipped. dropbear@125-192.168.7.2:22-192.168.7.1:44226.service: Succeeded. Condition check resulted in Platform Persistent Storage Archival being skipped. Started SSH Per-Connection Server (192.168.7.1:44226). dropbear@124-192.168.7.2:22-192.168.7.1:44224.service: Succeeded. Started SSH Per-Connection Server (192.168.7.1:44224). Condition check resulted in Commit a transient machine-id on disk being skipped. Condition check resulted in Bind mount volatile /srv being skipped. Condition check resulted in Bind mount volatile /var/spool being skipped. Condition check resulted in Bind mount volatile /var/lib being skipped. Condition check resulted in Bind mount volatile /var/cache being skipped. Condition check resulted in Platform Persistent Storage Archival being skipped. Condition check resulted in Rebuild Hardware Database being skipped. Failed to start Run pending postinsts. run-postinsts.service: Failed with result 'start-limit-hit'. run-postinsts.service: Start request repeated too quickly. Setting RemainAfterExit ensures that the unit remains active and is not gratuitously restarted, unless done so explicitly using systemctl restart. Signed-off-by: Alex Kiernan Signed-off-by: Richard Purdie --- meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service index d42addf510..7f72f3388a 100644 --- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service @@ -8,7 +8,7 @@ Before=sysinit.target Type=oneshot ExecStart=#SBINDIR#/run-postinsts ExecStartPost=#BASE_BINDIR#/systemctl --no-reload disable run-postinsts.service -RemainAfterExit=No +RemainAfterExit=yes TimeoutSec=0 [Install] -- cgit 1.2.3-korg