Add more missing features from mock csi driver#269
Add more missing features from mock csi driver#269k8s-ci-robot merged 4 commits intokubernetes-csi:masterfrom
Conversation
|
Hi @avalluri. Thanks for your PR. I'm waiting for a kubernetes-csi 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. DetailsInstructions 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. |
|
/ok-to-test |
68887e1 to
5fcc26d
Compare
| mutex sync.Mutex | ||
| volumes map[string]hostPathVolume | ||
| snapshots map[string]hostPathSnapshot | ||
| capacity Capacity |
There was a problem hiding this comment.
Capacity must be protected by the mutex. That is no longer obvious.
Perhaps a better solution for it would be to have a read-only copy of the total capacity in config and dynamically calculate the remaining capacity by substracting the size of all current volumes.
There was a problem hiding this comment.
I have another, older PR which also adds another parameter and partly fixed the capacity check: #253
Here's a proposal:
- I change how capacity is tracked in that PR.
- I add your config struct commit.
- I add my new value to it.
Once that is merged, you can rebase your PR.
There was a problem hiding this comment.
Sounds good,, Once your PR is ready, I will rebase mine.
pohly
left a comment
There was a problem hiding this comment.
The rest looks okay to me.
|
/test pull-kubernetes-csi-csi-driver-host-path-distributed-on-kubernetes-master |
I will check what caused the failure. |
I have a fix for the install issue in #253. The code itself probably also needed some of the changes there. |
|
/retest |
|
/test pull-kubernetes-csi-csi-driver-host-path-distributed-on-kubernetes-master |
| maxVolumesPerNode = flag.Int64("maxvolumespernode", 0, "limit of volumes per node") | ||
| showVersion = flag.Bool("version", false, "Show version.") | ||
| capacity = func() hostpath.Capacity { | ||
| c := hostpath.Capacity{} |
There was a problem hiding this comment.
This initialization here must not get dropped. Dropping it causes a nil-map access when a parameter gets set.
#253 changes hostpath.Capacity so that a nil pointer is okay.
fbaa9fb to
2d4c721
Compare
|
Rebased on #253 |
|
/test pull-kubernetes-csi-csi-driver-host-path-distributed-on-kubernetes-master |
This is _on_ by default. If disabled, the driver does not add VOLUME_ACCESSIBILITY_CONSTRAINTS to its plugin capabilities and also does not add AccessibiilityTopology information for the volumes. This makes it possible to test some more code paths in external-provisioner.
It is _on_ default. When it is disabled, driver does not add RPC_EXPAND_VOLUME to its capabilities list. This is the feature supported by mock CSI driver.
2d4c721 to
6fe4041
Compare
|
/test pull-kubernetes-csi-csi-driver-host-path-distributed-on-kubernetes-master |
|
@avalluri: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. I understand the commands that are listed here. |
|
|
pohly
left a comment
There was a problem hiding this comment.
The code is fine, but the release notes entry only reflects one of the four feature commits. Please also mention the other new options.
Updated the release notes with two other command-line options. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: avalluri, pohly The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| flag.Int64Var(&cfg.MaxVolumeSize, "max-volume-size", 1024*1024*1024*1024, "maximum size of volumes in bytes (inclusive)") | ||
|
|
||
| flag.BoolVar(&cfg.EnableTopology, "enable-topology", true, "Enables PluginCapability_Service_VOLUME_ACCESSIBILITY_CONSTRAINTS capability.") | ||
| flag.BoolVar(&cfg.EnableVolumeExpansion, "node-expand-required", true, "Enables NodeServiceCapability_RPC_EXPAND_VOLUME capacity.") |
There was a problem hiding this comment.
This variable and configuration option is strangely named. It says "node-expand-required" but in truth, it controls entire volume expansion feature. I would like us to rename this.
There was a problem hiding this comment.
I haven't looked into it, but that sounds reasonable. Can you submit a PR?
What type of PR is this?
/kind feature
What this PR does / why we need it:
With the combination of #260, this enables in replacing the Mock CSI driver with host-path driver in Kubernetes E2E testing as described in #247.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
This PR is based on changes in #260.
Does this PR introduce a user-facing change?: