1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +03:00

B OpenNebula/one#6379: Fix for VM Migration failure (#2900)

using two SYSTEM_DS on same host
This commit is contained in:
Alberto Picon Couselo 2024-01-25 16:29:43 +01:00 committed by GitHub
parent deb4a9d7dd
commit 58d7367556
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,11 +82,13 @@ MONITOR=$(ssh_monitor_and_log "$SRC_HOST" "$MONITOR_CMD" 'Get .monitor')
ssh_make_path $DST_HOST $DST_DIR
enable_local_monitoring $DST_HOST $DST_DIR "$MONITOR"
RANDOM_FILE=$(ssh "$DST_HOST" "mktemp -p \"$DST_DIR\"")
trap "ssh $DST_HOST \"rm -f $RANDOM_FILE\"" EXIT
if ssh "$SRC_HOST" "test -f $RANDOM_FILE"; then
log "Not moving $SRC to $DST, they are the same path"
exit 0
if [ "$SRC_DIR" == "$DST_DIR" ]; then
RANDOM_FILE=$(ssh "$DST_HOST" "mktemp -p \"$DST_DIR\"")
trap "ssh $DST_HOST \"rm -f $RANDOM_FILE\"" EXIT
if ssh "$SRC_HOST" "test -f $RANDOM_FILE"; then
log "Not moving $SRC to $DST, they are the same path"
exit 0
fi
fi
log "Moving $SRC to $DST"