Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1556796 - [3.6] Mounting file in a subpath fails if file was created in initContainer
[3.6] Mounting file in a subpath fails if file was created in initContainer
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage (Show other bugs)
3.6.1
Unspecified Unspecified
unspecified Severity high
: ---
: 3.6.z
Assigned To: Jan Safranek
Liang Xia
:
Depends On: 1555910
Blocks: 1555911
  Show dependency treegraph
 
Reported: 2018-03-15 05:32 EDT by Jan Safranek
Modified: 2018-04-30 00:01 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1555910
Environment:
Last Closed: 2018-04-30 00:00:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1233 None None None 2018-04-30 00:01 EDT

  None (edit)
Description Jan Safranek 2018-03-15 05:32:05 EDT
+++ This bug was initially created as a clone of Bug #1555910 +++

Description of problem:

Originally reported bug : https://github.com/kubernetes/kubernetes/issues/61178

By creating a deployment where an init container creates a file in an emptydir and then the container tries to mount this file as a subpath will reproduce it.

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: subpath
  namespace: kube-system
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: subpath
    spec:
      initContainers:
        - name: init
          image: busybox
          command:
            - touch
            - /mount/test
          volumeMounts:
            - name: mount
              mountPath: /mount
      containers:
      - name: subtest
        image: busybox
        command:
          - ls
          - -l
          - /mount/test
        volumeMounts:
          - name: mount
            mountPath: /mount/test
            subPath: test
      volumes:
      - name: mount
        emptyDir: {}


--- Additional comment from Hemant Kumar on 2018-03-14 16:05:08 EDT ---

https://github.com/openshift/ose/pull/1135
Comment 1 Jan Safranek 2018-03-15 05:35:41 EDT
OSE PR: https://github.com/openshift/ose/pull/1114
Comment 7 Liang Xia 2018-04-20 03:08:52 EDT
# oc version
oc v3.6.173.0.113
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://qe-lxia-36-master-nfs-1:8443
openshift v3.6.173.0.113
kubernetes v1.6.1+5115d708d7


# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)


# uname -a
Linux qe-lxia-36-master-nfs-1 3.10.0-514.26.1.el7.x86_64 #1 SMP Tue Jun 20
01:16:02 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux


Created a deployment as in #comment 0, did not see the errors.

$ oc logs subpath-3671045800-wr5gg
-rw-r--r--    1 10002000 10002000         0 Apr 20 07:01 /mount/test
Comment 12 errata-xmlrpc 2018-04-30 00:00:18 EDT
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/RHSA-2018:1233

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