Bug 1535939
| Summary: | [RFE] Support online resize of GlusterFS PVs. | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Humble Chirammal <hchiramm> |
| Component: | kubernetes | Assignee: | Humble Chirammal <hchiramm> |
| Status: | CLOSED ERRATA | QA Contact: | Rachael <rgeorge> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rhgs-3.3 | CC: | asriram, hchiramm, madam, pprakash, rcyriac, rgeorge, rhs-bugs |
| Target Milestone: | --- | ||
| Target Release: | CNS 3.9 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-05 05:12:31 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1526413 | ||
|
Description
Humble Chirammal
2018-01-18 09:56:11 UTC
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 |