1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-01 05:47:01 +03:00

B #6078: intoduce retry_if/retry_if_no_error (#2478) (#2497)

(cherry picked from commit bb75e5fd29012be74d4a7333022e923bbe40e4f7)
This commit is contained in:
Jan Orel 2023-02-13 17:18:41 +01:00 committed by Ruben S. Montero
parent b94a12d8d0
commit 1c938fe928
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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