Unverified Commit e99ec245 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #60440 from andrewsykim/andrewsykim/fix-char-device-mount-bug

Automatic merge from submit-queue (batch tested with PRs 60433, 59982, 59128, 60243, 60440). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. kubelet: fix bug where character device is not recognized **What this PR does / why we need it**: Fixes a bug where character devices are not recognized by the kubelet because we return `FileTypeBlockDev` instead of `FileTypeCharDev`. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Related issue: https://github.com/kubernetes/kubernetes/issues/5607 **Special notes for your reviewer**: Kubelet event for bug: https://github.com/kubernetes/kubernetes/issues/5607#issuecomment-366366340 ``` Warning FailedMount MountVolume.SetUp failed for volume "dev-fuse" : hostPath type check failed: /dev/fuse is not a character device ``` Commit where bug was introduced: https://github.com/kubernetes/kubernetes/commit/57ead4898b850037c9544e034a5e5cc8420990ad **Release note**: ```release-note Fixes a bug where character devices are not recongized by the kubelet ```
parents a2ddca76 d856a97d
......@@ -432,7 +432,7 @@ func (mounter *Mounter) GetFileType(pathname string) (FileType, error) {
case syscall.S_IFBLK:
return FileTypeBlockDev, nil
case syscall.S_IFCHR:
return FileTypeBlockDev, nil
return FileTypeCharDev, nil
case syscall.S_IFDIR:
return FileTypeDirectory, nil
case syscall.S_IFREG:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment