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

Reintroduce CSI 0.3.x support in CSI Volume Plugin #71314

Merged
merged 5 commits into from
Nov 22, 2018

Conversation

saad-ali
Copy link
Member

@saad-ali saad-ali commented Nov 21, 2018

What type of PR is this?

Uncomment only one, leave it on its own line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
PR #71020 removed support for CSI 0.x while adding support for CSI 1.x. This PR reintroduces support for CSI 0.x, so that Kubernetes can continue to support older CSI drivers.

/sig storage

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #71228

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. sig/storage Categorizes an issue or PR as relevant to SIG Storage. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 21, 2018
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Nov 21, 2018
@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Nov 21, 2018
@nikopen
Copy link
Contributor

nikopen commented Nov 21, 2018

/milestone v1.13
/priority critical-urgent

@k8s-ci-robot k8s-ci-robot added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Nov 21, 2018
@k8s-ci-robot k8s-ci-robot added this to the v1.13 milestone Nov 21, 2018
@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Nov 21, 2018
@msau42
Copy link
Member

msau42 commented Nov 21, 2018

/assign

@msau42
Copy link
Member

msau42 commented Nov 21, 2018

I suggest also adding e2e tests using the old drivers in 1.13

@saad-ali
Copy link
Member Author

/test pull-kubernetes-integration

klog.V(2).Infof("Got Plugin %s at endpoint %s with versions %v", pluginName, endpoint, versions)

if foundInDeprecatedDir {
return fmt.Errorf("device plugin socket was found in a directory that is no longer supported")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why fail with device plugins?

Copy link
Member Author

@saad-ali saad-ali Nov 21, 2018

Choose a reason for hiding this comment

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

Per #70494 (comment) the plugin directory is changing, and the old one will be deprecated. That PR moved all consumers (CSI and device plugin to the new dir). This PR makes an exception for CSI 0.x but does not change anything else (meaning device plugin and CSI 1.x drivers are still required to use the new dir).

@vishh
Copy link
Contributor

vishh commented Nov 21, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2018
@AishSundar
Copy link
Contributor

/test pull-kubernetes-integration

@saad-ali
Copy link
Member Author

Hostpath CSI tests run as part of pull CI and are green.

I manually ran GCE PD CSI tests, and they are all green:

Ran 24 of 1919 Specs in 4412.483 seconds
SUCCESS! -- 24 Passed | 0 Failed | 0 Pending | 1895 Skipped PASS

Next I'm adding e2e tests using the old drivers in 1.13.

pkg/kubelet/util/pluginwatcher/plugin_watcher.go Outdated Show resolved Hide resolved
pkg/kubelet/util/pluginwatcher/plugin_watcher.go Outdated Show resolved Hide resolved
klog.V(2).Infof("Got Plugin %s at endpoint %s with versions %v", pluginName, endpoint, versions)

if foundInDeprecatedDir {
Copy link
Member

Choose a reason for hiding this comment

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

I'm unfamiliar with this code, but is this completely separate from the storage driver code, and just implements the same PluginHandler interface?

Copy link
Member

@liggitt liggitt Nov 21, 2018

Choose a reason for hiding this comment

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

is the same plugin watcher used to feed events to both CSI and device manager PluginHandler impls? if so, doesn't the plugin dir change in 1.13 affect device plugins as well? what stage are device plugins at, and how many releases do we need to honor them in the v1.12 location?

Copy link
Member Author

Choose a reason for hiding this comment

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

this completely separate from the storage driver code, and just implements the same PluginHandler interface?

Correct.

is the same plugin watcher used to feed events to both CSI and device manager PluginHandler impls?

Yes.

if so, doesn't the plugin dir change in 1.13 affect device plugins as well?

Yes, it does. Per the discussions #70494 (comment) the owners of device plugin code @vishh @jiayingz are ok with the change.

what stage are device plugins at, and how many releases do we need to honor them in the v1.12 location?

@vishh @jiayingz can probably answer this better then I can.

Copy link
Contributor

Choose a reason for hiding this comment

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

Device plugins haven't yet adopted the switch to using plugin watcher yet and we believe the risk very very low to make the switch to the new directory format.
However, given that this PR is supporting old plugin watcher implementation anyways for CSI, it might make sense to support for device plugins too just for the sake of consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok cool. I'll go ahead and remove the failure in this case then.

Copy link
Member

Choose a reason for hiding this comment

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

However, given that this PR is supporting old plugin watcher implementation anyways for CSI, it might make sense to support for device plugins too just for the sake of consistency.

I agree with that, thanks. Make sure the deprecation of the old dir is prominently announced for both device plugins and csi plugins in 1.13 release notes.

pkg/kubelet/util/pluginwatcher/plugin_watcher.go Outdated Show resolved Hide resolved
pkg/volume/csi/csi_client.go Show resolved Hide resolved
@thockin
Copy link
Member

thockin commented Nov 21, 2018

Thanks for finding a way to DTRT

@saad-ali
Copy link
Member Author

/test pull-kubernetes-e2e-gce

@saad-ali
Copy link
Member Author

Add E2E test to verify CSI 0.x. The tests are passing.

Unless there is any other feedback. This PR is ready to go.

@msau42
Copy link
Member

msau42 commented Nov 22, 2018

csi volume plugin and e2es LGTM

Modify kubelet plugin watcher to support older CSI drivers that use an
the old plugins directory for socket registration.
Also modify CSI plugin registration to support multiple versions of CSI
registering with the same name.
Remove csipb dependency from everywhere except the CSI client in
preperation for supporting multiple CSI clients.
Modify the CSI volume plugin to handle CSI version 0.x as well as 1.x
@liggitt
Copy link
Member

liggitt commented Nov 22, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 22, 2018
@liggitt
Copy link
Member

liggitt commented Nov 22, 2018

set release note to NONE, will need to fold in updates in the 1.13 release notes manually, along with a revision of the release note in #71020

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. area/kubelet 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-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSI Upgrade Tests Failing for hostPath and gcePD
8 participants