Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

AWS EBS CSI Driver volume expansion does not work #1464

Open
surajssd opened this issue May 10, 2021 · 1 comment
Open

AWS EBS CSI Driver volume expansion does not work #1464

surajssd opened this issue May 10, 2021 · 1 comment
Labels
area/storage Issues related to Storage components OpenEBS and Rook Ceph bug Something isn't working platform/aws AWS-related

Comments

@surajssd
Copy link
Member

AWS EBS CSI Driver volume expansion does not work

I have deployed the CSI driver with the following configuration:

component "aws-ebs-csi-driver" {
  enable_default_storage_class = true
  enable_volume_scheduling     = true
  enable_volume_resizing       = true
  enable_volume_snapshot       = true
}

PVC is created by the default storage class ebs-sc:

$ kubectl get pvc data-prometheus-prometheus-operator-kube-p-prometheus-0 -o yaml | grep storageClass
  storageClassName: ebs-sc

But when I try to resize the PVC created by the default storage class I get the following error:

$ kubectl edit pvc data-prometheus-prometheus-operator-kube-p-prometheus-0
error: persistentvolumeclaims "data-prometheus-prometheus-operator-kube-p-prometheus-0"
could not be patched: persistentvolumeclaims "data-prometheus-prometheus-operator-kube-p-prometheus-0"
is forbidden: only dynamically provisioned pvc can be resized and the storageclass that
provisions the pvc must support resize

You can run `kubectl replace -f /tmp/kubectl-edit-mlu5z.yaml` to try this update again.

I changed the size from 100Gi to 200Gi and I saw above error. So it turns out that the storage class is deployed without the field: allowVolumeExpansion: true despite the lokocfg field enable_volume_resizing in aws-ebs-csi-driver.

$ kubectl get sc ebs-sc -o yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    meta.helm.sh/release-name: aws-ebs-csi-driver
    meta.helm.sh/release-namespace: kube-system
    storageclass.kubernetes.io/is-default-class: "true"
  creationTimestamp: "2021-05-06T07:15:01Z"
  labels:
    app.kubernetes.io/managed-by: Helm
  name: ebs-sc
  resourceVersion: "1693"
provisioner: ebs.csi.aws.com
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
@surajssd surajssd added bug Something isn't working platform/aws AWS-related area/storage Issues related to Storage components OpenEBS and Rook Ceph labels May 10, 2021
@surajssd
Copy link
Member Author

Found a workaround to fix this manually:

kubectl edit sc ebs-sc

And add this field at the root level: allowVolumeExpansion: true.

Now try updating the PVC again.

@surajssd surajssd added the proposed/next-sprint Issues proposed for next sprint label Jun 2, 2021
@iaguis iaguis removed the proposed/next-sprint Issues proposed for next sprint label Jun 4, 2021
@surajssd surajssd added the proposed/next-sprint Issues proposed for next sprint label Aug 4, 2021
@iaguis iaguis removed the proposed/next-sprint Issues proposed for next sprint label Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/storage Issues related to Storage components OpenEBS and Rook Ceph bug Something isn't working platform/aws AWS-related
Projects
None yet
Development

No branches or pull requests

2 participants