Bug 1277608

Summary: NFS Recycler Fails in containerized Kubernetes
Product: OpenShift Container Platform Reporter: Bradley Childs <bchilds>
Component: StorageAssignee: Mark Turansky <mturansk>
Status: CLOSED ERRATA QA Contact: Liang Xia <lxia>
Severity: medium Docs Contact:
Priority: urgent    
Version: 3.1.0CC: aos-bugs, bleanhar, dmcphers, pruan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1281726 (view as bug list) Environment:
Last Closed: 2016-01-26 19:16:46 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1281726    

Description Bradley Childs 2015-11-03 16:20:10 UTC
Description of problem:

When controller manager looks for a recycler for a NFS volume, it calls nfsPlugin.CanSupport(), which checks for presence of /sbin/mount.nfs or /sbin/mount.nfs4. Since controller manager is containerized, it does not see any such executables and returns false.

This is related to issue #14244, volume plugins are used both by kubelet, where checking for mount.nfs makes sense, and by controller manager, which does not need mount.nfs at all.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Bradley Childs 2015-11-03 16:20:56 UTC
Upstream issue: https://github.com/kubernetes/kubernetes/issues/16727

Comment 3 Mark Turansky 2015-11-04 15:16:58 UTC
Fix has been merged into Origin:  https://github.com/openshift/origin/pull/5672

Comment 4 Liang Xia 2015-11-07 04:27:19 UTC
Checked on build,
# openshift version
openshift v1.0.7-291-g9bd5fb9
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2

with following steps,
1.Pull the latest images
# docker pull openshift/origin
# docker pull openshift/origin-pod
# docker pull openshift/origin-deployer

2.Check the images
# docker images | grep openshift/origin
openshift/origin-release   latest  579330f53578  3 hours ago     677.9 MB
openshift/origin-deployer  latest  07228235dfce  12 hours ago    449.4 MB
openshift/origin           latest  2b0d7910737d  12 hours ago    449.4 MB
openshift/origin-pod       latest  0a6edb1f57e4  12 hours ago    1.105 MB
openshift/origin-deployer  v1.0.7  259546496c0b  8 days ago      447.5 MB
openshift/origin-pod       v1.0.7  efa9c0d84260  6 weeks ago     1.105 MB

3.Launch the server in a Docker container
# docker run -d --name "origin" \
  --privileged --pid=host --net=host \
  -v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys \
  -v /var/lib/docker:/var/lib/docker:rw \
  -v /var/lib/openshift/openshift.local.volumes:/var/lib/openshift/openshift.local.volumes \
  openshift/origin start

4.After the container is started, you can open a console inside the container
# docker exec -it origin bash

5.Create a PV and PVC for NFS. In the Persistent Volume, the recycle policy is 'Recycle'
# oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/persistent-volumes/nfs/nfs-recycle-rwo.json
# oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/persistent-volumes/nfs/claim-rwo.json
# oc get pv
# oc get pvc

6.Create a pod that has the Persistent Volume Claim
# oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/persistent-volumes/nfs/pod.json

7.Verify user can read/write in the mounted path
# oc exec nfs -it -- bash "ls -lR /mnt/nfs/ ; touch /mnt/nfs/file{1..10}"

8.Verify the files created in step 7 exist on NFS server

9.Delete pod and PVC
# oc delete pods nfs
# oc delete pvc nfsc

10.Verify PV's status change, Bound->Released->Available

11.Verify the files created in step 7 are deleted on NFS server

12.Create another PVC, verify it can bound to this PV

13.Create another pod, verify the files created in step 7 does not occur in the mounted path, and user can read/write in the mounted path.




So in short, the NFS server can be used(mount/read/write/umount/recycle) by pods in origin which is running in a docker Container.

Move bug to verified.

Comment 6 errata-xmlrpc 2016-01-26 19:16:46 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/RHSA-2016:0070