Bug 2043406 - ReclaimSpaceJob status showing "reclaimedSpace" value as "0"
Summary: ReclaimSpaceJob status showing "reclaimedSpace" value as "0"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: csi-addons
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ODF 4.10.0
Assignee: Rakshith
QA Contact: kmanohar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-21 08:09 UTC by Jilju Joy
Modified: 2023-08-09 16:37 UTC (History)
8 users (show)

Fixed In Version: 4.10.0-132
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-13 18:51:56 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github csi-addons kubernetes-csi-addons pull 98 0 None Merged controller: make reclaimspace.status.reclaimedspace a pointer 2022-01-21 11:00:38 UTC
Github red-hat-storage kubernetes-csi-addons pull 21 0 None open [release-4.10] Bug 2043406: sync upstream main branch to downstream 2022-01-21 13:09:26 UTC
Red Hat Product Errata RHSA-2022:1372 0 None None None 2022-04-13 18:52:08 UTC

Description Jilju Joy 2022-01-21 08:09:41 UTC
Description of problem (please be detailed as possible and provide log
snippests):
Given below is the yaml of a ReclaimSpaceJob which completed successfully. Space was actually reclaimed but the field status.reclaimedSpace is showing as "0" which means no space is reclaimed. This is providing a wrong information.

apiVersion: csiaddons.openshift.io/v1alpha1
kind: ReclaimSpaceJob
metadata:
  creationTimestamp: "2022-01-21T07:00:44Z"
  generation: 1
  name: pvc-test-a30eeae7f3984810a7a3a3c4b60cd45-reclaim-space-job-e56cb920c3214605817a7cdd13c55074
  namespace: namespace-test-0c5325c50c544a739b55e3bce
  resourceVersion: "102227"
  uid: 8bbc1198-47b3-4c03-8530-88b9ba9a3bb2
spec:
  backOffLimit: 10
  retryDeadlineSeconds: 900
  target:
    persistentVolumeClaim: pvc-test-a30eeae7f3984810a7a3a3c4b60cd45
status:
  completionTime: "2022-01-21T07:00:48Z"
  message: Reclaim Space operation successfully completed.
  reclaimedSpace: "0"
  result: Succeeded
  startTime: "2022-01-21T07:00:44Z"



Version of all relevant components (if applicable):
ODF 4.10.0-113
OCP 4.10.0-0.nightly-2022-01-20-082726

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Wrong information provided to the user

Is there any workaround available to the best of your knowledge?
No

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?


If this is a regression, please provide more details to justify this:
Reclaim space is a new feature 

Steps to Reproduce:
1. Create a PVC and attach it to a pod.
2. Create a file of size 10GiB.
3. Delete the file. 
4. Create ReclaimSpaceJob for the PVC.
5. Check the value of "reclaimedSpace" in the output of the successfully completed ReclaimSpaceJob


Actual results:
Value of "reclaimedSpace" is always "0" despite the fact that the space is reclaimed.

Expected results:
reclaimedSpace value should show the exact space reclaimed.

Additional info:
If the actual reclaimed space cannot be shown, as a last option, the parameter reclaimedSpace can be removed.

Comment 2 Niels de Vos 2022-01-21 08:28:46 UTC
The `reclaimedSpace` attribute in the status output can be made a pointer. It will then not be displayed if it is not set.

In future versions Ceph-CSI will return the optional attributes (pre-consumption, post-consumption) for reclaim-space operations. At that point, the `reclaimedSpace` attribute in the status output should get displayed (as non-zero value when space was reclaimed, zero when executed successfully, but nothing could be reclaimed).

Comment 8 errata-xmlrpc 2022-04-13 18:51:56 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 (Important: Red Hat OpenShift Data Foundation 4.10.0 enhancement, security & 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:1372


Note You need to log in before you can comment on or make changes to this bug.