mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
Bug #4235: SSH transfer drivers fail on epilogs with persistent images
(cherry picked from commit 360a2bc8c407f41a0c8c82aa31e13a3ce451bc5a)
This commit is contained in:
parent
531da5a1db
commit
408bd49042
@ -48,18 +48,11 @@ DST_SNAP="${DST}.snap"
|
||||
# Move the image back to the datastore
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
CPSCRIPT=$(cat <<EOF
|
||||
set -ex
|
||||
|
||||
$SCP -r "${SRC_PATH}" "${DST}"
|
||||
|
||||
if [ -d "${SRC_PATH_SNAP}" ]; then
|
||||
rsync -r --delete "${SRC_PATH_SNAP}/" "${DST_SNAP}"
|
||||
fi
|
||||
EOF
|
||||
)
|
||||
|
||||
log "Moving $SRC to datastore as $DST"
|
||||
ssh_exec_and_log "${SRC_HOST}" "${CPSCRIPT}" "Error copying $SRC to $DST"
|
||||
exec_and_log "$SCP -r $SRC $DST" "Error copying $SRC to $DST"
|
||||
|
||||
if $SSH $SRC_HOST ls ${SRC_PATH_SNAP} >/dev/null 2>&1; then
|
||||
exec_and_log "rsync -r --delete ${SRC_HOST}:${SRC_PATH_SNAP}/ ${DST_SNAP}"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user