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
Generate events on PV when volume cannot be created for static volumes #2725
Generate events on PV when volume cannot be created for static volumes #2725
Conversation
Hi @skogta. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
56cf50a
to
f83b3f6
Compare
f83b3f6
to
c8a2e85
Compare
c8a2e85
to
d563c11
Compare
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address review comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: divyenpatel, skogta 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 |
What this PR does / why we need it:
If static volume provisioning fails for a PV, then there is now ay for the user to verify that it has failed other than checking syncer logs. So in this PR, we are generating failure event for static volumes.
Note: There are only 2 types events: https://pkg.go.dev/k8s.io/api/core/v1
So setting the type to Warning in this case.
Also, as part of this change, I am changing the method getPVsInBoundAvailableOrReleasedForVc to not return error if a volume cannot be mapped to a VC. One bad volume should not block the rest of the full sync.
Testing done:
On a multi VC testbed, created a RWX static volume with incorrect VolumeHandle that does not exist.
PV describe output:
On multi VC testbed, created a block volume without nodeaffinity rules
Single VC failure
On a single VC, gave wrong volume handle in static PV:
Special notes for your reviewer:
Release note: