-
Notifications
You must be signed in to change notification settings - Fork 147
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
Mock topology testing #249
Mock topology testing #249
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pohly 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 |
mock/service/controller.go
Outdated
@@ -58,6 +63,18 @@ func (s *service) CreateVolume( | |||
return nil, status.Errorf(codes.OutOfRange, "Requested capacity %d exceeds maximum allowed %d", capacity, MaxStorageCapacity) | |||
} | |||
|
|||
// Simulate "out of storage space" error? | |||
if capacityLimit := req.GetParameters()["capacityLimit"]; capacityLimit != "" { |
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.
@jsafrane how soon is that error injection coming?
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.
/hold
There's now a WIP PR for that in PR #251. Using that approach makes more sense than adding special cases like this one here to the code.
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.
/hold cancel
This is off by default. If enabled, the mock driver returns the capability for topology and a fixed "io.kubernetes.storage.mock/node: some-mock-node" topology segment for the node it runs on and all volumes. This makes it possible to test some more code paths in external-provisioner.
e4eb990
to
5024dd3
Compare
I've stripped out the error injection and rewrote kubernetes/kubernetes#88114 to use JavaScript error injection. What's left is just the optional topology support. Can we merge this now? Then I'll do a csi-test release. |
That should also unblock kubernetes/kubernetes#89041. |
/lgtm |
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
For testing the upcoming "unset selected node" feature in external-provisioner.
Which issue(s) this PR fixes:
Related-to: kubernetes/kubernetes#72031
Special notes for your reviewer:
This could be merged as-is, but it might also make sense to first review the other PRs.
Does this PR introduce a user-facing change?: