Project

General

Profile

Bug #43384

mgr/dashboard: Pool size is calculated with data with different metrics

Added by Stephan Müller about 4 years ago. Updated almost 3 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Component - Pools
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Currently we use the following calculation in the dashboard to calculate the usage:

const avail = stats.bytes_used.latest + stats.max_avail.latest;
pool['usage'] = avail > 0 ? stats.bytes_used.latest / avail : avail;

[pool-list.component.ts:253-4]

The problem is that "max_avail" is calculated somewhat strangely as it does not show the real available space as it divides the available space at least through the number of replications for a replicated and by "(m+k)/k" for an ec pool.

To look the calculation up go to the following locations:
https://github.com/ceph/ceph/blob/master/src/osd/OSDMap.cc#L6033
https://github.com/ceph/ceph/blob/master/src/osd/OSDMap.cc#L6040
https://github.com/ceph/ceph/blob/master/src/osd/OSDMap.cc#L6054

https://github.com/ceph/ceph/blob/master/src/mon/PGMap.cc#L909
https://github.com/ceph/ceph/blob/master/src/mon/PGMap.cc#L920
https://github.com/ceph/ceph/blob/master/src/mon/PGMap.cc#L924
https://github.com/ceph/ceph/blob/master/src/mon/PGMap.cc#L947

This problem was found out by a user who notified us about the percentage mismatch, here is the link to the mail:
http://lists.ceph.com/pipermail/ceph-users-ceph.com/2019-December/037680.html

Also found this thread on the new mailing list regarding the used percentage and max_avail topic:
https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/NH2LMMX5KVRWCURI3BARRUAETKE2T2QN/#JDHXOQKWF6NZLQMOGEPAQCLI44KB54A3


Related issues

Duplicates Dashboard - Bug #45185: mgr/dashboard: fix usage calculation to match "ceph df" way Resolved

History

#1 Updated by Lenz Grimmer over 3 years ago

  • Duplicates Bug #45185: mgr/dashboard: fix usage calculation to match "ceph df" way added

#2 Updated by Lenz Grimmer over 3 years ago

  • Status changed from New to Duplicate

This is a duplicate of #45185 which was already resolved.

#3 Updated by Ernesto Puerta almost 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 137 to Component - Pools

Also available in: Atom PDF