The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7755
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === This fixes a bug in which deleting a volume with snapshots would only delete the snapshots, not the volume itself. Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From aa36d5e1b5ddb740635240504b8c562f637883c9 Mon Sep 17 00:00:00 2001 From: Thomas Hipp <thomas.h...@canonical.com> Date: Mon, 10 Aug 2020 10:13:48 +0200 Subject: [PATCH] lxd/storage/drivers/ceph: Fix volume deletion This fixes a bug in which deleting a volume with snapshots would only delete the snapshots, not the volume itself. Signed-off-by: Thomas Hipp <thomas.h...@canonical.com> --- lxd/storage/drivers/driver_ceph_utils.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lxd/storage/drivers/driver_ceph_utils.go b/lxd/storage/drivers/driver_ceph_utils.go index 6c399b48a2..f58a6b1ffd 100644 --- a/lxd/storage/drivers/driver_ceph_utils.go +++ b/lxd/storage/drivers/driver_ceph_utils.go @@ -621,6 +621,12 @@ func (d *ceph) deleteVolume(vol Volume) (int, error) { } return 1, nil + } else if zombies == 0 { + // Delete. + err = d.rbdDeleteVolume(vol) + if err != nil { + return -1, err + } } } else { if err != db.ErrNoSuchObject {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel