Bug 1640079 - 4.0: Pods stuck in Terminating status when using configmap mounted using subpath volume
Summary: 4.0: Pods stuck in Terminating status when using configmap mounted using subp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.1.0
Assignee: Jan Safranek
QA Contact: Liang Xia
URL:
Whiteboard:
Depends On: 1623053 1696207
Blocks: 1640077 1640078 1696591
TreeView+ depends on / blocked
 
Reported: 2018-10-17 10:48 UTC by Jan Safranek
Modified: 2019-06-04 10:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1623053
: 1696591 (view as bug list)
Environment:
Last Closed: 2019-06-04 10:40:48 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 None None None 2019-06-04 10:40:56 UTC

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
metadata:
  name: testpod
  labels:
    name: test
spec:
  restartPolicy: Never
  terminationGracePeriodSeconds: 1
  containers:
    - image: gcr.io/google_containers/busybox
      command:
        - "/bin/sleep"
        - "10000"
      name: busybox
      volumeMounts:
        - name: vol
          mountPath: /mnt/test
          subPath: key1
  volumes:
      - name: vol
        configMap:
          name: my-config

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

$ oc get pods
NAME      READY   STATUS    RESTARTS   AGE
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.

https://access.redhat.com/errata/RHBA-2019:0758


Note You need to log in before you can comment on or make changes to this bug.