Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: fix the pupernetes wait race #1833

Merged
merged 1 commit into from
Jun 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 $?