docker-library / cassandra

Docker Official Image packaging for Cassandra
Apache License 2.0
262 stars 282 forks source link

Different CASSANDRA_BROADCAST_ADDRESS and CASSANDRA_BROADCAST_RPC_ADDRESS values in docker-entrypoint.sh #259

Closed karloffover closed 1 year ago

karloffover commented 1 year ago

Hi all, I was wondering whether entrypoint could manage different properties for CASSANDRA_BROADCAST_ADDRESS and CASSANDRA_BROADCAST_RPC_ADDRESS. In the 'auto' configuration, if I set CASSANDRA_BROADCAST_ADDRESS, the latter (CASSANDRA_BROADCAST_RPC_ADDRESS) gets the same value. In a multi ethernet interface environment, this could lead to problem (ie. when inter node communication has its own eth). I know cassandra.yaml can be overridden, but this is a minimal change and doesn't require maintaining a separate configuration.

Thank you.

tianon commented 1 year ago

I'm a little bit confused here: you can set both of these environment variables independently. :sweat_smile:

(CASSANDRA_BROADCAST_RPC_ADDRESS defaults to the potentially generated value of CASSANDRA_BROADCAST_ADDRESS, but you can set it explicitly to something else instead.)

karloffover commented 1 year ago

@tianon sorry, it works, my bad. Lack of shell knowledge, I suppose: : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS}

Thank you very much.