Bug 1322006 - [RFE] Support to prevent from using same pvc by multiple pods accidentally
Summary: [RFE] Support to prevent from using same pvc by multiple pods accidentally
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Bradley Childs
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-29 14:35 UTC by Kenjiro Nakayama
Modified: 2021-08-30 13:48 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-15 22:55:32 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2214541 0 None None None 2016-03-31 05:19:28 UTC

Description Kenjiro Nakayama 2016-03-29 14:35:04 UTC
1. Proposed title of this feature request

[RFE] Support to prevent from using same pvc by multiple pods accidentally

3. What is the nature and description of the request?

- There are no way to restrict to be used pvc which is "in use" by other pods in same namespace(project)

4. Why does the customer need this? (List the business requirements here)
5. How would the customer like to achieve this? (List the functional requirements here)

Steps to Reproduce:
step-1. Create pvc

  $ oc get pvc
  NAME      LABELS    STATUS    VOLUME    CAPACITY   ACCESSMODES   AGE
  claim1    <none>    Bound     pv0001    1Gi        RWO           13s

step-2. Create pod(nfs-test) and use above pvc(claim1).

  $ oc describe pod nfs-test |grep -1 claim1
      Type:	PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
      ClaimName:	claim1
      ReadOnly:	false

step-3. Create another pod(nfs-test2) and use same pvc(claim1).

  $ oc describe pod nfs-test2 |grep -1 claim1
      Type:	PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
      ClaimName:	claim1
      ReadOnly:	false

- It is possible to use the pvc "in-use" by other pods.
- We want some options to prevent from using in-use pvc by other pods.


7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

- No, as far as I searched.

Comment 2 Kenjiro Nakayama 2016-03-29 15:04:50 UTC
I think we should some way to see if pvc has already been in-use or not.

Comment 5 Steve Watt 2016-07-19 01:18:01 UTC
I think this issue is that you have specified a Shared File System as READWRITEONCE(RWO). That is really a READWRITEMANY accessmode. ReadWriteOnce devices (Block Devices - such as ISCSI, AWS EBS, or Ceph RBD) have their own locking mechanisms to prevent simultaneous access to the storage resource from more than one host.

NFS is designed to be used by more than one host. I think you can get around this issue by verifying that the AccessMode of all of your PVs are correctly specified.


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