Bug 2021447

Summary: [ceph-dashboard] Dashboard reporting zero size for RBD images mapped to Linux clients via RBD kernel module
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Sergii Mykhailushko <smykhail>
Component: Ceph-DashboardAssignee: avan <athakkar>
Status: CLOSED ERRATA QA Contact: Sunil Angadi <sangadi>
Severity: medium Docs Contact: Anjana Suparna Sriram <asriram>
Priority: medium    
Version: 4.2CC: athakkar, ceph-eng-bugs, epuertat, tserlin
Target Milestone: ---   
Target Release: 4.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-14.2.22-39.el8cp, ceph-14.2.22-39.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-05 07:54:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergii Mykhailushko 2021-11-09 09:22:36 UTC
Description of problem:

In case RBD image doesn't have 'object-map' and 'fast-diff' features enabled, the dashboard will show its size as '0 bytes' if it's mapped to Linux client using RBD kernel module.

However 'rbd info' command would still report the size correctly.

For example, we have two images: 'img01' and 'img02'. Below is the output of 'rbd info' for these images:

~~~
rbd image 'img01':
 →      size 4 TiB in 1048576 objects
        order 22 (4 MiB objects)
        snapshot_count: 0
        id: 8a887425ae72cc
        block_name_prefix: rbd_data.8a887425ae72cc
        format: 2
 →      features: layering, exclusive-lock, object-map, fast-diff
        op_features:
        flags:
...

rbd image 'img02':
 →      size 2 TiB in 524288 objects
        order 22 (4 MiB objects)
        snapshot_count: 0
        id: b08ad24b5cae6
        block_name_prefix: rbd_data.b08ad24b5cae6
        format: 2
 →      features: layering, exclusive-lock
        op_features:
        flags:
...
~~~

Note, that it 'fast-diff' is automatically enabled when enabling 'object-map' feature on the image, so i'm not quite sure which of two changes the behavior actually.

RHCS dashboard shows 0 Bytes Provisioned or Total provisioned for 'img02' if it is mapped to a Linux client using the RBD kernel module. The size is however reported correctly if the image with the same feature set is created with gwcli and then exposed via iSCSI gateway.

In our documentation [*] we do suggest only 'layering' and 'exclusive-lock' features to be enabled for the images which are mounted with RBD kernel module:

---✀---
14. Configure the following: ① the desired image name, ② set Pool to the pool created earlier, ③ set the desired size of the image, ④ ensure Layering and Exclusive lock are the only enabled features: 
---✀---

[*] https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html/block_device_guide/the-rbd-kernel-module

Is it an expected behavior for the dashboard, or are we hitting any bug with the size calculation, or maybe a documentation bug here?

Comment 16 errata-xmlrpc 2022-05-05 07:54:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Ceph Storage 4.3 Security and Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1716