Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1532149 - Expand PVC failed message need to be more clear
Expand PVC failed message need to be more clear
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage (Show other bugs)
3.9.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.9.0
Assigned To: Hemant Kumar
Qin Ping
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-08 02:36 EST by Qin Ping
Modified: 2018-03-28 10:17 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-28 10:17:25 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:17 EDT

  None (edit)
Description Qin Ping 2018-01-08 02:36:40 EST
Description of problem:
When expanding a PVC failed, it's conditions and event message need to be more clear.

Version-Release number of selected component (if applicable):
oc v3.9.0-0.15.0
openshift v3.9.0-0.15.0
kubernetes v1.9.0-beta1

How reproducible:
Always

Steps to Reproduce:
1. Enable feature gates: ExpandPersistentVolumes and admission controller: PersistentVolumeClaimResize
2. Create a PV and static provisioning PVC.
3. Expand PVC size from 10G to 20G
4. Using oc get pvc -o yaml and oc describe pvc to check PVC expand result.

Actual results:
oc get pvc -o yaml output:
 conditions:
 - lastProbeTime: null
   lastTransitionTime: 2018-01-08T06:19:10Z
   status: "True"
   type: Resizing

oc describe pvc output:
 Events:
  Type     Reason              Age                From           Message
  ----     ------              ----               ----           -------
  Warning  VolumeResizeFailed  2m (x10 over 10m)  volume_expand  Volume has no storage class


Expected results:
oc get pvc -o yaml output:
 conditions:
 - lastProbeTime: null
   lastTransitionTime: 2018-01-08T06:19:10Z
   status: "True"
   type: ResizeFailed

oc describe pvc output:
 Events:
  Type     Reason              Age                From           Message
  ----     ------              ----               ----           -------
  Warning  VolumeResizeFailed  2m (x10 over 10m)  volume_expand  Only dynamically provisioned volumes will be allowed to be expanded.



Additional info:
# cat pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pvc-static
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 10G
  glusterfs:
    endpoints: glusterfs-cluster
    path: testvol
  persistentVolumeReclaimPolicy: Delete

# cat pvc.json
{
    "apiVersion": "v1",
    "kind": "PersistentVolumeClaim",
    "metadata": {
        "name": "glusterc"
    },
    "spec": {
        "accessModes": [ "ReadWriteOnce" ],
        "resources": {
            "requests": {
                "storage": "5Gi"
            }
        }
    }
}

# oc describe pvc
Name:          glusterc
Namespace:     mytest
StorageClass:  
Status:        Bound
Volume:        pvc-static
Labels:        <none>
Annotations:   pv.kubernetes.io/bind-completed=yes
               pv.kubernetes.io/bound-by-controller=yes
Finalizers:    []
Capacity:      10G
Access Modes:  RWO
Events:
  Type     Reason              Age                From           Message
  ----     ------              ----               ----           -------
  Warning  VolumeResizeFailed  2m (x10 over 10m)  volume_expand  Volume has no storage class

# oc get pvc -o yaml
apiVersion: v1
items:
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    annotations:
      pv.kubernetes.io/bind-completed: "yes"
      pv.kubernetes.io/bound-by-controller: "yes"
    creationTimestamp: 2018-01-08T06:07:46Z
    name: glusterc
    namespace: mytest
    resourceVersion: "26253"
    selfLink: /api/v1/namespaces/mytest/persistentvolumeclaims/glusterc
    uid: 3f6c5e0d-f43a-11e7-94f8-fa163e21b9b0
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 20Gi
    volumeName: pvc-static
  status:
    accessModes:
    - ReadWriteOnce
    capacity:
      storage: 10G
    conditions:
    - lastProbeTime: null
      lastTransitionTime: 2018-01-08T06:19:10Z
      status: "True"
      type: Resizing
    phase: Bound
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
Comment 1 Hemant Kumar 2018-01-16 18:38:42 EST
This is similar to the bug that - admission controller which is supposed to prevent this kind of errors is somehow not working as intended in Openshift. I need to double check.
Comment 2 Hemant Kumar 2018-01-17 15:38:03 EST
The underlying problem was - resize admission plugin was not getting enabled because it needs additional code change in openshift to work.

fixed via : https://github.com/openshift/origin/pull/18146

After this - any PVC that does not have correct storageclass will throw:

"error: persistentvolumeclaims "resize" could not be patched: persistentvolumeclaims "resize" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize"
Comment 4 Qin Ping 2018-01-24 22:34:45 EST
This bug is targeted to 3.9, while it was attached to 3.7/3.6/3.5 errata, move correct it.
Comment 8 Qin Ping 2018-01-29 00:25:22 EST
Verified on OCP version: v3.9.0-0.31.0
Comment 11 errata-xmlrpc 2018-03-28 10:17:25 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.