Bug 1462275 - PVs are dynamically provisioned with incorrect/inaccurate AccessModes
Summary: PVs are dynamically provisioned with incorrect/inaccurate AccessModes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.5.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Matthew Wong
QA Contact: Chao Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-16 15:07 UTC by Matthew Wong
Modified: 2017-08-16 19:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: the AccessModes field of a PVC is ignored when a PV is dynamically provisioned for it Consequence: users receive a PV with inaccurate AccessModes, e.g. a RWM PV that can technically only be used RWO Fix: fail to dynamically provision a PV when the volume plugin cannot support the requested AccessModes Result: user never receives a PV with inaccurate AccessModes
Clone Of:
Environment:
Last Closed: 2017-08-10 05:28:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description Matthew Wong 2017-06-16 15:07:46 UTC
Description of problem: PVs are dynamically provisioned with incorrect/inaccurate AccessModes

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

How reproducible: Always

Steps to Reproduce:
1. Create a PVC asking for RWM AccessModes from a provisioner that can only do RWO (e.g. AWS EBS)
2. PV is created with RWM AccessModes
3. PV can't be used as RWM because it's an AWS EBS disk.

Actual results:
PV is created with incorrect AccessModes

Expected results:
PV is not created with incorrect AccessModes, provisioning should fail

Comment 1 Matthew Wong 2017-06-16 15:08:34 UTC
https://github.com/openshift/origin/pull/14705

Comment 3 Chao Yang 2017-06-29 06:30:54 UTC
This is passed on 
oc v3.6.126.1
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-4-64.ec2.internal:8443
openshift v3.6.126.1
kubernetes v1.6.1+5115d708d7


[root@ip-172-18-4-64 ~]# oc get pvc
NAME      STATUS    VOLUME    CAPACITY   ACCESSMODES   STORAGECLASS   AGE
ebsc      Pending                                      gp2            3s
[root@ip-172-18-4-64 ~]# oc describe pvc ebsc
Name:		ebsc
Namespace:	default
StorageClass:	gp2
Status:		Pending
Volume:		
Labels:		<none>
Annotations:	volume.beta.kubernetes.io/storage-provisioner=kubernetes.io/aws-ebs
Capacity:	
Access Modes:	
Events:
  FirstSeen	LastSeen	Count	From				SubObjectPath	Type		Reason			Message
  ---------	--------	-----	----				-------------	--------	------			-------
  11s		7s		2	persistentvolume-controller			Warning		ProvisioningFailed	Failed to provision volume with StorageClass "gp2": invalid AccessModes [ReadWriteMany]: only AccessModes [ReadWriteOnce] are supported

[root@ip-172-18-4-64 ~]# oc get pvc
NAME      STATUS    VOLUME    CAPACITY   ACCESSMODES   STORAGECLASS   AGE
ebsc      Pending                                      gp2            6m
ebsc1     Pending                                      gp2            4s
[root@ip-172-18-4-64 ~]# oc describe pvc ebsc1
Name:		ebsc1
Namespace:	default
StorageClass:	gp2
Status:		Pending
Volume:		
Labels:		<none>
Annotations:	volume.beta.kubernetes.io/storage-provisioner=kubernetes.io/aws-ebs
Capacity:	
Access Modes:	
Events:
  FirstSeen	LastSeen	Count	From				SubObjectPath	Type		Reason			Message
  ---------	--------	-----	----				-------------	--------	------			-------
  9s		9s		1	persistentvolume-controller			Warning		ProvisioningFailed	Failed to provision volume with StorageClass "gp2": invalid AccessModes [ReadOnlyMany]: only AccessModes [ReadWriteOnce] are supported

Comment 5 errata-xmlrpc 2017-08-10 05:28:09 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/RHEA-2017:1716


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