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

Add block volume support to internal provisioners. #64447

Merged
merged 2 commits into from
Jun 1, 2018

Conversation

jsafrane
Copy link
Member

@jsafrane jsafrane commented May 29, 2018

What this PR does / why we need it:
Internal provisioners now create filesystem PVs when block PVs are requested. This leads to unbindable PVCs.

In this PR, volume plugins that support block volumes provision block PVs when block is requested. All the other provisioners return clear error in kubectl describe pvc:

Events:
  Type     Reason              Age               From                         Message
  ----     ------              ----              ----                         -------
  Warning  ProvisioningFailed  7s (x2 over 18s)  persistentvolume-controller  Failed to provision volume with StorageClass "standard": kubernetes.io/cinder does not support block volume provisioning

AWS EBS, Azure Disk, GCE PD and Ceph RBD volume plugins support dynamic provisioning of raw block volumes.

cc @kubernetes/vmware for vsphere changes
cc @andyzhangx for Azure changes

/assign @copejon @mtanino

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label May 29, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 29, 2018
@jsafrane
Copy link
Member Author

e2e tests will follow

Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
on azuredisk & azurefile part

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 29, 2018
@jsafrane
Copy link
Member Author

Thanks for the quick review, however,
/lgtm cancel

I need the others reviewer too :-)

@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 29, 2018
@jsafrane
Copy link
Member Author

/approve
stupid bot!

@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. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 29, 2018
@jsafrane
Copy link
Member Author

Added e2e test. I ran it manually on GCE and AWS. It will be run in alpha test suite(s), since it depends on alpha feature.

@childsb
Copy link
Contributor

childsb commented May 29, 2018

This seems like a feature, but its really a bug fix:

  1. we added block volume support for SOME of the plugins
  2. The plugins which we didn't explicitly get block volume support don't know that they didn't
  3. the provisioners for the volume types which dont have block volume support still provision regular volumes when the block volume flag is set in the storage class.

ideally these volume types wouldn't even provision volumes, but enforcing that may be more difficult then enabling them to provision block volumes.

would like this in as a fix for 1.11

@jsafrane
Copy link
Member Author

/kind bug
/priority critical-urgent

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels May 29, 2018
@humblec
Copy link
Contributor

humblec commented May 29, 2018

"lgtm" from gluster side, Thanks Jan!

@erinboyd
Copy link

@mkimuram @screeley44 @msau42 please review

@jsafrane
Copy link
Member Author

/retest

@mkimuram
Copy link
Contributor

I think that it's enough to have a check in Provision() call in each volume plugin. They're responsible to provision something that corresponds to given PVC, incl. block volume support.

I agree with you that it is enough for checking current internal provisioner.

Traditionally, we leave this to users / cluster admins. It's their responsibility to run their clusters with compatible components, i.e. with the provisioners that support block. And that's what are alpha/beta feature gates good for. I know it's not ideal, however, there is no direct call-like interface between Kubernetes and external provisioners.

However, IIUC, we are on the way to migrate provision logic for all plugins to CSI,
and CSI provisioner will not have a similar place to check whether each CSI driver supports block volume, because they share the same Provision() and call CreateVolume() for each driver inside it(*1)(*2).

If we don't check it, we won't be able to make filebase backend, like NFS and file mode of Gluster/Ceph, co-exist in blockVolume-enabled environment.
(Assuming that filebase backend can't support blockVolume, and blockVolume-enabled environment only allows blockVolume supported drivers without this kind of check.)

So, I think that we also need to find a way to check it in external provisioner.
(It doesn't need to be the same logic to internal provisioner, so we can separate this issue from this PR, though.)

(*1) provisionClaimOperation() for external provisioner.
https://github.com/kubernetes-incubator/external-storage/blob/master/lib/controller/controller.go#L887
(*2) Provision() call for CSI
https://github.com/kubernetes-csi/external-provisioner/blob/master/pkg/controller/controller.go#L280

@jsafrane
Copy link
Member Author

For CSI we have external provisioner that will get updated with a particular Kubernetes release and will check what PVC wants and if the CSI driver supports it.

@msau42
Copy link
Member

msau42 commented May 30, 2018

For CSI we have external provisioner that will get updated with a particular Kubernetes release

Users could run older versions of the CSI driver though so we still need to handle the scenario that the external provisioner may ignore any new provisioning parameters

@screeley44
Copy link
Contributor

aws and e2e LGTM

@mkimuram
Copy link
Contributor

To discuss similar check for external provisioner, I made PR for it.

As described there, similar issue to CSI also happens in flex volume plugin.

@rootfs
Copy link
Contributor

rootfs commented May 31, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 31, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, jsafrane, rootfs

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

@jsafrane
Copy link
Member Author

I got reviews from all volume plugins (@rootfs for Cinder and RBD)

/sig storage

@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label May 31, 2018
@jsafrane
Copy link
Member Author

Action required: This pull request must have the status/approved-for-milestone label applied by a SIG maintainer.

@childsb @saad-ali, can you please make sure this is merged in 1.11?

@dims
Copy link
Member

dims commented Jun 1, 2018

/status approved-for-milestone

@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@andyzhangx @copejon @jsafrane @mtanino @rootfs

Pull Request Labels
  • sig/storage: Pull Request will be escalated to these SIGs if needed.
  • priority/critical-urgent: Never automatically move pull request out of a release milestone; continually escalate to contributor and SIG through all available channels.
  • kind/bug: Fixes a bug discovered during the current release.
Help

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-ci-robot
Copy link
Contributor

@jsafrane: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-integration 408f62c link /test pull-kubernetes-integration
pull-kubernetes-e2e-gce 408f62c link /test pull-kubernetes-e2e-gce

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.

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. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 63348, 63839, 63143, 64447, 64567). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 38d2dc7 into kubernetes:master Jun 1, 2018
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jun 4, 2018
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/storage Categorizes an issue or PR as relevant to SIG Storage. 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.

None yet