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.
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).
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