kubernetes-retired / drivers

[EOL] Example CSI Drivers
Apache License 2.0
140 stars 92 forks source link

hostpath: refuse to create block volumes #125

Closed pohly closed 5 years ago

pohly commented 5 years ago

Without this check, the hostpath driver fails one of the E2E storage tests in Kubernetes 1.13: provisioning a block volume is expected to fail in https://github.com/kubernetes/kubernetes/blob/e689d515f77cda51898045d626ec4070e3328194/test/e2e/storage/testsuites/volumemode.go#L329-L330

pohly commented 5 years ago

We should get this into hostpath v1.0.0. Without it, testing against hostpath v1.0.0 and provisioner v1.0.1 will fail, see the trial PR https://github.com/kubernetes/kubernetes/pull/71742 and this job: https://gubernator.k8s.io/build/kubernetes-jenkins/pr-logs/pull/71742/pull-kubernetes-e2e-gce/61906/

The reason why the tests currently pass in Kubernetes 1.13 is that the tests use an external-provisioner which doesn't have block volume support, so currently it is the provisioner which rejects the unsupported operation. But block volume support was added after v1.0.0 (https://github.com/kubernetes-csi/external-provisioner/commit/72398be11002ebdb03dd49b8305e44e713299221) and now all CSI drivers under test must have this check.

pohly commented 5 years ago

I've verified locally that the test passes with the updated hostpath driver.

msau42 commented 5 years ago

/lgtm

k8s-ci-robot commented 5 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pohly, saad-ali

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: - ~~[OWNERS](https://github.com/kubernetes-csi/drivers/blob/master/OWNERS)~~ [saad-ali] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment