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

Fix RB_FORMAT issues

This commit is contained in:
Ruben S. Montero 2014-07-08 18:40:51 +02:00
parent ccc47d6534
commit 2b5164b195
3 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ RBD_SNAP="${VM_ID}-${DISK_ID}"
CLONE_CMD=$(cat <<EOF
set -e
RBD_FORMAT=`rbd info $SRC_PATH | sed -n 's/.*format: // p'`
RBD_FORMAT=\$(rbd info $SRC_PATH | sed -n 's/.*format: // p')
if [ "\$RBD_FORMAT" = "2" ]; then
$RBD snap create "$SRC_PATH@$RBD_SNAP"

View File

@ -91,7 +91,7 @@ log "Deleting $DST_PATH"
DELETE_CMD=$(cat <<EOF
set -e
RBD_FORMAT=`rbd info $SRC_PATH | sed -n 's/.*format: // p'`
RBD_FORMAT=\$(rbd info $RBD_SRC | sed -n 's/.*format: // p')
$RBD rm $RBD_SRC

View File

@ -80,9 +80,9 @@ log "Dumping $RBD_DST to $DST"
DUMP_CMD=$(cat <<EOF
set -e
RBD_FORMAT=`rbd info $SRC_PATH | sed -n 's/.*format: // p'`
RBD_FORMAT=\$(rbd info $RBD_DST | sed -n 's/.*format: // p')
if [ "\$RBD_FORMAT" = "2" ]; then
if [ "\${RBD_FORMAT}" = "2" ]; then
$RBD flatten $RBD_DST
$RBD snap unprotect $RBD_SRC@$RBD_SNAP
$RBD snap rm $RBD_SRC@$RBD_SNAP