redis-operator icon indicating copy to clipboard operation
redis-operator copied to clipboard

update redis cluster will cause one shard data to offline status?

Open bugme1024 opened this issue 3 years ago • 2 comments

What version of redis operator are you using? redis 6.0

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

redis-operator version: Image: quay.io/opstree/redis-operator:v0.11.0 Image ID: quay.io/opstree/redis-operator@sha256:20b564e8aa41aeddaf3389ddd5676fc3bee5fae89dd0c1da58f980646ec4e9df

Does this issue reproduce with the latest release?

  1. update clusrer.yaml cpu limit param
  2. kubectl apply -f cluster.yaml: make cluster to restart

What operating system and processor architecture are you using (kubectl version)?

kubectl version Output
$ kubectl version

What did you do?

make cluster to restart

What did you expect to see?

企业微信截图_487f809c-1b9e-444e-80f1-3101c948e796

What did you see instead?

  1. leader-2 and follower-2 are in terminateing status.
  2. this will cause this shard data offline?

** Solution:? check leader ready replicas before createorUpdate follower statefulset

bugme1024 avatar Aug 05 '22 02:08 bugme1024

because followers and leaders use 2 statefulset to controler pod status. and it will restart pod seperately

bugme1024 avatar Aug 05 '22 02:08 bugme1024

Noticed this problem as well. Ideally, each shard should have a statefulset then the pod disruption budget would make sense.

godwhoa avatar Aug 16 '22 11:08 godwhoa

I think this problem can be solved by integrating the pdb, please refer to this example:-

https://github.com/OT-CONTAINER-KIT/redis-operator/blob/master/example/disruption_budget/clusterd.yaml

iamabhishek-dubey avatar Oct 10 '22 11:10 iamabhishek-dubey