Bug 1264814 - Users have write access when the nfs volume accessmode is only ROX
Summary: Users have write access when the nfs volume accessmode is only ROX
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Storage
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Mark Turansky
QA Contact: Liang Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-21 09:35 UTC by Chao Yang
Modified: 2015-10-28 07:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-27 15:37:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chao Yang 2015-09-21 09:35:07 UTC
Description of problem:
Users have write access when the nfs volume accessmode is only ROX

Version-Release number of selected component (if applicable):
oc v1.0.6-86-gfc46484
kubernetes v1.1.0-alpha.0-1605-g44c91b1

How reproducible:

always
Steps to Reproduce:
1. create pv with accessmode is ROX
oc get pv
NAME      LABELS    CAPACITY   ACCESSMODES   STATUS    CLAIM               REASON    AGE
nfs1      <none>    10Gi       ROX           Bound     default/myclaim-1             3d

2. create pvc with accessmode is ROX
oc get pvc
NAME        LABELS    STATUS    VOLUME    CAPACITY   ACCESSMODES   AGE
myclaim-1   <none>    Bound     nfs1      10Gi       ROX           3d

3.write some data on the mounted dir
oc exec nfs -ti -- bash
[root@nfs /]# cd /mnt
[root@nfs mnt]# ls
nfs
[root@nfs mnt]# cd nfs/

[root@nfs nfs]# ls
hi  next  test    world
[root@nfs nfs]# touch yes
[root@nfs nfs]# ls
hi  next  test    world  yes

Actual results:
users can wirte to the mounted dir even if the volume access mode is only ROX

Expected results:
users should not write to the mounted dir when the volume access mode is ROX

Additional info:

Comment 1 Mark Turansky 2015-09-23 15:09:21 UTC
this is not a bug.

A volume has all the capabilities of the underlying storage provider.  NFS allows many clients to read/write.

Comment 2 Chao Yang 2015-09-24 07:15:59 UTC
If pvc only request ROX, also can write to the volume? no restriction for the PVC?

Comment 3 Mark Turansky 2015-09-24 14:35:14 UTC
That is correct.

The volume *supports* ROX but does not *enforce* ROX if that's what the PVC requests.


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