cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [37/41] git commit: updated refs/heads/4.4 to 010a217
Date Thu, 11 Dec 2014 16:54:17 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/40bc5df0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/40bc5df0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/40bc5df0

Branch: refs/heads/4.4
Commit: 40bc5df0b1f82e5282521a869648b17c4af51558
Parents: 5e5d830
Author: Edison Su <sudison@gmail.com>
Authored: Wed Nov 19 14:31:51 2014 -0800
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Thu Dec 11 20:52:06 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/40bc5df0/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