From e310d4e4f09d139466dd187d89736471a439a3be Mon Sep 17 00:00:00 2001 From: Martin Sehnoutka Date: Fri, 24 Sep 2021 12:31:14 +0200 Subject: [PATCH] distribution: Use After=network.target instead of multi-user There is no need for osbuild-composer to wait until the whole multi-user target is completed. It can be started earlier as it doesn't have any dependencies in the target. This can be a problem if there is a unit in the target that is not starting and still is unrelated to osbuild-composer. There was a bug like this with Plymouth where the service didn't finish and it was hanging. That prevented osbuild-composer from starting and the user was left with working SSH connection and shell, but composer-cli and systemctl start osbuild-composer.service were both unresponsive. Replace After=multi-user.target with After=network.target to start osbuild-composer earlier. --- distribution/osbuild-composer.service | 2 +- distribution/osbuild-remote-worker@.service | 2 +- distribution/osbuild-worker@.service | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/distribution/osbuild-composer.service b/distribution/osbuild-composer.service index b75e8f863..a277c8604 100644 --- a/distribution/osbuild-composer.service +++ b/distribution/osbuild-composer.service @@ -1,6 +1,6 @@ [Unit] Description=OSBuild Composer -After=multi-user.target +After=network.target # Weldr API needs a local worker by default. # Run `systemctl mask osbuild-worker@1.service` diff --git a/distribution/osbuild-remote-worker@.service b/distribution/osbuild-remote-worker@.service index c2cfe7f21..ab19e95c3 100644 --- a/distribution/osbuild-remote-worker@.service +++ b/distribution/osbuild-remote-worker@.service @@ -1,6 +1,6 @@ [Unit] Description=OSBuild Composer Remote Worker (%i) -After=multi-user.target +After=network.target [Service] Type=simple diff --git a/distribution/osbuild-worker@.service b/distribution/osbuild-worker@.service index 36d10f6da..4423085d8 100644 --- a/distribution/osbuild-worker@.service +++ b/distribution/osbuild-worker@.service @@ -1,7 +1,7 @@ [Unit] Description=OSBuild Composer Worker (%i) Requires=osbuild-local-worker.socket -After=multi-user.target osbuild-local-worker.socket +After=network.target osbuild-local-worker.socket [Service] Type=simple