Commit be3b061c authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

KVM SR: stop export/import if previous step failed.

parent dc752c18
...@@ -115,7 +115,7 @@ mode = 0644 ...@@ -115,7 +115,7 @@ mode = 0644
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/kvm-import.sh.in url = ${:_profile_base_location_}/template/kvm-import.sh.in
filename = kvm-import.sh.in filename = kvm-import.sh.in
md5sum = e03ed049cddd8d157228b09e1ebc071a md5sum = a731372420dc59c0b5ba7bc5f39a14ad
download-only = true download-only = true
mode = 0755 mode = 0755
...@@ -130,7 +130,7 @@ mode = 0644 ...@@ -130,7 +130,7 @@ mode = 0644
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/kvm-export.sh.in url = ${:_profile_base_location_}/template/kvm-export.sh.in
filename = kvm-export.sh.in filename = kvm-export.sh.in
md5sum = 08cd8da2221f09095b14e35e6acd2a56 md5sum = 3e878b3343c76f0d6950986fffcb6a8c
download-only = true download-only = true
mode = 0755 mode = 0755
......
...@@ -14,5 +14,5 @@ $QEMU_IMG snapshot -c $SNAPSHOT_NAME $DISK_PATH ...@@ -14,5 +14,5 @@ $QEMU_IMG snapshot -c $SNAPSHOT_NAME $DISK_PATH
if [ -f $BACKUP_PATH ]; then if [ -f $BACKUP_PATH ]; then
rm $BACKUP_PATH rm $BACKUP_PATH
fi fi
$QEMU_IMG convert -f qcow2 -O qcow2 -s $SNAPSHOT_NAME $DISK_PATH $BACKUP_PATH $QEMU_IMG convert -f qcow2 -O qcow2 -s $SNAPSHOT_NAME $DISK_PATH $BACKUP_PATH && \
$QEMU_IMG snapshot -d $SNAPSHOT_NAME $DISK_PATH $QEMU_IMG snapshot -d $SNAPSHOT_NAME $DISK_PATH
...@@ -3,5 +3,5 @@ DISK_PATH=${:disk-path} ...@@ -3,5 +3,5 @@ DISK_PATH=${:disk-path}
BACKUP_PATH=${:backup-disk-path} BACKUP_PATH=${:backup-disk-path}
# TODO: Use rdiff # TODO: Use rdiff
rm $DISK_PATH rm $DISK_PATH && \
cp $BACKUP_PATH $DISK_PATH cp $BACKUP_PATH $DISK_PATH
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment