webapp should not try to bind to CLUSTER_SERVERS IPs to test if they're local

Bug #1092778 reported by Rob N
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
New
Undecided
Unassigned

Bug Description

I'm setting up a split Graphite environment with a single machine with lots of disk as the metric collection store, and multiple webapp frontends. Of course my intent is to use CLUSTER_SERVERS to do this. However I found that the webapp refused to connect to the remote server, with no error messages given.

On digging through the code, it looks like you're deciding if an IP is local or remote based on the whether or not it can be bound. In our environment this is not a valid test - we set the Linux kernel parameter net.ipv4.ip_nonlocal_bind=1 as part of our failover strategy. This allows a process to bind to an IP regardless of whether or not that IP is bound to a local interface. If the IP ever appears on an interface (in a failover scenario), then the application doesn't have to be restarted - it just starts taking traffic. Its quite nice!

I think it would be better to simply remove this check altogether and just use the addresses as provided. If you really feel you must check the local IP, consider checking the local interfaces explicitly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.