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

fix cnsunregister API to not use CNS metadata #3192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

divyenpatel
Copy link
Member

What this PR does / why we need it:
This PR is removing usage of CNS Volume metadata for CnsUnregisterVolume API.

CnsUnregisterVolume API was querying CNS with the volume ID and if volume is not found in CNS, API marks CnsUnregisterVolume as sucess. We may have stale metadata in the CNS, and we can rely on it.

With this PR, reconciler is finding PV/PVC in the cluster for the volume being unregistered, and if they are present and not in use by any Pod or not attached to any VM service vm, then allow de-registering volume.

Testing done:
In Progress

Special notes for your reviewer:

Release note:

fix cnsunregister API to not use CNS metadata

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 15, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: divyenpatel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 15, 2025
@divyenpatel divyenpatel changed the title fix cnsunregister API to not use CNS metadata [WIP] fix cnsunregister API to not use CNS metadata Feb 15, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 15, 2025
@divyenpatel divyenpatel force-pushed the fix-cns-unregister-volume-to-not-use-cns-metadata branch 2 times, most recently from 940e475 to 7532697 Compare February 15, 2025 01:37
@divyenpatel divyenpatel force-pushed the fix-cns-unregister-volume-to-not-use-cns-metadata branch from 7532697 to cd909a4 Compare February 19, 2025 00:57
@divyenpatel divyenpatel changed the title [WIP] fix cnsunregister API to not use CNS metadata fix cnsunregister API to not use CNS metadata Feb 19, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants