Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: volume resize does not work #178

Open
josedev-union opened this issue Jun 7, 2024 · 2 comments
Open

bug: volume resize does not work #178

josedev-union opened this issue Jun 7, 2024 · 2 comments

Comments

@josedev-union
Copy link

josedev-union commented Jun 7, 2024

Description

I provisioned the cluster with the following spec and it works.

DorisCluster spec
  feSpec:
    replicas: 2
    image: selectdb/doris.fe-ubuntu:2.1.2
    service:
      type: LoadBalancer
    persistentVolumes:
    - mountPath: /opt/apache-doris/fe/doris-meta
      name: fetest
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi
    - mountPath: /opt/apache-doris/fe/log
      name: felog
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
  beSpec:
    replicas: 3
    image: selectdb/doris.be-ubuntu:2.1.2
    service:
      type: LoadBalancer
    persistentVolumes:
    - mountPath: /opt/apache-doris/be/storage
      name: betest
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 40Gi
    - mountPath: /opt/apache-doris/be/log
      name: belog
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi

I changed the storage size for all volumes and the DorisCluster CR spec has been updated. But it is not applied to underlying resources like statefulset and PVCs. I feel like there is no reconcile logic for that.

There is no error logs in doris operator. Here is the logs.

doris-operator log
I0607 09:52:22.652461       1 doriscluster_controller.go:91] DorisClusterReconciler reconcile the update crd name test-c1 namespace doris
I0607 09:52:22.652602       1 client.go:35] CreateOrUpdateService service Name, Ports, Selector, ServiceType, Labels have not change namespace doris name test-c1-fe-internal
I0607 09:52:22.652670       1 client.go:35] CreateOrUpdateService service Name, Ports, Selector, ServiceType, Labels have not change namespace doris name test-c1-fe-service
I0607 09:52:22.653179       1 statefulset.go:96] the statefulset name test-c1-fe new hash value 1386567562 old have value 1386567562
I0607 09:52:22.653196       1 client.go:54] ApplyStatefulSet Sync exist statefulset name=test-c1-fe, namespace=doris, equals to new statefulset.
I0607 09:52:22.653247       1 client.go:35] CreateOrUpdateService service Name, Ports, Selector, ServiceType, Labels have not change namespace doris name test-c1-be-internal
I0607 09:52:22.653365       1 client.go:35] CreateOrUpdateService service Name, Ports, Selector, ServiceType, Labels have not change namespace doris name test-c1-be-service
I0607 09:52:22.653812       1 statefulset.go:96] the statefulset name test-c1-be new hash value 3597274972 old have value 3597274972
I0607 09:52:22.653826       1 client.go:54] ApplyStatefulSet Sync exist statefulset name=test-c1-be, namespace=doris, equals to new statefulset.
I0607 09:52:22.653837       1 controller.go:201] Doris cluster is not have cn
I0607 09:52:22.653845       1 controller.go:201] Doris cluster is not have cn

Also DorisCluster status is available.

NAME     FESTATUS    BESTATUS    CNSTATUS   BROKERSTATUS
test-c1   available   available 

Expectation

THe volume size change in DorisCluster spec should be applied.

How to reproduce

  1. Create a cluster with any size of volume
  2. Increase that volume size after the cluster is up
@intelligentfu
Copy link
Contributor

intelligentfu commented Jun 11, 2024

Hi, doris operator uses statefulset to manage pods, the statefulset is not allowed to update PVC size, now. doris operator is adding a webhook for hook updating PVC size. for some extreme situations, PVC can be created by Operator When the provisioner field is set to 'Operator', as follows.

apiVersion: doris.selectdb.com/v1
kind: DorisCluster
metadata:
  name: doriscluster-sample-storageclass1
spec:
  feSpec:
    replicas: 3
    image: selectdb/doris.fe-ubuntu:2.1.1
    limits:
      cpu: 8
      memory: 16Gi
    requests:
      cpu: 8
      memory: 16Gi
    persistentVolumes:
    - mountPath: /opt/apache-doris/fe/doris-meta
      name: fetest
      provisioner: Operator
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
    - mountPath: /opt/apache-doris/fe/log
      name: felog
      provisioner: Operator
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
  beSpec:
    replicas: 3
    image: selectdb/doris.be-ubuntu:2.1.1
    limits:
      cpu: 8
      memory: 16Gi
    requests:
      cpu: 8
      memory: 16Gi
    persistentVolumes:
    - mountPath: /opt/apache-doris/be/storage
      name: betest
      provisioner: Operator
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
    - mountPath: /opt/apache-doris/be/log
      name: belong
      provisioner: Operator
      persistentVolumeClaimSpec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi

This function is in beta and not described in docs. when using Operator mode, The management mode cannot updated anymore.

@wdxxl
Copy link

wdxxl commented Jun 12, 2024

mark as same issues. using kubectl edit pv & pvc for increase storage size are not work.

  1. using version: doris.be-ubuntu:2.1.3 & doris.k8s-operator:1.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants