Skip to content

Commit

Permalink
Check new marker files which will be published in new releases (#899)
Browse files Browse the repository at this point in the history
Agent in new releases will no longer be publishing redundant has_run_before flag. We do still need it here for backward compatibility for old images.
  • Loading branch information
Deependra-Patel committed Apr 5, 2021
1 parent 2d89b12 commit 2c4c33a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions connectors/connectors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ fi
# to work in the future. Use at your own risk!
restart_dataproc_agent() {
# Because Dataproc Agent should be restarted after initialization, we need to wait until
# it will create a sentinel file that signals initialization competition (success or failure)
while [[ ! -f /var/lib/google/dataproc/has_run_before ]]; do
# it will create a sentinel file that signals initialization competition (success or failure).
# NOTE: has_run_before will no longer be published by upcoming image releases
while [[ !(-f /var/lib/google/dataproc/has_run_before \
|| -f /var/lib/google/dataproc/has_succeeded_before \
|| -f /var/lib/google/dataproc/has_failed_before)]]; do
sleep 1
done
# If Dataproc Agent didn't create a sentinel file that signals initialization
Expand Down

0 comments on commit 2c4c33a

Please sign in to comment.