rediscluster.exceptions.RedisClusterException: Slot "13145" not covered by the cluster. "skip_full_coverage_check=True"
See original GitHub issueHello,
I am using redis-py-cluster 2.0.0 and AWS Elasticache Clustered Mode Redis.
When I initialize my RedisCluster client with skip_full_coverage_check=False, I get the following error:
redis.exceptions.ResponseError: unknown command `CONFIG`, with args beginning with: `GET`, `cluster-require-full-coverage`,
It gets resolved when I use skip_full_coverage_check=True.
After this, I tried primary failover by initiating failover in one of the shards. After the failover finished one of my containers connecting with the Redis started throwing errors like below:
rediscluster.exceptions.RedisClusterException: Slot "13145" not covered by the cluster. "skip_full_coverage_check=True"
Strange thing is that the other containers were working fine after the failover. What can be the issue?
Thanks, Umang.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (9 by maintainers)
Basically this is technicall intended from the client side of things. What happens when you start a failover is that the client picks this up and it tries to rebuild the slots cache and when your slot is not covered during the failover event timeframe, that error is pushed up by the client since you technically told it to ignore if your cluster is broken or not, it is up to your code to sort it out if you want that behaviour from your client.
I do get why this would be wrong from a usability pov when using the aws elasticache cluster mode. It might be needed to split the config into two new options instead of one. One that controlls if
cluster-require-full-coverage
is really needed or not. And one that will deal with how the client should behave internally. I would have to think about this tho, and the only suggestion i can give you right now is that you need to sort this out in your code layer for now if you keep using this mode/featureYes that is what you must do, you need to create a proper cluster that has all 16k slots assigned to one of the master nodes in your cluster. Just having the nodes up and running do not help if your cluster is not setup properly please read up on the basics here https://redis.io/topics/cluster-tutorial and try again.
What all slots covered means is that you need to have all 16k slots assigned to at least one master node. In your case the slot 3280 for some reason is not assigned properly to a master node and thus is “not covered” when you attempt to ask the redis cluster what the current cluster setup is when query
CLUSTER SLOTS
command.