Skip to content

CSI Migration phase 2: disable probing of in-tree plugins#83098

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
ddebroy:disable-intree
Nov 15, 2019
Merged

CSI Migration phase 2: disable probing of in-tree plugins#83098
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
ddebroy:disable-intree

Conversation

@ddebroy
Copy link
Copy Markdown
Contributor

@ddebroy ddebroy commented Sep 25, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that 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:
This PR introduces a CSIMigrationInTreeOff feature flag. When the feature flag is set (along with CSIMigration and plugin-specific feature flags), the in-tree storage plugins migrated to CSI are no longer probed/registered by the different storage controllers and are effectively disabled.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Allowing the storage controllers to function with unregistered plugins required a refactoring of the CSI migration framework especially for the Attach/Detach controller as detailed in kubernetes/community#4093

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 25, 2019
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 25, 2019
@davidz627
Copy link
Copy Markdown
Contributor

/assign
/cc @misterikkit

@ddebroy
Copy link
Copy Markdown
Contributor Author

ddebroy commented Sep 25, 2019

This is not fully ready yet - pending some design discussions.

@jennybuckley
Copy link
Copy Markdown

/remove-sig api-machinery

@k8s-ci-robot k8s-ci-robot removed the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Sep 26, 2019
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@jennybuckley: Those labels are not set on the issue: sig/api-machinery

Details

In response to this:

/remove-sig api-machinery

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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@jennybuckley: Those labels are not set on the issue: sig/api-machinery

Details

In response to this:

/remove-sig api-machinery

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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@jennybuckley: Those labels are not set on the issue: sig/api-machinery

Details

In response to this:

/remove-sig api-machinery

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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@jennybuckley: Those labels are not set on the issue: sig/api-machinery

Details

In response to this:

/remove-sig api-machinery

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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@jennybuckley: Those labels are not set on the issue: sig/api-machinery

Details

In response to this:

/remove-sig api-machinery

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.

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 1, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 14, 2019
Copy link
Copy Markdown
Member

@liggitt liggitt Nov 14, 2019

Choose a reason for hiding this comment

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

granted the "turn on all alpha features" CI job is an unusual case, but I'm reconsidering making this a failure given the gymnastics https://github.com/kubernetes/test-infra/pull/15286/files has to go through. Maybe just warning in these cases would be sufficient, to tell someone they've turned on a particular feature or feature complete flag that doesn't make a lot of sense

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

start by calling if !IsMigrationEnabledForPlugin(plugin) { return false }?

@ddebroy
Copy link
Copy Markdown
Contributor Author

ddebroy commented Nov 14, 2019

/retest

@ddebroy
Copy link
Copy Markdown
Contributor Author

ddebroy commented Nov 14, 2019

/test pull-kubernetes-integration

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nothing in this method uses pm... this could be a function instead of a method, then be used by kube-controller-manager and kubelet so they don't have to maintain their own plugin -> feature name mapping

Copy link
Copy Markdown
Contributor Author

@ddebroy ddebroy Nov 14, 2019

Choose a reason for hiding this comment

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

@liggitt I completely agree that in the context of the above, IsMigrationCompleteForPlugin/IsMigrationEnabledForPlugin could be a function instead of method. However, the reason I did not make it a function is: enabling the unit testing of modules using these methods (such as the pv_controller) and align with the overall pattern introduced in #82683.

So having these as methods allows an easy way for unit tests for the controller using these to create an interface implementing IsMigrationCompleteForPlugin/IsMigrationEnabledForPlugin and use fake plugins (for example for pv_controller).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

having the feature mapping in multiple places is going to be hard to maintain if more things are added to migration (especially if implementations fall back to reporting false if an unknown plugin is asked about). I still think these should collapse to a single authoritative spot in the code, but that can be a follow up. David opened #85313 to track that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Totally agree about single spot in the code for the mappings rather than multiple places.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

see comment in pkg/volume/csimigration/plugin_manager.go about how to make the helper function useful so we don't have to maintain the pluginName->feature mappings in multiple places

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these could use the helper methods as well and not need to maintain feature mappings

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and these could use the helper methods

@liggitt
Copy link
Copy Markdown
Member

liggitt commented Nov 14, 2019

/approve
for cmd/kube-controller-manager changes

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidz627, ddebroy, liggitt, Random-Liu, saad-ali

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 14, 2019
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think just an unnecessary change. But maybe it's a gofmt thing.

@davidz627
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 14, 2019
@davidz627
Copy link
Copy Markdown
Contributor

/retest

Signed-off-by: Deep Debroy <ddebroy@docker.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 15, 2019
@davidz627
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 15, 2019
@davidz627
Copy link
Copy Markdown
Contributor

/retest

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

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

Test name Commit Details Rerun command
pull-kubernetes-cross 0f2177b26fd855953aeff14c9aa8283512cf669b link /test pull-kubernetes-cross
pull-kubernetes-conformance-image-test 0f2177b26fd855953aeff14c9aa8283512cf669b link /test pull-kubernetes-conformance-image-test
pull-kubernetes-local-e2e 0f2177b26fd855953aeff14c9aa8283512cf669b link /test pull-kubernetes-local-e2e
pull-kubernetes-e2e-gce-alpha-features 129f153 link /test pull-kubernetes-e2e-gce-alpha-features

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.

Details

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.

@davidz627
Copy link
Copy Markdown
Contributor

pull-kubernetes-e2e-gce-alpha-features failing because of newly added (and failing) snapshot data source tests for PD. Reverting the PR that adds those tests here: #85322

@k8s-ci-robot k8s-ci-robot merged commit 372ebd2 into kubernetes:master Nov 15, 2019
//
// Kubelet does not currently need to configure volume plugins.
// If/when it does, see kube-controller-manager/app/plugins.go for example of using volume.VolumeConfig
allPlugins = appendLegacyProviderVolumes(allPlugins)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we didn't update the providerless build to match :(

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/cloudprovider area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. 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.