all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Elias Huhsovitz" <e.huhsovitz@proxmox.com>
To: "Fiona Ebner" <f.ebner@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH qemu-server v2 2/7] drive: get tpm state size: also warn if there was no size returned
Date: Fri, 30 Oct 2026 11:39:32 +0100	[thread overview]
Message-ID: <DMI3X3QFQ3KT.3OJO6PPOODTJR@proxmox.com> (raw)
In-Reply-To: <20261029120811.107814-3-f.ebner@proxmox.com>

More specific error messages make debugging easier, so consider this:

Reviewed-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>

On Thu Oct 29, 2026 at 1:06 PM CET, Fiona Ebner wrote:
> Some storage plugin implementations of the volume_size_info() method
> do not fail with a hard error. In particular, the native file-based
> plugins use file_size_info() which returns undef upon failure. Thus,
> explicitly check the size.
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>
> New in v2.
>
>  src/PVE/QemuServer/Drive.pm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/QemuServer/Drive.pm b/src/PVE/QemuServer/Drive.pm
> index 0ca3d636..7b288e78 100644
> --- a/src/PVE/QemuServer/Drive.pm
> +++ b/src/PVE/QemuServer/Drive.pm
> @@ -1334,7 +1334,9 @@ sub get_tpmstate_size {
>          if !defined($storecfg);
>  
>      my $size = eval { PVE::Storage::volume_size_info($storecfg, $volid, 10) };
> -    warn "failed to get size of the tpm drive $volid: $@" if $@;
> +    my $err = $@;
> +    $err = "no size in result" if !$err && !$size;
> +    warn "failed to get size of the tpm drive $volid: $err" if $err;
>  
>      if (!$size || $size < TPMSTATE_DISK_SIZE) {
>          $size = TPMSTATE_DISK_SIZE;





  reply	other threads:[~2026-10-30 10:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 12:06 [PATCH-SERIES qemu-server v2 0/7] fix #8209: clone disk: do not ignore failure to query size of target Fiona Ebner
2026-10-29 12:06 ` [PATCH qemu-server v2 1/7] block job: monitor: document that job-complete is not used if source differs from target Fiona Ebner
2026-10-30 10:37   ` Elias Huhsovitz
2026-10-29 12:06 ` [PATCH qemu-server v2 2/7] drive: get tpm state size: also warn if there was no size returned Fiona Ebner
2026-10-30 10:39   ` Elias Huhsovitz [this message]
2026-10-29 12:06 ` [PATCH qemu-server v2 3/7] api: clone disk: downgrade failure to register unused volume to warning Fiona Ebner
2026-10-30 10:56   ` Elias Huhsovitz
2026-10-29 12:06 ` [PATCH qemu-server v2 4/7] fix #8209: clone disk: do not ignore failure to query size of target Fiona Ebner
2026-10-30 10:36   ` Elias Huhsovitz
2026-10-29 12:06 ` [PATCH qemu-server v2 5/7] clone disk: abort early when failing to query size of source disk Fiona Ebner
2026-10-29 12:06 ` [PATCH qemu-server v2 6/7] drive: get tpm state size: add timeout parameter Fiona Ebner
2026-10-30 11:02   ` Elias Huhsovitz
2026-10-29 12:06 ` [PATCH qemu-server v2 7/7] clone disk: bump timeout for querying volume sizes to 1 minute Fiona Ebner
2026-10-30 11:14   ` Elias Huhsovitz

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=DMI3X3QFQ3KT.3OJO6PPOODTJR@proxmox.com \
    --to=e.huhsovitz@proxmox.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal