From 13f59ad0ebbbd10a42bf6aa9cd525136d225821c Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 8 Sep 2020 10:56:12 -0700 Subject: [PATCH] openqa/worker: have swtpm service restart on success This is because swtpm is designed not to be persistent, it's sort of tied to a single "system" (VM in this case). We can't expect an instance will stick around after it's been "used", it doesn't do that, it exits successfully. So we need to restart it when that happens. Signed-off-by: Adam Williamson --- roles/openqa/worker/files/openqa-swtpm@.service | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/openqa/worker/files/openqa-swtpm@.service b/roles/openqa/worker/files/openqa-swtpm@.service index 583de07b6a..e078ba1b9a 100644 --- a/roles/openqa/worker/files/openqa-swtpm@.service +++ b/roles/openqa/worker/files/openqa-swtpm@.service @@ -7,6 +7,7 @@ ExecStartPre=-/usr/bin/rm -rf /tmp/mytpm%I ExecStartPre=/usr/bin/mkdir -p /tmp/mytpm%I ExecStart=/usr/bin/swtpm socket --tpm2 --tpmstate dir=/tmp/mytpm%I --ctrl type=unixio,path=/tmp/mytpm%I/swtpm-sock --log level=20 ExecReload=/bin/true +Restart=on-success [Install] WantedBy=multi-user.target