Skip to content

Commit

Permalink
salt: Workaround salt minion not reachable directly after start (bsc#…
Browse files Browse the repository at this point in the history
…1069711)

Verification run: http://lord.arch/tests/415#step/salt/29
  • Loading branch information
okurz committed Feb 1, 2018
1 parent 61ef486 commit a114b98
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/console/salt.pm
Expand Up @@ -32,9 +32,12 @@ EOF
# before accepting the key, wait until the minion is fully started (systemd might be not reliable)
assert_script_run('salt-run state.event tagmatch="salt/auth" quiet=True count=1', timeout => 300);
assert_script_run("salt-key --accept-all -y");
# before pinging the minions, check the start event as a signal that the minion is now ready
assert_script_run('salt-run state.event tagmatch="salt/minion/*/start" quiet=True count=1', timeout => 300);
assert_script_run "salt '*' test.ping | grep -woh True";
# try to ping the minion. If it does not respond on the first try the ping
# might have gone lost so try more often
unless (script_run 'salt \'*\' test.ping') {
record_soft_failure 'bsc#1069711';
assert_script_run 'for i in {1..7}; do echo "try $i" && salt \'*\' test.ping -t30 && break; done';
}
systemctl 'stop salt-master salt-minion';
}

Expand Down

0 comments on commit a114b98

Please sign in to comment.