From 7734d849250577a554cb51aa66a3158627b20f57 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 14 Oct 2020 23:26:49 +0200 Subject: [PATCH] [shellprocess] Bump the default timeout to 30, emphasise tuning the timeout FIXES #1536 --- src/modules/shellprocess/ShellProcessJob.cpp | 4 ++-- src/modules/shellprocess/shellprocess.conf | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/modules/shellprocess/ShellProcessJob.cpp b/src/modules/shellprocess/ShellProcessJob.cpp index 6e3db62aa..d402227b0 100644 --- a/src/modules/shellprocess/ShellProcessJob.cpp +++ b/src/modules/shellprocess/ShellProcessJob.cpp @@ -60,10 +60,10 @@ void ShellProcessJob::setConfigurationMap( const QVariantMap& configurationMap ) { bool dontChroot = CalamaresUtils::getBool( configurationMap, "dontChroot", false ); - qint64 timeout = CalamaresUtils::getInteger( configurationMap, "timeout", 10 ); + qint64 timeout = CalamaresUtils::getInteger( configurationMap, "timeout", 30 ); if ( timeout < 1 ) { - timeout = 10; + timeout = 30; } if ( configurationMap.contains( "script" ) ) diff --git a/src/modules/shellprocess/shellprocess.conf b/src/modules/shellprocess/shellprocess.conf index 5d8a12d26..8501d9844 100644 --- a/src/modules/shellprocess/shellprocess.conf +++ b/src/modules/shellprocess/shellprocess.conf @@ -15,7 +15,16 @@ # # The (global) timeout for the command list can be set with # the *timeout* key. The value is a time in seconds, default -# is 10 seconds if not set. +# is 30 seconds if not set. The timeout **must** be tuned, either +# globally or per-command (see below in the description of *script*), +# to the load or expected running-time of the command. +# +# - Setting a timeout of 30 for a `touch` command is probably exessive +# - Setting a timeout of 1 for a `touch` command might be low, +# on a slow disk where touch needs to be loaded from CDROM +# - Setting a timeout of 30 for a 1GB download is definitely low +# - Setting a timeout of 3600 for a 1GB download is going to leave +# the user in uncertainty for a loooong time. # # If a command starts with "-" (a single minus sign), then the # return value of the command following the - is ignored; otherwise, @@ -40,8 +49,10 @@ # # To change the description of the job, set the *name* entries in *i18n*. --- +# Set to true to run in host, rather than target system dontChroot: false -timeout: 10 +# Tune this for the commands you're actually running +# timeout: 10 # Script may be a single string (because false returns an error exit # code, this will trigger a failure in the installation):