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

通过doris-operator进行修改fe 或者be replicas的数量 只能增加 不能减少 减少无效 这个是正常的吗? #205

Closed
617450941 opened this issue Jul 23, 2024 · 3 comments

Comments

@617450941
Copy link

通过doris-operator进行修改fe 或者be replicas的数量 只能增加 不能减少 减少无效 这个是正常的吗?

@617450941
Copy link
Author

我的配置如下 修改replicas只能往上加 减少是没有任何变化的 减少操作的时候doris-operator的容器里面还会报错误
apiVersion: doris.selectdb.com/v1
kind: DorisCluster
metadata:
labels:
app.kubernetes.io/name: doriscluster
app.kubernetes.io/instance: doris-cluster
app.kubernetes.io/part-of: doris-operator
name: doris-cluste
spec:
feSpec:
replicas: 5
image: harbor.27yn.cn/doris/doris.fe-ubuntu:2.1.3
configMapInfo:
configMapName: fe-config
resolveKey: fe.conf
persistentVolumes:
- mountPath: /opt/apache-doris/fe/doris-meta
name: fetest
persistentVolumeClaimSpec:
storageClassName: ceph-hdd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
- mountPath: /opt/apache-doris/fe/log
name: felog
persistentVolumeClaimSpec:
storageClassName: ceph-hdd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
beSpec:
replicas: 3
image: harbor.27yn.cn/doris/doris.be-ubuntu:2.1.3-not-avx2
persistentVolumes:
- mountPath: /opt/apache-doris/be/storage
name: betest
persistentVolumeClaimSpec:
storageClassName: ceph-hdd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- mountPath: /opt/apache-doris/be/log
name: belog
persistentVolumeClaimSpec:
storageClassName: ceph-hdd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi

错误信息
I0723 01:53:31.122242 1 doriscluster_controller.go:98] DorisClusterReconciler reconcile the update crd name doris-cluste namespace doris

I0723 01:53:31.123341 1 client.go:38] CreateOrUpdateService service Name, Ports, Selector, ServiceType, Labels have not change namespace doris name doris-cluste-fe-internal

I0723 01:53:31.123489 1 client.go:38] CreateOrUpdateService service Name, Ports, Selector, ServiceType, Labels have not change namespace doris name doris-cluste-fe-service

I0723 01:53:31.124050 1 client.go:302] UpdateDorisClusterPhase will not change cluster fe Phase, it is already scaling ,DCR name: doris-cluste, namespace: doris,

E0723 01:53:31.212852 1 runtime.go:79] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)

goroutine 561 [running]:

k8s.io/apimachinery/pkg/util/runtime.logPanic({0x187e140?, 0x29e12a0})

/go/pkg/mod/k8s.io/apimachinery@v0.26.1/pkg/util/runtime/runtime.go:75 +0x99

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:111 +0xc5

panic({0x187e140, 0x29e12a0})

/usr/local/go/src/runtime/panic.go:884 +0x212

github.com/selectdb/doris-operator/pkg/controller/sub_controller/fe.(*Controller).dropObserverFromSqlClient(0x1abdbbc?, {0x1d4a2d8, 0xc00315b8f0}, {0x1d53470, 0xc0006202a0}, 0xc0031f3a20)

/workspace/pkg/controller/sub_controller/fe/prepare_modify.go:110 +0x779

github.com/selectdb/doris-operator/pkg/controller/sub_controller/fe.(*Controller).prepareStatefulsetApply(0xc000330e00, {0x1d4a2d8, 0xc00315b8f0}, 0xc0031f3a20)

/workspace/pkg/controller/sub_controller/fe/prepare_modify.go:39 +0x2f3

github.com/selectdb/doris-operator/pkg/controller/sub_controller/fe.(*Controller).Sync(0xc000330e00, {0x1d4a2d8, 0xc00315b8f0}, 0xc0031f3a20)

/workspace/pkg/controller/sub_controller/fe/controller.go:97 +0x839

github.com/selectdb/doris-operator/pkg/controller.(*DorisClusterReconciler).Reconcile(0xc000796240, {0x1d4a2d8, 0xc00315b8f0}, {{{0xc003802a20, 0x5}, {0xc003802a10, 0xc}}})

/workspace/pkg/controller/doriscluster_controller.go:119 +0x5ce

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x1d4a2d8?, {0x1d4a2d8?, 0xc00315b8f0?}, {{{0xc003802a20?, 0x17b0960?}, {0xc003802a10?, 0x0?}}})

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:122 +0xc8

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0000006e0, {0x1d4a230, 0xc000467000}, {0x18f8200?, 0xc000134fa0?})

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:323 +0x38f

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0000006e0, {0x1d4a230, 0xc000467000})

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:274 +0x1d9

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:235 +0x85

created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:231 +0x333

2024-07-23T01:53:31Z ERROR Reconciler error {"controller": "doriscluster", "controllerGroup": "doris.selectdb.com", "controllerKind": "DorisCluster", "DorisCluster": {"name":"doris-cluste","namespace":"doris"}, "namespace": "doris", "name": "doris-cluste", "reconcileID": "f961f771-3d06-478c-b5ea-5125280f854e", "error": "panic: runtime error: invalid memory address or nil pointer dereference [recovered]"}

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:329

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:274

sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2

/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.4/pkg/internal/controller/controller.go:235

@catpineapple
Copy link
Contributor

Thank you for your feedback, this is a valuable issue, I have fixed it #207 . If you are in a hurry to use the fe scaling function, you can configure electionNumber: 3 in feSpec (3 is the default value, which means the number of fe followers) to avoid this problem.
感谢你的反馈,这是一个很有价值的问题,我已经修复了他。 如果你着急使用缩容fe 功能, 可以在 feSpec 内配置 electionNumber: 3 (3是默认值,意味着fe follower 的数量),就能避免这个问题。

@intelligentfu8
Copy link
Contributor

fixed:#207

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