Description of problem: Failed to expand PVC of cinder volume Version-Release number of selected component (if applicable): oc v3.9.0-0.16.0 openshift v3.9.0-0.16.0 kubernetes v1.9.0-beta1 How reproducible: Always Steps to Reproduce: 1. Enable feature-gates ExpandPersistentVolumes and admission-control PersistentVolumeClaimResize 2. Create a default storageclass, and set allowVolumeExpansion=true 3. Create a PVC using the default storageclass 4. Edit PVC, and change spec.resources.requests.storage from 5Gi to 6Gi 5. Check PVC and PV Actual results: PV expand from 5Gi to 6Gi # oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-10de6a9c-f6a2-11e7-abbc-fa163e1b6c1d 6Gi RWO Delete Bound piqin/claim-1 standard 6m pvc-8d319cdb-f673-11e7-aa75-fa163e1b6c1d 1Gi RWO Delete Bound openshift-ansible-service-broker/etcd standard 5h PVC report VolumeResizeFailed event and exist in "Resizing" condition # oc describe pvc Name: claim-1 Namespace: piqin StorageClass: standard Status: Bound Volume: pvc-10de6a9c-f6a2-11e7-abbc-fa163e1b6c1d Labels: <none> Annotations: pv.kubernetes.io/bind-completed=yes pv.kubernetes.io/bound-by-controller=yes volume.beta.kubernetes.io/storage-provisioner=kubernetes.io/cinder Finalizers: [] Capacity: 5Gi Access Modes: RWO Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal ProvisioningSucceeded 1m persistentvolume-controller Successfully provisioned volume pvc-10de6a9c-f6a2-11e7-abbc-fa163e1b6c1d using kubernetes.io/cinder Warning VolumeResizeFailed 18s volume_expand Invalid request due to incorrect syntax or missing required parameters. # 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" volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/cinder creationTimestamp: 2018-01-11T07:35:58Z name: claim-1 namespace: piqin resourceVersion: "35013" selfLink: /api/v1/namespaces/piqin/persistentvolumeclaims/claim-1 uid: 10de6a9c-f6a2-11e7-abbc-fa163e1b6c1d spec: accessModes: - ReadWriteOnce resources: requests: storage: 6Gi storageClassName: standard volumeName: pvc-10de6a9c-f6a2-11e7-abbc-fa163e1b6c1d status: accessModes: - ReadWriteOnce capacity: storage: 5Gi conditions: - lastProbeTime: null lastTransitionTime: 2018-01-11T07:42:39Z status: "True" type: Resizing phase: Bound kind: List metadata: resourceVersion: "" selfLink: "" Expected results: PVC expand successfully. Additional info: # oc get sc -o yaml apiVersion: v1 items: - allowVolumeExpansion: true apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: annotations: storageclass.beta.kubernetes.io/is-default-class: "true" creationTimestamp: 2018-01-11T02:00:17Z name: standard namespace: "" resourceVersion: "24919" selfLink: /apis/storage.k8s.io/v1/storageclasses/standard uid: 2bb0bd92-f673-11e7-aa75-fa163e1b6c1d parameters: fstype: xfs provisioner: kubernetes.io/cinder reclaimPolicy: Delete kind: List metadata: resourceVersion: "" selfLink: ""
I have the problem reproduced with the latest kubernetes master (v1.10.0-alpha.1.1156+23226c24d4fd11) and OpenShift v3.9.0-0.22.0. The error comes from gophercloud failed REST call (essentially 404) and the confusing part is that sometimes the PVC stays in "Resizing" state without it (or I was not patient enough). This needs to be fixed upstream first, so I'm focusing on kubernetes now.
The problem is in the openstack cloud provider: it does not fill in the "Size" attribute for the V3 API type volumes. It's a one-line patch.
https://github.com/kubernetes/kubernetes/pull/58685
https://github.com/openshift/origin/pull/18237
Verified in openshift v3.9.0-0.47.0
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