-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Added missing error check that could cause kubelet to crash #60962
Added missing error check that could cause kubelet to crash #60962
Conversation
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. |
/ok-to-test |
/sig storage |
/milestone v1.10 (per @saad-ali 's comment in issue) |
@technicianted hmm, you have signed the CLA already? |
Hi, GitHub doesn't seem to associate the commit with your account, have you verified the email address used in the commit with GitHub? |
ce01ff7
to
659d9df
Compare
@BenTheElder seems like it. Not sure how to fix the commit with the correct email. |
FWIW GitHub has an article here: |
@technicianted it's easy to switch the email address for example see https://gist.github.com/trey/9588090 |
pkg/volume/flexvolume/probe.go
Outdated
if err := prober.watcher.AddWatch(path); err != nil { | ||
glog.Errorf("Error recursively adding watch: %v", err) | ||
if err == nil { | ||
if info.IsDir() { |
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.
What about err == nil && info.IsDir()
? Reduces nesting
@dims I signed the CLA. I made sure my commits have the correct GitHub verified email. |
/test all |
@technicianted please reach out to the helpdesk - #27796 (comment) here's what i see in the PR:
|
/retest |
/lgtm |
[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process @saad-ali @technicianted @verult Pull Request Labels
|
Once this is merged, please make sure to cherry pick it back to relevant prior release branches (1.9, etc.) |
/test all [submit-queue is verifying that this PR is safe to merge] |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: saad-ali, technicianted, verult 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 |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
@technicianted please remember to cherry pick this PR back to relevant branches (1.9, etc.) |
/cherrypick-candidate |
@saad-ali please help with cherrypicking |
@technicianted can you please add a user facing release note in the body of the issue under "Release note:" section above? (currently has NONE there). the branch managers will ask for details. |
@dims added |
@technicianted thanks. i lined up the cherry picks for you. for next time, cherry pick process is here - https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md |
What this PR does / why we need it:
Adds missing error check. An error can happen due to a race condition when watched files change, or become inaccessible. This can happen if a file was added to the driver directory then quickly removed, in which case the callback will be called with non-nil
err
and nilinfo
, which is not checked, causing kubelet to crash.Which issue(s) this PR fixes:
Fixes #60861
Special notes for your reviewer:
Release note: