Using "stick on src table mypeers/stickysrc" in a backend results in HAProxy 
deciding not to bind to the appropriate peers address for the local host (i.e. 
HAProxy thinks there are no stick tables in use). However using a http-request 
track-sc0 line will result in haproxy listening on the peers address. Also, 
defining the stick table in the backend itself or in a dummy backend also works.

The configuration below illustrates the issue:
peers mypeers
        #peer hpx01
        #peer hpx02
        server hpx01
        server hpx02
        table src_tracking type string size 10m store 
        table stickysrc type ip size 1m expire 1h store gpc0

listen ft_main
        mode http
        bind *:80
        stick on src table mypeers/stickysrc #peers mypeers #DOES NOT WORK
        #stick-table type ip size 1m expire 1h store gpc0 peers mypeers
        #stick on src #WORKS
        #stick on src track_src #WORKS
        #http-request track-sc0 src table mypeers/src_tracking #WORKS
        #http-request track-sc0 src table mypeers/stickysrc    #WORKS
        server local check

#backend track_src
#stick-table type ip size 1m expire 1h store gpc0 peers mypeers

Issue affects old (peers) and new (server/bind) peers section syntax. The issue 
only appears where there is only stick tables defined in the peers section - 
defining a dummy backend results in HAProxy binding to the peers socket address.

Limited testing shows that the mypeers/stickysrc isn't being populated on new 
connections either.

Issue reported by duggles on freenode.
The new syntax was introduced in 


Bruno Henc

Reply via email to