spotahome / redis-operator

Redis Operator creates/configures/manages high availability redis with sentinel automatic failover atop Kubernetes.
Apache License 2.0
1.48k stars 355 forks source link

Two different redis clusters in different namespaces interconnected. Production disturbed. #698

Open PrudhviApx7 opened 1 month ago

PrudhviApx7 commented 1 month ago

Expected behaviour

Two redis clusters must work seamless if they have different namespace and name. accordign to this question

What do you want to achieve? Run Mulltiple redis clusters in different namespaces with single operator

Actual behaviour

The replicas from cluster/replicated setup have connected to master of another cluster in diffrent namespace.

Describe step by step what you've have done to get to this point

They were working fine from last two months but yesterday at 6am, spot nodes in which these replicas are running have been taken down by GCP and new ones have spinned off during this transition soemthing happened which resulted in sudden drop to 2000+ keys and interconnection of replicas between clusters.

Environment

kubernetes

PrudhviApx7 commented 1 month ago

My redis failover cluster are names as sync-redis and aurora-redis. In the below logs we can see replicas of sync-redis are made slaves of master of aurora-redis. Screenshot from 2024-05-16 21-35-04 Screenshot from 2024-05-16 21-36-25

github-actions[bot] commented 4 days ago

This issue is stale because it has been open for 45 days with no activity.

samof76 commented 3 days ago

This issue is still relevant, and it happens because pods from a different cluster inherit ips that belong to some other cluster and sentinel is still not flushed to look for these new ip addresses. possible fixes

samof76 commented 3 days ago

@PrudhviApx7 Also please avoid using the same port for all tenants.