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

opreator does not scale down leader and follower #1148

Open
vexsx opened this issue Dec 3, 2024 · 2 comments
Open

opreator does not scale down leader and follower #1148

vexsx opened this issue Dec 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vexsx
Copy link

vexsx commented Dec 3, 2024

What version of redis operator are you using?

kubectl logs <_redis-operator_pod_name> -n <namespace>

redis-operator version: 0.18.1

Does this issue reproduce with the latest release?

no idea

What operating system and processor architecture are you using (kubectl version)?
Client Version: v1.30.6
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.6

kubectl version Output
$ kubectl version

What did you expect to see?

redeuce sacle of pods

What did you see instead?
nothing

log of operator :
{"level":"error","ts":"2024-12-03T05:28:54Z","logger":"controllers.RedisCluster","msg":"Failed to ping Redis server","error":"dial tcp :6379: connect: connection refused","stacktrace":"github.com/OT-CONTAINER-KIT/redis-operator/pkg/k8sutils.getRedisNodeID\n\t/workspace/pkg/k8sutils/cluster-scaling.go:116\ngithub.com/OT-CONTAINER-KIT/redis-operator/pkg/k8sutils.ReshardRedisCluster\n\t/workspace/pkg/k8sutils/cluster-scaling.go:58\ngithub.com/OT-CONTAINER-KIT/redis-operator/pkg/controllers/rediscluster.(*RedisClusterReconciler).Reconcile\n\t/workspace/pkg/controllers/rediscluster/rediscluster_controller.go:93\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}
{"level":"info","ts":"2024-12-03T05:28:54Z","logger":"controllers.RedisCluster","msg":"Redis cluster is downscaled... Rebalancing the cluster","Request.Namespace":"ot-operators","Request.Name":"redis-cluster"}

@vexsx vexsx added the bug Something isn't working label Dec 3, 2024
@xiaozhuang-a
Copy link
Contributor

xiaozhuang-a commented Dec 11, 2024

I have encountered the same problem here and it has been consistently reproduced
Reproduction process:

  1. New cluster, clusterSize=4
  2. Delete leader-3, trigger failover, and at this time follow-3 is master
  3. Then perform a scan down ->clusterSize 3
  4. Then an exception will occur, manifested as the inability to delete sharp follow-3, and the number of statsfully set is still 4, with the operator triggering a rebalance every time it reconciles
    The problem seems to be that ClusterFail did not execute successfully, and the follower is still the master

@vexsx
Copy link
Author

vexsx commented Dec 11, 2024

yes , if you try to manually sacle down it crash the cluster.
i think solution is to block any active connection using redis then try to scale down.

@xiaozhuang-a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants