Can't relay to non-default ports on destination server

Bug #649118 reported by Eric Ziegenhorn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
Undecided
Unassigned

Bug Description

carbon-relay will not relay to carbon-cache if carbon-cache is running on a non-standard port. In particular, relay.py does not compare server names to the list of servers to relay to correctly when port numbers are involved. I've attached a patch that makes it compare straight sever names _or_ servername:portnumber (this was the missing part) to the list of cache servers. Now it works for me.

I've attached a patch against lib/carbon/relay.py which modifies a single line.

Tags: relay
Revision history for this message
Eric Ziegenhorn (ziggy) wrote :
Revision history for this message
chrismd (chrismd) wrote :

Fix committed. Thanks for the patch.

Changed in graphite:
status: New → Fix Committed
Revision history for this message
Eric Ziegenhorn (ziggy) wrote :

Actually, that one-liner works but is too lax due to not paying attention to operator precedence. It should be:

    if server.host in destinations or "%s:%s" % (server.host, server.port) in destinations:

instead of :

    if server.host or "%s:%s" % (server.host, server.port) in destinations:

chrismd (chrismd)
Changed in graphite:
status: Fix Committed → Fix Released
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.