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
Fix flexvolume volumename issue #80904
Fix flexvolume volumename issue #80904
Conversation
Hi @fredkan. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@van4th @saad-ali Please help to review this issue. |
/ok-to-test |
/kind bug |
/ok-to-test |
one testcase failed, but it seems etcd related reason.
|
/lgtm |
/test pull-kubernetes-integration |
/assign @chakri-nelluri |
please add a release-note to the issue and also we tend to use rebase for updating a topic branch against master (not merge). /lgtm cancel |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
History, we should always use the default volume name, so it is not necessary to call the plugin GetVolumeName interface. Just remove the plugin call related code. |
pkg/volume/flexvolume/plugin.go
Outdated
func (plugin *flexVolumePlugin) GetVolumeName(spec *volume.Spec) (string, error) { | ||
call := plugin.NewDriverCall(getVolumeNameCmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep this code. Some drivers might be assuming this call and use it for periodic health checks etc and they will be broken. Please keep the change to adjust the verbosity of the log. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it,Thanks。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Will let @chakri-nelluri LGTM
@@ -134,8 +133,6 @@ func (plugin *flexVolumePlugin) GetVolumeName(spec *volume.Spec) (string, error) | |||
return "", err | |||
} | |||
|
|||
klog.Warning(logPrefix(plugin), "GetVolumeName is not supported yet. Defaulting to PV or volume name: ", name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not reduce verbosity of this message instead of removing it altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not reduce verbosity of this message instead of removing it altogether?
There is default volumeName log in GetVolumeName:
klog.V(4).Infof(logPrefix((*flexVolumePlugin)(plugin)), "using default GetVolumeName for volume ", spec.Name())
And, the message "GetVolumeName is not supported yet. Defaulting to PV or volume name: " is not suitable here, this log will be printed out when GetVolumeName is supported by plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fredkan GetVolumeName is not supported on the K8S side, not on the plugin side. I would recommend to just adjust the verbosity of the logs, unless there is a big need to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Thanks.
/LGTM |
2290f5c
to
96928b8
Compare
e55524a
to
11d83df
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chakri-nelluri, fredkan, saad-ali, xianlubird 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 |
/retest |
Introduction:
Flexvolume GetVolumeName always calls DefaultPlugin.GetVolumeName() and return the default value.
There are huge amounts of unexpected messages in kubelet logs like:
Issues Analysis:
As the below comments, lots of messages are printed as kubelet log, and real volumename is ignored, default volumename always be the response.
The unnecessary code should be removed.
release-note
What type of PR is this?
/kind bug
/sig storage
/priority important-soon
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: