Skip to content

Commit

Permalink
e2e: fix the pupernetes wait race (#1833)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienBalestra committed Jun 14, 2018
1 parent 712a943 commit 41f9448
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/e2e/scripts/run-instance/10-pupernetes-wait.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,16 @@ _wait_binary() {

_wait_binary pupernetes

set -ex
sudo -kE pupernetes wait --unit-to-watch pupernetes.service --logging-since 2h --timeout 20m
# Binary is here, so setup-pupernetes has completed
# pupernetes.service should start soon because it contains the constraint After=setup-pupernetes.service

set -x
sudo -kE pupernetes wait --unit-to-watch pupernetes.service --logging-since 2h --timeout 20m || {
# Here pupernetes.service may not be started yet and be considered as dead by go-systemd
# A single retry is enough
# https://github.com/DataDog/pupernetes/issues/46
sleep 10
sudo -kE pupernetes wait --unit-to-watch pupernetes.service --logging-since 2h --timeout 20m
}

exit $?

0 comments on commit 41f9448

Please sign in to comment.