Skip to content

Commit

Permalink
tests/lib/prepare-utils.sh: make tweaks script more robust
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alfonsosanchezbeato committed Feb 7, 2024
1 parent 06b35b7 commit b973e3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/lib/prepare-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b973e3d

Please sign in to comment.