Change:
BUG REPORT <!-- If this is a BUG REPORT, please: Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: Describe in detail the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --Kubernetes version (use ): root kubectl version Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.3", GitCommit:"", GitTreeState:"clean", BuildDate:"2017-05-10T15:48:59Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.3+coreos.0", GitCommit:"", GitTreeState:"clean", BuildDate:"2017-05-11T18:15:57Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"} Environment: OS (e.g. from /etc/os-release): root cat /etc/os-release NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)" ID=ubuntu IDLIKE=debian PRETTYNAME="Ubuntu 16.04.2 LTS" VERSIONID="16.04" HOMEURL="" SUPPORTURL="" BUGREPORTURL="" VERSIONCODENAME=xenial UBUNTUCODENAME=xenial Kernel (e.g. ): root uname -a Linux ginger 4.4.0-78-generic -Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x8664 x8664 x8664 GNU/Linux What happened: Updated latest Ubuntu packages from to Kubelet v1.6.3. Updated to Hyperkube v1.6.3. Applied deployment from that also creates the following ConfigMaps: apiVersion: v1 kind: ConfigMap metadata: name: salt-syndic-master-config data: master: | autoaccept: True fileserverbackend: git gitfsremotes: extpillar: git: master syndicmaster: gitfssaltenv: kube: ref: master minionid: | playground.cluster.awesome- The pods of deployment are not able to mount the data from the configmaps as file using the following volumeMounts: volumeMounts: mountPath: /etc/salt/master name: salt-syndic-master-config subPath: master Instead I get the following errors from : May 17 13:56:44 ginger kubelet[]: E0517 13:56:44. ] failed to mkdir:/var/lib/kubelet/pods/-3ae8-11e7-ade6- May 17 13:56:44 ginger kubelet[]: E0517 13:56:44. ] container start failed: mkdir /var/lib/kubelet/pods/-3ae8-11e7-ade6- not a directory: Generate Container Config Failed May 17 13:56:44 ginger kubelet[]: E0517 13:56:44. ] Error syncing pod -3ae8-11e7-ade6- ("salt-syndic--kfj8w_awesome(-3ae8-11e7-ade6-)"), skipping: failed to "StartContainer" for "salt-syndic" with mkdir /var/lib/kubelet/pods/-3ae8-11e7-ade6- not a directory: "Generate Container Config Failed" Looking into shows that is a symlink to the which contains the correct data. Any help or tipps for further investigations are appreciated.
Duplicate of ...

Discussion:
"k8s.io/kubernetes/pkg/kubelet/status" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" <ins> "k8s.io/kubernetes/pkg/util" </ins> "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util/volumehelper" "k8s.io/kubernetes/third_party/forked/golang/expansion"

hostPath = filepath.Join(hostPath, mount.SubPath) <del> // Create the sub path now because if it's auto-created later when referenced, it may have an // incorrect ownership and mode. For example, the sub path directory must have at least g+rwx // when the pod specifies an fsGroup, and if the directory is not created here, Docker will // later auto-create it with the incorrect mode 0750 if err := os.MkdirAll(hostPath, perm); err != nil { glog.Errorf("failed to mkdir:%s", hostPath) return nil, err } </del> <ins> if subPathExists, err := util.FileExists(hostPath); err != nil { glog.Errorf("Could not determine if subPath %s exists; will not attempt to change its permissions", hostPath) } else if !subPathExists { // Create the sub path now because if it's auto-created later when referenced, it may have an // incorrect ownership and mode. For example, the sub path directory must have at least g+rwx // when the pod specifies an fsGroup, and if the directory is not created here, Docker will // later auto-create it with the incorrect mode 0750 if err := os.MkdirAll(hostPath, perm); err != nil { glog.Errorf("failed to mkdir:%s", hostPath) return nil, err } </ins> <del> // chmod the sub path because umask may have prevented us from making the sub path with the same // permissions as the mounter path if err := os.Chmod(hostPath, perm); err != nil { return nil, err </del> <ins> // chmod the sub path because umask may have prevented us from making the sub path with the same // permissions as the mounter path if err := os.Chmod(hostPath, perm); err != nil { return nil, err } </ins> } }