Open absurdfarce opened 1 year ago
Some of our Cassandra clusters have "rpc_address" column with an "unspecified" address of 0.0.0.0 in their system.local table. I would be glad if we could use cql-proxy with those clusters.
I found that the ZDM proxy seems to use broadcast_address or listen_address if rpc_address is 0.0.0.0.
https://github.com/datastax/zdm-proxy/blob/main/proxy/pkg/zdmproxy/host.go#L188
Is it possible to use the same logic in cql-proxy?
This case leads to the following error message:
Relevant code is NewEndpoint. This code starts with "rpc_address" and falls back to "peer" if that's set to 0.0.0.0. This doesn't work for system.local, though, where "peer" is not a defined column. Thus we wind up with the error message above which doesn't really communicate what's going on.
It would be nice if we could provide a more informative error to the user, at least something indicating that 0.0.0.0 rpc_addresses will introduce this behaviour.