From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C9DC61FF183 for ; Wed, 30 Jul 2025 11:17:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4FFFC379DB; Wed, 30 Jul 2025 11:18:52 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Wed, 30 Jul 2025 11:17:15 +0200 Message-ID: <20250730091816.35926-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250729111557.136012-34-w.bumiller@proxmox.com> References: <20250729111557.136012-34-w.bumiller@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753867089310 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.026 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemumigrate.pm, qemuserver.pm, qemu.pm] Subject: Re: [pve-devel] [PATCH qemu-server 04/10] expect 'vm-vol' vtype wherever 'images' was expected X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 29.07.25 um 1:25 PM schrieb Wolfgang Bumiller: > Signed-off-by: Wolfgang Bumiller > --- > src/PVE/API2/Qemu.pm | 16 +++++++++------- > src/PVE/QemuMigrate.pm | 3 ++- > src/PVE/QemuServer.pm | 6 ++++-- > 3 files changed, 15 insertions(+), 10 deletions(-) The verify_media_type() helper in QemuServer.pm needs updating too, e.g: diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm index 05a3be91..15b38caf 100644 --- a/src/PVE/QemuServer.pm +++ b/src/PVE/QemuServer.pm @@ -1090,18 +1090,18 @@ sub verify_media_type { return if !$media; - my $etype; if ($media eq 'disk') { - $etype = 'images'; + return if $vtype eq 'images' || $vtype eq 'vm-vol'; + raise_param_exc({ + $opt => + "wrong volume type '$vtype' for media=$media - expected 'images' or 'vm-vol'", + }); } elsif ($media eq 'cdrom') { - $etype = 'iso'; - } else { - die "internal error"; + return if $vtype eq 'iso'; + raise_param_exc({ $opt => "wrong volume type '$vtype' for media=$media - expected 'iso'" }); } - return if ($vtype eq $etype); - - raise_param_exc({ $opt => "unexpected media type ($vtype != $etype)" }); + die "internal error - unexpected media type '$media'\n"; } sub cleanup_drive_path { -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel