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

Simplify the unregistration of csiplugin #89934

Merged
merged 1 commit into from Apr 13, 2020

Conversation

tedyu
Copy link
Contributor

@tedyu tedyu commented Apr 7, 2020

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
This PR simplifies the unregistration of csiplugin by dropping SocketPluginHandlers.

Which issue(s) this PR fixes:
Addresses concerns raised in #88006 (comment)
Fixes #87282

NONE

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. 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 Apr 7, 2020
@tedyu
Copy link
Contributor Author

tedyu commented Apr 7, 2020

/assign @saad-ali

@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 7, 2020
@tedyu tedyu changed the title Simplify unregistration of csiplugin Simplify the unregistration of csiplugin Apr 7, 2020
@tedyu
Copy link
Contributor Author

tedyu commented Apr 7, 2020

/priority backlog

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 7, 2020
@k8s-ci-robot k8s-ci-robot added 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 Apr 8, 2020
@tedyu tedyu force-pushed the unregister-plugin branch 2 times, most recently from d0a8dbd to b54e7d9 Compare April 10, 2020 23:20
@saad-ali
Copy link
Member

Thanks @tedyu
/lgtm
/approve

/test pull-kubernetes-conformance-kind-ga-only-parallel
/test pull-kubernetes-e2e-kind-ipv6

/hold
To let @taragu review

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Apr 11, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Apr 11, 2020
@tedyu
Copy link
Contributor Author

tedyu commented Apr 11, 2020

/retest

Copy link
Contributor

@taragu taragu left a comment

Choose a reason for hiding this comment

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

Looks good overall! Just one suggestion for consistency. The PluginInfo objects in actual_state_of_world_test.go need to be updated with the new fields to be added.

@tedyu
Copy link
Contributor Author

tedyu commented Apr 13, 2020

@taragu
In operationGenerator#GenerateRegisterPluginFunc, handler is retrieved from pluginHandlers.
I looked at the test code where there is no pluginHandlers.

Can you be a bit specific on how the PluginInfo object should be populated in the test ?

@taragu
Copy link
Contributor

taragu commented Apr 13, 2020

@tedyu sure, here for example: https://github.com/kubernetes/kubernetes/blob/b54e7d92652797d8485596440960490d66c505be/pkg/kubelet/pluginmanager/cache/actual_state_of_world_test.go#L30 we can change it to the following just for completion purposes

pluginInfo := PluginInfo{
		SocketPath: "/var/lib/kubelet/device-plugins/test-plugin.sock",
		Timestamp:  time.Now(),
		Handler: nil,
		Name: "test",
	}

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 13, 2020
@tedyu
Copy link
Contributor Author

tedyu commented Apr 13, 2020

@taragu
Your comment has been addressed.

@taragu
Copy link
Contributor

taragu commented Apr 13, 2020

/lgtm
Any idea why the tests aren't running?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 13, 2020
@tedyu
Copy link
Contributor Author

tedyu commented Apr 13, 2020

/hold cancel

@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 Apr 13, 2020
@k8s-ci-robot k8s-ci-robot merged commit 342d328 into kubernetes:master Apr 13, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Apr 13, 2020
k8s-ci-robot added a commit that referenced this pull request Apr 28, 2020
…89934-upstream-release-1.18

Automated cherry pick of #88006: Unregister csiplugin even if socket path is gone #89934: Simplify unregistration of csiplugin
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. 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. 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.

kubelet can't unregister csiplugin after csiplugin pod is deleted from node
4 participants