Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reclaimspace: consider VA object only it is attached & not being deleted #285

Merged
merged 1 commit into from
Jan 2, 2023

Conversation

Rakshith-R
Copy link
Member

This commit makes modification to ignore Volume Attachment objects which are being deleted or not attached.

Signed-off-by: Rakshith R [email protected]

This commit makes modification to ignore Volume Attachment objects
which are being deleted or not attached.

Signed-off-by: Rakshith R <[email protected]>
@mergify mergify bot requested review from nixpanic, yati1998 and Yuggupta27 January 2, 2023 07:23
@Rakshith-R Rakshith-R requested review from humblec and Madhu-1 January 2, 2023 07:27
@@ -324,7 +324,7 @@ func (r *ReclaimSpaceJobReconciler) getTargetDetails(
pvName: pv.Name,
}
for _, v := range volumeAttachments.Items {
if *v.Spec.Source.PersistentVolumeName == pv.Name {
if v.DeletionTimestamp.IsZero() && v.Status.Attached && *v.Spec.Source.PersistentVolumeName == pv.Name {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true for controller space reclaim, as PV is not required to be attached, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true for controller space reclaim, as PV is not required to be attached, right?

We don't need node information for performing controller space reclaim.
It will still happen.

@Rakshith-R Rakshith-R requested a review from Madhu-1 January 2, 2023 07:39
@mergify mergify bot merged commit 4dda11c into csi-addons:main Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants