Ceph has changed the meaning of the ``bytes_used`` column in the pools
reported by the ``df`` command, which means that in some deployments the
rbd driver is not reporting the expected information ot the schedulers.
The information we should be used for the calculations is returned in
the ``stored`` field in those systems.
This patch uses ``stored`` when present and fallbacks to ``bytes_used``
if not.
Closes-Bug: #1960206
Change-Id: I0ca25789a0b279d82f766091235f24f429405da6
(cherry picked from commit 86d9ec5d5932557ade18e7893cc2b8f564b5b2d8)
(cherry picked from commit 97926fb888a6cdb96640ebe4e06785e6ce198226)
(cherry picked from commit 2f798cb06a34a669459f2de6ab55d06aa985d221)
Reviewed: https:/ /review. opendev. org/c/openstack /cinder/ +/876474 /opendev. org/openstack/ cinder/ commit/ 84693e0207cfc34 a6b99c50066f3d1 846bd4050a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit 84693e0207cfc34 a6b99c50066f3d1 846bd4050a
Author: Gorka Eguileor <email address hidden>
Date: Wed Feb 16 17:03:41 2022 +0100
RBD: Fix total_capacity
Ceph has changed the meaning of the ``bytes_used`` column in the pools
reported by the ``df`` command, which means that in some deployments the
rbd driver is not reporting the expected information ot the schedulers.
The information we should be used for the calculations is returned in
the ``stored`` field in those systems.
This patch uses ``stored`` when present and fallbacks to ``bytes_used``
if not.
Closes-Bug: #1960206 d82f766091235f2 4f429405da6 ade18e7893cc2b8 f564b5b2d8) 96640ebe4e06785 e6ce198226) 9459f2de6ab55d0 6aa985d221)
Change-Id: I0ca25789a0b279
(cherry picked from commit 86d9ec5d5932557
(cherry picked from commit 97926fb888a6cdb
(cherry picked from commit 2f798cb06a34a66