From 6e243d87f84dc4caee56fb0d813b73bce95d8944 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Thu, 11 Jul 2019 11:22:43 +0200 Subject: [PATCH] B #118: one-context-force breaks boot status We must make sure "one-context-force.service" is not run during boot disk detection but on hotplug events. When booting with a swap partition on the disk, the udev rules will start the "one-context-force" service long before "one-context-local" and "one-context". This results in the system being in "degraded" state as reported by "systemctl is-system-running". * src/usr/lib/systemd/system/one-context-force.service##systemd.one: add conditions to run only on hotplug events. Signed-off-by: Daniel Dehennin --- .../lib/systemd/system/one-context-force.service##systemd.one | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/usr/lib/systemd/system/one-context-force.service##systemd.one b/src/usr/lib/systemd/system/one-context-force.service##systemd.one index db1c878..13cd94c 100644 --- a/src/usr/lib/systemd/system/one-context-force.service##systemd.one +++ b/src/usr/lib/systemd/system/one-context-force.service##systemd.one @@ -2,6 +2,8 @@ Description=OpenNebula forced reconfiguration After=one-context.service Requisite=one-context.service +ConditionPathExists=/var/run/one-context/context.sh.local +ConditionPathExists=/var/run/one-context/context.sh.network [Service] Type=oneshot