From a47c48cbb2625381ec75fcb3d6f0dba4cccd2ba5 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 31 May 2023 16:19:21 +0200 Subject: [PATCH] mkosi: Only lower device timeout instead of all timeouts We only really care about lowering the device timeout so we get to a shell faster when the root device doesn't appear so let's only lower that timeout instead of lowering all default timeouts. --- .github/workflows/mkosi.yml | 3 ++- mkosi.conf.d/10-systemd.conf | 3 +++ mkosi.presets/00-base/mkosi.build | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index c0f54d8da4c..9010b1fcb7b 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -87,7 +87,6 @@ jobs: [Content] Environment=CI_BUILD=1 - DEFAULT_TIMEOUT_SEC=180 SLOW_TESTS=true [Output] @@ -95,6 +94,8 @@ jobs: systemd.journald.max_level_console=debug # udev's debug log output is very verbose, so up it to info in CI. udev.log_level=info + # Root device can take a long time to appear, so let's bump the timeout. + systemd.default_device_timeout_sec=180 [Host] ExtraSearchPaths=!* diff --git a/mkosi.conf.d/10-systemd.conf b/mkosi.conf.d/10-systemd.conf index 09e8c5c3f16..78b438b5db9 100644 --- a/mkosi.conf.d/10-systemd.conf +++ b/mkosi.conf.d/10-systemd.conf @@ -36,3 +36,6 @@ KernelCommandLineExtra=systemd.crash_shell systemd.wants=network-online.target # Make sure we don't load vmw_vmci which messes with virtio vsock. module_blacklist=vmw_vmci + # Lower the default device timeout so we get a shell earlier if the root device does + # not appear for some reason. + systemd.default_device_timeout_sec=10 diff --git a/mkosi.presets/00-base/mkosi.build b/mkosi.presets/00-base/mkosi.build index 11e8b1c812c..eb18d27577d 100755 --- a/mkosi.presets/00-base/mkosi.build +++ b/mkosi.presets/00-base/mkosi.build @@ -51,8 +51,6 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then CONFIGURE_OPTS=( -D sysvinit-path="$sysvinit_path" -D rootprefix="$rootprefix" - -D default-timeout-sec="${DEFAULT_TIMEOUT_SEC:-10}" - -D default-user-timeout-sec="${DEFAULT_TIMEOUT_SEC:-10}" -D man=false -D translations=false -D version-tag="${VERSION_TAG}" -- 2.47.3