public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Igor Thaller <igor.thaller@aon.at>, pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH manager v2] ui: dc summary: fix calculation of storage size
Date: Wed, 31 Jul 2024 17:34:12 +0200	[thread overview]
Message-ID: <c4a69cc4-9e99-4623-97d8-45e046052103@proxmox.com> (raw)
In-Reply-To: <20240731121409.639432-1-igor.thaller@aon.at>

Am 31/07/2024 um 14:14 schrieb Igor Thaller:
> The issue is related to the 'Summary' tab under 'Datacenter' inside a
> cluster. To get a steady reading of the storage size data, the frontend
> requests the '/api2/json/cluster/resources' every three seconds to
> retrieve the necessary data to calculate the used and total storage
> size.
> 
> The problem occurs when a shared storage is defined and a node goes
> offline. As the node is not online, it cannot report the shared storage
> size (both used and total) back to the other nodes. The order of the
> JSON response is not always the same, so it is possible that the offline
> node will appear first. Consequently, the frontend will display the
> wrong total and used storage. This is because the shared storage data
> has both the maximum disk size and the used disk set to zero when the
> node is offline. This causes the total and used space data to be
> calculated and displayed incorrectly, leading to fluctuations in the
> displayed percentage of used disk space.
> 
> To fix this, add a conditional check to skip the storage report if its
> status is 'unknown' (regardless of if the storage is local or shared).
> This prevents the unreliable data from being processed.
> 
> Reported-by: Friedrich Weber <f.weber@proxmox.com>
> Signed-off-by: Igor Thaller <igor.thaller@aon.at>
> ---
> 
> Notes:
>     Changes from v1 -> v2
>     * Ignore all storages of status unknown instead of ignoring just shared
>       storages with status unknown (thanks Fiona)
>     * Move the testing comments to the notes (thanks Fiona)
>     * Reword sentence describing the problem
>     
>     To test these changes, adjust the 'max_requests' variable in the Perl
>     script located at '/usr/share/perl5/PVE/Service/pveproxy.pm' to increase
>     the likelihood of the error to occur. This makes the storage size
>     fluctuations more frequent. Then compare the storage results (both used
>     and total sizes) before and after implementing the fix.
>     
>     Note: Be aware that it takes around one minute for the spike to happen.
> 
>  www/manager6/dc/Summary.js | 5 +++++
>  1 file changed, 5 insertions(+)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


           reply	other threads:[~2024-07-31 15:34 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20240731121409.639432-1-igor.thaller@aon.at>]

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=c4a69cc4-9e99-4623-97d8-45e046052103@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=igor.thaller@aon.at \
    --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