mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-08 05:57:23 +03:00
B #-: Fix disk snapshot live for ssh driver
It does not work when disks are not a symlink (cherry picked from commit 8a0b647f3fb6f211218a06b1a3b759546ff62b1d)
This commit is contained in:
parent
93a039bd8b
commit
72a5dee464
@ -73,7 +73,11 @@ $(type retry_if_no_error| grep -v 'is a function')
|
||||
mkdir -p "${SNAP_DIR}"
|
||||
touch $SNAP_PATH
|
||||
|
||||
REAL_DISK="\$(dirname $SRC_PATH)/\$(readlink $SRC_PATH)"
|
||||
if [ -L "${SRC_PATH}" ]; then
|
||||
REAL_DISK="\$(dirname $SRC_PATH)/\$(readlink $SRC_PATH)"
|
||||
else
|
||||
REAL_DISK="${SRC_PATH}"
|
||||
fi
|
||||
|
||||
retry_if_no_error "active block job" 3 5 virsh -q -c ${LIBVIRT_URI} blockcopy ${DEPLOY_ID} \
|
||||
--path \${REAL_DISK} --dest $SNAP_PATH --wait --finish
|
||||
|
Loading…
x
Reference in New Issue
Block a user