* [PATCH] tools/kvm_stat: Add restart delay
@ 2021-03-25 12:29 Stefan Raspl
2021-03-25 18:14 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Raspl @ 2021-03-25 12:29 UTC (permalink / raw)
To: kvm; +Cc: borntraeger, pbonzini
If this service is enabled and the system rebooted, Systemd's initial
attempt to start this unit file may fail in case the kvm module is not
loaded. Since we did not specify a delay for the retries, Systemd
restarts with a minimum delay a number of times before giving up and
disabling the service. Which means a subsequent kvm module load will
have kvm running without monitoring.
Adding a delay to fix this.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
---
tools/kvm/kvm_stat/kvm_stat.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/kvm/kvm_stat/kvm_stat.service b/tools/kvm/kvm_stat/kvm_stat.service
index 71aabaffe779..8f13b843d5b4 100644
--- a/tools/kvm/kvm_stat/kvm_stat.service
+++ b/tools/kvm/kvm_stat/kvm_stat.service
@@ -9,6 +9,7 @@ Type=simple
ExecStart=/usr/bin/kvm_stat -dtcz -s 10 -L /var/log/kvm_stat.csv
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
+RestartSec=60s
SyslogIdentifier=kvm_stat
SyslogLevel=debug
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/kvm_stat: Add restart delay
2021-03-25 12:29 [PATCH] tools/kvm_stat: Add restart delay Stefan Raspl
@ 2021-03-25 18:14 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2021-03-25 18:14 UTC (permalink / raw)
To: Stefan Raspl, kvm; +Cc: borntraeger
On 25/03/21 13:29, Stefan Raspl wrote:
> If this service is enabled and the system rebooted, Systemd's initial
> attempt to start this unit file may fail in case the kvm module is not
> loaded. Since we did not specify a delay for the retries, Systemd
> restarts with a minimum delay a number of times before giving up and
> disabling the service. Which means a subsequent kvm module load will
> have kvm running without monitoring.
> Adding a delay to fix this.
>
> Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
> ---
> tools/kvm/kvm_stat/kvm_stat.service | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/kvm/kvm_stat/kvm_stat.service b/tools/kvm/kvm_stat/kvm_stat.service
> index 71aabaffe779..8f13b843d5b4 100644
> --- a/tools/kvm/kvm_stat/kvm_stat.service
> +++ b/tools/kvm/kvm_stat/kvm_stat.service
> @@ -9,6 +9,7 @@ Type=simple
> ExecStart=/usr/bin/kvm_stat -dtcz -s 10 -L /var/log/kvm_stat.csv
> ExecReload=/bin/kill -HUP $MAINPID
> Restart=always
> +RestartSec=60s
> SyslogIdentifier=kvm_stat
> SyslogLevel=debug
>
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-25 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-25 12:29 [PATCH] tools/kvm_stat: Add restart delay Stefan Raspl
2021-03-25 18:14 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox