Skip to content

Commit

Permalink
Merge pull request kubevirt#653 from nertpinx/rsync_sync
Browse files Browse the repository at this point in the history
Wait for rsyncd to be ready
  • Loading branch information
rmohr authored Jan 15, 2018
2 parents aa05909 + 2cdcd04 commit a0fab02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Empty file added .rsynctemp
Empty file.
9 changes: 7 additions & 2 deletions hack/dockerized
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ KUBEVIRT_DIR="$(
BUILDER=${BUILDER_NAME:-kubevirtbuilder}
RSYNCD_PORT=${RSYNCD_PORT:-10873}

TEMPFILE=".rsynctemp"

# Build the build container
(cd ${DOCKER_DIR} && docker build . -q -t ${BUILDER})

Expand All @@ -32,8 +34,11 @@ function finish() {
docker rm ${RSYNC_CID}
}
trap finish EXIT
# TODO really check if rsyncd comes up. For now just give it some time to come up
sleep 1

while ! rsync ${KUBEVIRT_DIR}/${RSYNCTEMP} "rsync://[email protected]:${RSYNCD_PORT}/build/${RSYNCTEMP}"; do
echo "Waiting for rsyncd to be ready"
sleep .1
done

_rsync() {
rsync -avl "$@"
Expand Down

0 comments on commit a0fab02

Please sign in to comment.