debian-forge-composer/distribution/osbuild-worker@.service
Martin Sehnoutka e310d4e4f0 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.
2021-09-24 14:15:10 +02:00

19 lines
548 B
Desktop File

[Unit]
Description=OSBuild Composer Worker (%i)
Requires=osbuild-local-worker.socket
After=network.target osbuild-local-worker.socket
[Service]
Type=simple
PrivateTmp=true
ExecStart=/usr/libexec/osbuild-composer/osbuild-worker -unix /run/osbuild-composer/job.socket
Restart=always
RestartSec=1s
CPUSchedulingPolicy=batch
IOSchedulingClass=idle
CacheDirectory=osbuild-worker
# systemd >= 240 sets this, but osbuild-worker runs on earlier versions
Environment="CACHE_DIRECTORY=/var/cache/osbuild-worker"
[Install]
WantedBy=osbuild-composer.service