]> git.proxmox.com Git - pve-manager.git/commit
fix #5293: ceph status: fix division-by-zero when calculating usage
authorChristoph Heiss <c.heiss@proxmox.com>
Tue, 12 Mar 2024 09:13:46 +0000 (10:13 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Mar 2024 17:16:00 +0000 (18:16 +0100)
commitda266fdc51ee8968edc10f9ed072ab757abd7c6b
tree449072e996cc9e5b35c051e9b9f14d08df1737dc
parent01200f7d732a001cb0500b6bc904d8e28228d003
fix #5293: ceph status: fix division-by-zero when calculating usage

Fixes #5293 [0]. This happens when no OSDs are created yet and thus the
total space is 0, which leads to a division-by-zero.

Add a simple check if the total space is greater than 0.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=5293

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/ceph/Status.js