cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [11/12] git commit: updated refs/heads/4.3 to 8de4894
Date Wed, 26 Nov 2014 18:37:23 GMT
CLOUDSTACK-5446:
delete all the leftover snapshots on primary storage in case of snapshot
errors, after a new backup snapshot is finished

(cherry picked from commit 2667855ccb932f9a03ddf6639f6411c73fea1b2c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ba7711b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ba7711b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ba7711b0

Branch: refs/heads/4.3
Commit: ba7711b06685993bca5443ebdf6ccb76e87b9f6f
Parents: e9c5a03
Author: Edison Su <sudison@gmail.com>
Authored: Wed Nov 19 14:31:51 2014 -0800
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Nov 26 23:43:59 2014 +0530

----------------------------------------------------------------------
 scripts/storage/qcow2/managesnapshot.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba7711b0/scripts/storage/qcow2/managesnapshot.sh
----------------------------------------------------------------------
diff --git a/scripts/storage/qcow2/managesnapshot.sh b/scripts/storage/qcow2/managesnapshot.sh
index 42bd1eb..6f13600 100755
--- a/scripts/storage/qcow2/managesnapshot.sh
+++ b/scripts/storage/qcow2/managesnapshot.sh
@@ -146,7 +146,8 @@ destroy_snapshot() {
     fi
     lvm lvremove -f "${vg}/${snapshotname}-cow"
   elif [ -f $disk ]; then
-     $qemu_img snapshot -d "$snapshotname" $disk
+     #delete all the existing snapshots
+     $qemu_img snapshot -l $disk |tail -n +3|awk '{print $1}'|xargs -I {} $qemu_img snapshot
-d {} $disk >&2
      if [ $? -gt 0 ]
      then
        failed=2


Mime
View raw message