From 17c9e2cd4ba84915804268d07c074da7067fe313 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 8 Jan 2021 10:22:27 +0000 Subject: [PATCH] tests: Make boot notifications retry If the guest fails to communicate with the test harness then retry. Signed-off-by: Rob Bradford --- test_data/cloud-init/ubuntu/user-data | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test_data/cloud-init/ubuntu/user-data b/test_data/cloud-init/ubuntu/user-data index fefa3770f..8586577f0 100644 --- a/test_data/cloud-init/ubuntu/user-data +++ b/test_data/cloud-init/ubuntu/user-data @@ -56,6 +56,8 @@ write_files: [Service] Type=simple ExecStart=/usr/bin/cloud-hypervisor-notify-booted.sh + Restart=on-failure + RestartSec=2 [Install] WantedBy=multi-user.target @@ -65,5 +67,6 @@ write_files: permissions: 0755 content: | #!/bin/bash + set -e echo -n "@DEFAULT_TCP_LISTENER_MESSAGE" | nc -w0 @HOST_IP @TCP_LISTENER_PORT