[sr-dev] [kamailio/kamailio] ndb_redis: cluster support broken (#2461)

Kritarth notifications at github.com
Tue Sep 1 20:51:59 CEST 2020


### Description
ndb_redis is treating MOVED reply from redis cluster as error and breaking out even before the cluster handling code gets a chance to process this.
```
	if(rpl->rplRedis->type == REDIS_REPLY_ERROR) {
		LM_ERR("Redis error:%.*s\n",
			(int)rpl->rplRedis->len, rpl->rplRedis->str);
		goto error_exec;
	}

	if (check_cluster_reply(rpl->rplRedis, &rsrv)) {
		...
	}
```

### Troubleshooting

#### Reproduction
Setup a redis cluster with at least 2 nodes.
Set modparam cluster=1 and allow_dynamic_nodes=1
fire redis get commands

#### Log Messages

```
ERROR: ndb_redis [redis_client.c:1037]: redisc_exec(): Redis error:MOVED 1090 10.4.20.69:6379
```


### Possible Solutions
revert https://github.com/kamailio/kamailio/commit/d00b14704805d728f5a845a6af900eff1ed372ac#diff-812f223c66f926088d3aa98c36d96b92
or
Add another check to ignore the above logic if cluster support is enabled.
or
Do not treat MOVED replies as of type REDIS_REPLY_ERROR

### Additional Information

```
kamailio built from branch 5.4.1
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2461
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200901/2f6f8462/attachment.htm>


More information about the sr-dev mailing list