public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH storage 2/4] fix #8169: pvesm: extractconfig: fix regression with backup type check
Date: Mon, 19 Oct 2026 12:57:53 +0200	[thread overview]
Message-ID: <20261019110029.92256-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20261019110029.92256-1-f.ebner@proxmox.com>

Commit 9d0049e ("pvesm: extractconfig: clean early error for non-guest
backup") introduced a regression for guest backups without a guest ID:
it is no longer possible to extract the configuration from such
backups. Before, there was a Perl warning about the uninitialized ID
and the permission check would need to pass for 'VM.Backup' on '/vms',
but extraction was possible and it was relied on in practice, see the
regression report.

Avoid the early check for a guest ID, which does not cover (e.g.
manually renamed) guest backups without a guest ID. The storage layer
already checks the backup type later. In particular, the
extract_vzdump_config() function has three branches:

1. PBS: the PBS plugin's extract_vzdump_config() checks that the
   backup's format is either 'pbs-vm' or 'pbs-ct'.
2. backup provider: only guest backups are part of the backup provider
   API. It is the implemenation's responsibility to avoid exposing
   other content, in particular via archive_get_guest_config() here.
3. path-based vzdump backup: the backup type is checked via
   archive_info() to be one of 'lxc', 'openvz' or 'qemu'.

Fixes: 9d0049e ("pvesm: extractconfig: clean early error for non-guest backup")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/CLI/pvesm.pm | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/PVE/CLI/pvesm.pm b/src/PVE/CLI/pvesm.pm
index 4b42734..fa32295 100755
--- a/src/PVE/CLI/pvesm.pm
+++ b/src/PVE/CLI/pvesm.pm
@@ -182,13 +182,6 @@ __PACKAGE__->register_method({
             $rpcenv, $authuser, $storage_cfg, undef, $volume, 'backup',
         );
 
-        if (PVE::Storage::parse_volume_id($volume, 1)) {
-            my (undef, undef, $ownervm) = PVE::Storage::parse_volname($storage_cfg, $volume);
-            if (!defined($ownervm)) {
-                die "unable to extract configuration for '$volume' - not a guest backup\n";
-            }
-        }
-
         my $config_raw = PVE::Storage::extract_vzdump_config($storage_cfg, $volume);
 
         print "$config_raw\n";
-- 
2.47.3





  parent reply	other threads:[~2026-10-19 11:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 10:57 [PATCH-SERIES storage/manager 0/4] fix #8169: backup: extract config: fix regression with backup type check Fiona Ebner
2026-10-19 10:57 ` [PATCH storage 1/4] pvesm: extractconfig: allow access for Datastore.Allocate Fiona Ebner
2026-10-19 10:57 ` Fiona Ebner [this message]
2026-10-19 10:57 ` [PATCH manager 3/4] api: backup: extract config: " Fiona Ebner
2026-10-19 10:57 ` [PATCH manager 4/4] fix #8169: api: backup: extract config: fix regression with backup type check Fiona Ebner

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=20261019110029.92256-3-f.ebner@proxmox.com \
    --to=f.ebner@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