From b973e3d3c1accb5b0f688360d54c19d2703a6ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfonso=20S=C3=A1nchez-Beato?= Date: Tue, 6 Feb 2024 19:41:38 +0000 Subject: [PATCH] tests/lib/prepare-utils.sh: make tweaks script more robust As ssh might not be active yet when we ask it to reload its configuration. This provoked an initialization error so the "Initialize system state" change had to be retried, delaying the test around 7 minutes. --- tests/lib/prepare-utils.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/lib/prepare-utils.sh b/tests/lib/prepare-utils.sh index 3ef0d412..7a5e2c48 100644 --- a/tests/lib/prepare-utils.sh +++ b/tests/lib/prepare-utils.sh @@ -326,7 +326,8 @@ echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/99-ubuntu-user sed -i 's/\#\?\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' /etc/ssh/sshd_config echo "MaxAuthTries 120" >> /etc/ssh/sshd_config grep '^PermitRootLogin yes' /etc/ssh/sshd_config -systemctl reload ssh +# ssh might not be active yet so the command might fail +systemctl reload ssh || true print_system "done setting up ssh for spread test user"