public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] api/move_disk: log deletion of source volume
Date: Mon, 18 Oct 2021 10:24:37 +0200	[thread overview]
Message-ID: <20211018082437.1619549-1-d.csapak@proxmox.com> (raw)

This way the user always sees that the source was deleted, even
if the storage plugin does not log anything (not every storage plugin
does).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 PVE/API2/Qemu.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index cc2a543..d457421 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -3446,9 +3446,11 @@ __PACKAGE__->register_method({
                 }
 
 		if ($param->{delete}) {
+		    warn "removing source volume '$old_volid'\n";
 		    eval {
 			PVE::Storage::deactivate_volumes($storecfg, [$old_volid]);
 			PVE::Storage::vdisk_free($storecfg, $old_volid);
+			warn "source volume successfully removed\n";
 		    };
 		    warn $@ if $@;
 		}
-- 
2.30.2





                 reply	other threads:[~2021-10-18  8:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211018082437.1619549-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal