Skip to content

Commit

Permalink
Merge pull request kubevirt#8633 from brianmcarey/podman-rsync-cleanup
Browse files Browse the repository at this point in the history
Wait for podman to stop rsync container successfully
  • Loading branch information
kubevirt-bot authored Oct 27, 2022
2 parents 9c6bccf + 11f7c20 commit 51825a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hack/dockerized
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ $KUBEVIRT_CRI run ${CONTAINER_ENV} -v "${BUILDER}:/root:rw,z" --security-opt "la
mkdir -p ${OUT_DIR}

# Start an rsyncd instance and make sure it gets stopped after the script exits
RSYNC_CID=$($KUBEVIRT_CRI run ${CONTAINER_ENV} -d -v "${BUILDER}:/root:rw,z" --restart always --security-opt "label=disable" --expose 873 -P ${KUBEVIRT_BUILDER_IMAGE} /usr/bin/rsync --no-detach --daemon --verbose)
RSYNC_CID=$($KUBEVIRT_CRI run ${CONTAINER_ENV} -d -v "${BUILDER}:/root:rw,z" --security-opt "label=disable" --expose 873 -P ${KUBEVIRT_BUILDER_IMAGE} /usr/bin/rsync --no-detach --daemon --verbose)

function finish() {
$KUBEVIRT_CRI stop ${RSYNC_CID} >/dev/null 2>&1 &
$KUBEVIRT_CRI rm -f ${RSYNC_CID} >/dev/null 2>&1 &
$KUBEVIRT_CRI stop --time 1 ${RSYNC_CID} >/dev/null 2>&1
$KUBEVIRT_CRI rm -f ${RSYNC_CID} >/dev/null 2>&1
}
trap finish EXIT

Expand Down

0 comments on commit 51825a6

Please sign in to comment.