cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/master to 0e3aebb
Date Wed, 19 Nov 2014 23:53:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master e32eec8b3 -> 0e3aebbb9


CLOUDSTACK-5446:
delete all the leftover snapshots on primary storage in case of snapshot
errors, after a new backup snapshot is finished


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

Branch: refs/heads/master
Commit: 0e3aebbb9db795b1acbc14d4f035da3cb2345f34
Parents: e32eec8
Author: Edison Su <sudison@gmail.com>
Authored: Wed Nov 19 14:31:51 2014 -0800
Committer: Edison Su <sudison@gmail.com>
Committed: Wed Nov 19 15:53:06 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e3aebbb/scripts/storage/qcow2/managesnapshot.sh
----------------------------------------------------------------------
diff --git a/scripts/storage/qcow2/managesnapshot.sh b/scripts/storage/qcow2/managesnapshot.sh
index 1ee69db..4225407 100755
--- a/scripts/storage/qcow2/managesnapshot.sh
+++ b/scripts/storage/qcow2/managesnapshot.sh
@@ -152,7 +152,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