Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1535277 - PV and PVC could be bound with different accessMode
PV and PVC could be bound with different accessMode
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage (Show other bugs)
3.9.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.9.0
Assigned To: Jan Safranek
Qin Ping
:
Depends On:
Blocks: 1563070
  Show dependency treegraph
 
Reported: 2018-01-16 21:21 EST by Qin Ping
Modified: 2018-04-03 02:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
: 1563070 (view as bug list)
Environment:
Last Closed: 2018-03-28 10:19:53 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 RHBA-2018:0489 None None None 2018-03-28 10:20 EDT

  None (edit)
Description Qin Ping 2018-01-16 21:21:06 EST
Description of problem:
Block volumeMode PVC prebound a Block volumeMode PV, but with different accessMode bound successfully.

Version-Release number of selected component (if applicable):
oc v3.9.0-0.20.0
openshift v3.9.0-0.20.0
kubernetes v1.9.1+a0ce1bc657


How reproducible:
Always

Steps to Reproduce:
1. Create a Block volumeMode PV with accessMode ReadWriteOnce
2. Create a Block volumeMode PVC prebound the PV created above with accessMode ReadWriteMany
3. Check the PVC and PV

Actual results:
PVC is bound to PV

Expected results:
PVC is not bound to PV

Additional info:
When PVC is not prebound to PV, PVC will not be bound to PV.

# cat pv-block.yaml 
apiVersion: v1
kind: PersistentVolume
metadata:
  name: block-pv
spec:
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  volumeMode: Block
  persistentVolumeReclaimPolicy: Retain
  fc:
    targetWWNs: ["500a0981891b8dc5", "500a0981991b8dc5"]
    lun: 2
    readOnly: false

# cat pvc-block.json 
{
    "apiVersion": "v1",
    "kind": "PersistentVolumeClaim",
    "metadata": {
        "name": "claim-block"
    },
    "spec": {
        "accessModes": [ "ReadWriteMany" ],
        "volumeMode" : "Block",
        "volumeName" : "block-pv",
        "resources": {
            "requests": {
                "storage": "5Gi"
            }
        }
    }
}

# oc get pvc
NAME          STATUS    VOLUME     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
claim-block   Bound     block-pv   5Gi        RWO                           1m

# oc get pvc -o yaml
apiVersion: v1
items:
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    annotations:
      pv.kubernetes.io/bind-completed: "yes"
    creationTimestamp: 2018-01-17T01:55:48Z
    name: claim-block
    namespace: piqin
    resourceVersion: "63560"
    selfLink: /api/v1/namespaces/piqin/persistentvolumeclaims/claim-block
    uid: 89bafef7-fb29-11e7-8435-9457a56bf834
  spec:
    accessModes:
    - ReadWriteMany
    resources:
      requests:
        storage: 5Gi
    volumeMode: Block
    volumeName: block-pv
  status:
    accessModes:
    - ReadWriteOnce
    capacity:
      storage: 5Gi
    phase: Bound
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
Comment 2 Jan Safranek 2018-01-19 10:28:22 EST
The behavior is the same as with normal volumes, it's not block specific.
Is it really a regression?

Anyway, it won't catch this sprint, but it should be fixed.
Comment 3 Qin Ping 2018-01-22 00:10:02 EST
Reproduce this bug on version OCP v3.7.24, so remove the regression keyword.
Comment 4 Jan Safranek 2018-01-24 03:52:21 EST
Upstream PR: https://github.com/kubernetes/kubernetes/pull/58739
Comment 5 Jan Safranek 2018-01-25 05:24:03 EST
Origin 3.9 PR: https://github.com/openshift/origin/pull/18284
Comment 6 Jan Safranek 2018-02-01 06:12:33 EST
The PR was merged yesterday.
Comment 8 Qin Ping 2018-02-05 00:12:10 EST
Verified in OCP v3.9.0-0.36.0
Comment 11 errata-xmlrpc 2018-03-28 10:19:53 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/RHBA-2018:0489

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