Bug 1640079

Summary: 4.0: Pods stuck in Terminating status when using configmap mounted using subpath volume
Product: OpenShift Container Platform Reporter: Jan Safranek <jsafrane>
Component: StorageAssignee: Jan Safranek <jsafrane>
Status: CLOSED ERRATA QA Contact: Liang Xia <lxia>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.0CC: aos-bugs, aos-storage-staff, bchilds, jhou, jkaur, jmalde, jsafrane, rekhan
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1623053
: 1696591 (view as bug list) Environment:
Last Closed: 2019-06-04 10:40:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1623053, 1696207    
Bug Blocks: 1640077, 1640078, 1696591    

Comment 4 Liang Xia 2019-02-21 03:22:17 UTC
$ oc adm release info
Name:      4.0.0-0.nightly-2019-02-19-024716
Digest:    sha256:5e98b253790b4bf0aa332dd044695e4f1a76a728c04ba2bd926d5fbc79cf2549
Created:   2019-02-19 10:56:13 +0800 CST
OS/Arch:   linux/amd64
Manifests: 228

Release Metadata:
  Version:  4.0.0-0.nightly-2019-02-19-024716
  Upgrades: <none>

Component Versions:
  Kubernetes 1.12.4

Skip the first step as node is not sshable in 4.0,
1. on a node, make /var/lib/origin a symlink somewhere, e.g. to /var/lib/openshift:
systemctl stop atomic-openshift-node.service
cd /var/lib
mv origin openshift
ln -s /var/lib/openshift origin
systemctl start atomic-openshift-node.service

Steps tried with the verification,
2. create a config map
oc create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2

3. run a pod with this config map *with subpath*
apiVersion: v1
kind: Pod
  name: testpod
    name: test
  restartPolicy: Never
  terminationGracePeriodSeconds: 1
    - image: gcr.io/google_containers/busybox
        - "/bin/sleep"
        - "10000"
      name: busybox
        - name: vol
          mountPath: /mnt/test
          subPath: key1
      - name: vol
          name: my-config

4. check the pod
$ oc create -f pod.yaml 
pod/testpod created

$ oc get pods
testpod   1/1     Running   0          16s

$ oc delete pod testpod
pod "testpod" deleted

$ oc get pods
No resources found.

Comment 7 errata-xmlrpc 2019-06-04 10:40:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.