Skip to content

Commit

Permalink
B #6078: intoduce retry_if/retry_if_no_error (#2478) (#2497)
Browse files Browse the repository at this point in the history
(cherry picked from commit bb75e5f)
  • Loading branch information
xorel authored and rsmontero committed Feb 13, 2023
1 parent b94a12d commit 1c938fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tm_mad/ssh/cpds
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [ "${LCM_STATE}" = '26' -a "${SNAP_ID}" = '-1' ]; then
log "VM is running, trying blockcopy, fsfreeze, suspend"

CPDS_CMD_EXPORT=$(cat <<EOF
$(type retry_if| grep -v 'is a function')
$(type retry_if_no_error| grep -v 'is a function')
touch ${SRC_TEMP_PATH}
if ! retry_if_no_error "active block job" 3 5 virsh -c ${LIBVIRT_URI} blockcopy ${DEPLOY_ID} ${DISK_TARGET} ${SRC_TEMP_PATH} --wait --finish; then
Expand Down
2 changes: 1 addition & 1 deletion src/tm_mad/ssh/snap_create_live
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ REPLICA_HOST=$(get_replica_host $DS_ID)

CMD=$(cat <<EOT
set -ex -o pipefail
$(type retry_if| grep -v 'is a function')
$(type retry_if_no_error| grep -v 'is a function')
mkdir -p "${SNAP_DIR}"
touch $SNAP_PATH
Expand Down
2 changes: 1 addition & 1 deletion src/vmm_mad/remotes/kvm/migrate
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ else
DISK_OPTS="--copy-storage-all --migrate-disks ${MIGRATE_DISKS}"
fi

retry_if "active block job" 3 5 \
retry_if_no_error "active block job" 3 5 \
virsh --connect $LIBVIRT_URI migrate \
--live $MIGRATE_OPTIONS $DEPLOY_ID $QEMU_PROTOCOL://$DEST_HOST/system \
$DISK_OPTS
Expand Down

0 comments on commit 1c938fe

Please sign in to comment.