Bug 1535939 - [RFE] Support online resize of GlusterFS PVs.
Summary: [RFE] Support online resize of GlusterFS PVs.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: kubernetes
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: CNS 3.9
Assignee: Humble Chirammal
QA Contact: Rachael
URL:
Whiteboard:
Depends On:
Blocks: 1526413
TreeView+ depends on / blocked
 
Reported: 2018-01-18 09:56 UTC by Humble Chirammal
Modified: 2023-09-14 04:15 UTC (History)
7 users (show)

Fixed In Version: 3.9.0-0.36.0.git.0.8f8b69d
Doc Type: Enhancement
Doc Text:
Openshift now supports online expansion of a volume by editing the PVC using the "oc pvc edit" command. Volume expansion was supported through heketi-cli in the previous releases, but this was unavailable to the the end-users in openshift, and the updated size was not reflected in the persistent volume object in Kubernetes. Now, you can resize online PVs and make the new size available to the applications without disruption in services.
Clone Of:
Environment:
Last Closed: 2018-04-05 05:12:31 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1532512 0 medium CLOSED Expand PVC successfully but have a "VolumeResizeFailed" event 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2018:0645 0 None None None 2018-04-05 05:12:58 UTC

Internal Links: 1532512

Description Humble Chirammal 2018-01-18 09:56:11 UTC
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:

Comment 4 Humble Chirammal 2018-02-01 11:50:09 UTC
The subjected PRs are already available in OCP 3.9 builds. Moving this bug to MODIFIED.

Comment 7 Rachael 2018-02-14 06:49:49 UTC
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

Comment 8 Humble Chirammal 2018-02-14 06:58:39 UTC
You need to enable feature gates ExpandPersistentVolumes and admission-control PersistentVolumeClaimResize

and also need to create a storageclass glusterfs with allowVolumeExpansion=true

Comment 9 Rachael 2018-02-15 05:08:22 UTC
(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

Comment 12 Rachael 2018-03-14 09:25:16 UTC
 A complete round of tests were performed on the new feature and the basic functionality works as expected.

Hence moving to verified.

Comment 16 errata-xmlrpc 2018-04-05 05:12:31 UTC
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

Comment 17 Red Hat Bugzilla 2023-09-14 04:15:41 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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