From a5fade4cb1bb90919a356defa541a4f8ec7d5bb8 Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Fri, 29 Jun 2018 09:24:56 -0500 Subject: [PATCH] UPSTREAM: : gracefully handle empty volume-config file --- .../k8s.io/kubernetes/cmd/kubelet/app/patch_volumequota.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/patch_volumequota.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/patch_volumequota.go index 7f5282ca9e80..f6ee4bc51025 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/patch_volumequota.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/patch_volumequota.go @@ -55,7 +55,11 @@ func PatchVolumePluginsForLocalQuota(rootdir string, plugins *[]volume.VolumePlu // node and volume config files out of the same configmap volumeConfigFilePath := "/etc/origin/node/volume-config.yaml" - if _, err := os.Stat(volumeConfigFilePath); os.IsNotExist(err) { + stat, err := os.Stat(volumeConfigFilePath) + if os.IsNotExist(err) { + return nil + } + if stat.Size() == 0 { return nil }