public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Christian Ebner <c.ebner@proxmox.com>
Subject: [pve-devel] applied: [PATCH v3 storage] api: fix get content call for volumes
Date: Mon, 20 Mar 2023 16:36:35 +0100	[thread overview]
Message-ID: <d3a1b993-9310-dd4a-82a4-84dcfdade5fb@proxmox.com> (raw)
In-Reply-To: <20230309094123.564813-1-c.ebner@proxmox.com>

Am 09/03/2023 um 10:41 schrieb Christian Ebner:
> `pvesh get /nodes/{node}/storage/{storage}/content/{volume}` failed for
> several storage types, because the respective storage plugins returned
> only the volumes `size` on `volume_size_info` calls, while also the format
> is required.
> 
> This patch fixes the issue by returning also `format` and where possible `used`.
> 
> The issue was reported in the forum:
> https://forum.proxmox.com/threads/pvesh-get-nodes-node-storage-storage-content-volume-returns-error.123747/
> 
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> 
> Changes since v1:
>  * Remove errous check for $used being set, rely on fallback to 0 if undef
>  * Return `parent` for RBD and ZFS
>  * Return `used` for ZFS
> 
> Changes since v2:
>  * Add conditional call to `rbd du` to get `used` for RBD based volumes
>  * Get `usedbydataset` instead of `used` for ZFS volumes, refactor
>    zfs_get_properties call
>  
>  Note: The file_size_info for iscsi direct targets unfortunately does
>        not return anything usefull for `used` storage size, so it stayed as
>        is.
> 
>  PVE/Storage/ISCSIDirectPlugin.pm |  2 +-
>  PVE/Storage/RBDPlugin.pm         | 44 ++++++++++++++++++++++++++++++--
>  PVE/Storage/ZFSPoolPlugin.pm     | 11 +++++---
>  3 files changed, 50 insertions(+), 7 deletions(-)
> 
>

applied, thanks!




      reply	other threads:[~2023-03-20 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  9:41 [pve-devel] " Christian Ebner
2023-03-20 15:36 ` Thomas Lamprecht [this message]

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=d3a1b993-9310-dd4a-82a4-84dcfdade5fb@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=c.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