Description of problem: There are different scenarios where allocated PV size is not enough for applications consuming this PV. There should be a mechanism to resize online PVs and make the new size available to the applications without disruption in services. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
The subjected PRs are already available in OCP 3.9 builds. Moving this bug to MODIFIED.
I tried resizing of PV but it failed. I edited the storage value but on saving the file I got an error saying: persistentvolumeclaims "claim2" was not valid: spec: Forbidden: field is immutable after creation Version-Release number openshift v3.9.0-0.42.0 kubernetes v1.9.1+a0ce1bc657 cns-deploy-5.0.0-59.el7rhgs.x86_64 heketi-client-5.0.0-19.el7rhgs.x86_64 Steps to Reproduce: 1. [root@dhcp46-119 ~]# oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE claim1 Bound pvc-9514f155-1142-11e8-9c7b-005056a5a340 10Gi RWO gluster-container 50m claim2 Bound pvc-0b56cf9b-1146-11e8-9c7b-005056a5a340 5Gi RWO gluster-container 26m 2. [root@dhcp46-119 ~]# oc edit pvc claim2 # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this file will be # reopened with the relevant failures. # apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: pv.kubernetes.io/bind-completed: "yes" pv.kubernetes.io/bound-by-controller: "yes" volume.beta.kubernetes.io/storage-class: gluster-container volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/glusterfs creationTimestamp: 2018-02-14T06:24:10Z name: claim2 namespace: storage-project resourceVersion: "139123" selfLink: /api/v1/namespaces/storage-project/persistentvolumeclaims/claim2 uid: ab5103c5-114f-11e8-9c7b-005056a5a340 spec: accessModes: - ReadWriteMany resources: requests: storage: 10Gi volumeName: pvc-ab5103c5-114f-11e8-9c7b-005056a5a340 status: accessModes: - ReadWriteMany capacity: storage: 5Gi phase: Bound On saving the file # persistentvolumeclaims "claim2" was not valid: # * spec: Forbidden: field is immutable after creation
You need to enable feature gates ExpandPersistentVolumes and admission-control PersistentVolumeClaimResize and also need to create a storageclass glusterfs with allowVolumeExpansion=true
(In reply to Humble Chirammal from comment #8) > You need to enable feature gates ExpandPersistentVolumes and > admission-control PersistentVolumeClaimResize > > and also need to create a storageclass glusterfs with > allowVolumeExpansion=true On enabling the feature gates and adding allowVolumeExpansion=true, the PV resize was successful [root@dhcp46-119 ~]# cat glusterfs-storageclass2.yaml apiVersion: storage.k8s.io/v1beta1 kind: StorageClass metadata: name: gluster-container2 provisioner: kubernetes.io/glusterfs parameters: resturl: "http://heketi-storage-project.cloudapps.mystorage.com" restuser: "admin" volumetype: "replicate:3" clusterid: "ed4b67fa299ee4aef111d22b1383bcec" allowVolumeExpansion: true [root@dhcp46-119 ~]# oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-8a9bb0df-115a-11e8-8cb3-005056a5a340 15Gi RWO Delete Bound storage-project/claim3 gluster-container2 21h [root@dhcp46-119 ~]# oc edit pvc claim3 apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: pv.kubernetes.io/bind-completed: "yes" pv.kubernetes.io/bound-by-controller: "yes" volume.beta.kubernetes.io/storage-class: gluster-container2 volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/glusterfs creationTimestamp: 2018-02-14T07:42:00Z name: claim3 namespace: storage-project resourceVersion: "283924" selfLink: /api/v1/namespaces/storage-project/persistentvolumeclaims/claim3 uid: 8a9bb0df-115a-11e8-8cb3-005056a5a340 spec: accessModes: - ReadWriteOnce resources: requests: storage: 20Gi volumeName: pvc-8a9bb0df-115a-11e8-8cb3-005056a5a340 status: accessModes: - ReadWriteOnce capacity: storage: 15Gi phase: Bound [root@dhcp46-119 ~]# oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-8a9bb0df-115a-11e8-8cb3-005056a5a340 20Gi RWO Delete Bound storage-project/claim3 gluster-container2 21h
A complete round of tests were performed on the new feature and the basic functionality works as expected. Hence moving to verified.
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-2018:0645
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days