You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2014/11/20 00:54:24 UTC

git commit: updated refs/heads/4.5 to 2667855

Repository: cloudstack
Updated Branches:
  refs/heads/4.5 6dc771279 -> 2667855cc


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/2667855c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2667855c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2667855c

Branch: refs/heads/4.5
Commit: 2667855ccb932f9a03ddf6639f6411c73fea1b2c
Parents: 6dc7712
Author: Edison Su <su...@gmail.com>
Authored: Wed Nov 19 14:31:51 2014 -0800
Committer: Edison Su <su...@gmail.com>
Committed: Wed Nov 19 15:54:09 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/2667855c/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