From 9e19a40e56b17025a3b1f2e9587f149bd95e0da5 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 6 Sep 2022 16:48:04 +0200 Subject: [PATCH] ci: Crosvm won't remove the control socket file on stop When sending the stop command to a lingering Crosvm instance, the socket file will remain and the next instance will fail to start. Make sure the file is deleted before starting Crosvm with the same path. Acked-by: David Heidelberg Part-of: --- .gitlab-ci/crosvm-runner.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci/crosvm-runner.sh b/.gitlab-ci/crosvm-runner.sh index f88bab0..0edc722 100755 --- a/.gitlab-ci/crosvm-runner.sh +++ b/.gitlab-ci/crosvm-runner.sh @@ -54,13 +54,10 @@ VM_SOCKET=crosvm-${THREAD}.sock # was terminated due to timeouts. This "vm stop" may fail if the crosvm died # without cleaning itself up. if [ -e $VM_SOCKET ]; then - crosvm stop $VM_SOCKET || rm -rf $VM_SOCKET - # Wait for Crosvm to have removed the socket - until [ ! -f $VM_SOCKET ]; do - sleep 1 - done + crosvm stop $VM_SOCKET || true # Wait for socats from that invocation to drain - sleep 4 + sleep 5 + rm -rf $VM_SOCKET || true fi set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; } -- 2.7.4