Hi,

I am having a rather simple config[1] for testing few changes in haproxyadmin 
library and I noticed
that two different map files have the same ID:

echo 'show map' | socat /run/haproxy/admin1.sock  -
# id (file) description
-1 (/etc/haproxy/test_map.map) pattern loaded from file 
'/etc/haproxy/test_map.map' used by map at
file '/etc/haproxy/haproxy.cfg-haproxystats' line 75
-1 (/etc/haproxy/test2_map.map) pattern loaded from file 
'/etc/haproxy/test2_map.map' used by map at
file '/etc/haproxy/haproxy.cfg-haproxystats' line 79

% echo 'show map #-1' | socat /run/haproxy/admin1.sock  -


0x557ffcbe8970 foor bar


% echo 'show map /etc/haproxy/test_map.map' | socat /run/haproxy/admin1.sock  -


0x557ffcbe8970 foor bar


% echo 'show map /etc/haproxy/test2_map.map' | socat /run/haproxy/admin1.sock  -


0x557ffcc63be0 for bar
0x557ffcc65d20 one two
0x557ffcc65da0 2 three


Is this expected behavior ?

I am using HAProxy version 1.8.19-a3cfe8-8.

Cheers,
Pavlos

[1]
global
    log 127.0.0.1 len 2048 local2
    chroot /var/lib/haproxy
    stats socket /run/haproxy/admin1.sock mode 666 level admin process 1
    stats socket /run/haproxy/admin2.sock mode 666 level admin process 2
    stats socket /run/haproxy/admin3.sock mode 666 level admin process 3
    stats socket /run/haproxy/admin4.sock mode 666 level admin process 4
    #stats socket  127.0.0.1:5555 level admin process 1
    #stats socket  127.0.0.1:5556 level admin process 2
    #stats socket  127.0.0.1:5557 level admin process 3
    #stats socket  127.0.0.1:5558 level admin process 3
    #stats socket  ::1:5558       level admin process 3
    stats timeout 30s
    stats maxconn 50000
    user haproxy
    group haproxy
    daemon
    nbproc 4
    cpu-map 1 0
    cpu-map 2 1
    cpu-map 3 1
    cpu-map 4 0
    maxconnrate 333
defaults
    log global
    backlog 65535
    mode    http
    option  httplog
    option  dontlognull
    timeout connect 5000
    timeout client  50000
    timeout server  50000

frontend frontend_all
    bind :83 process 1
    bind :83 process 2
    bind :83 process 3
    bind :83 process 4
    acl wl_dev src -f /etc/haproxy/wl_stats
    default_backend backend_all

backend backend_all
    bind-process 1-4
    default-server inter 1000s
    option httpchk GET / HTTP/1.1\r\nHost:\ app.foo.com\r\nUser-Agent:\ HAProxy
    server srv1_all 127.0.0.1:8001 check fall 2 inter 5s rise 3
    server srv2_all 127.0.0.1:8002 check fall 2 inter 5s rise 3
    server srv3_all 127.0.0.1:8003 check fall 2 inter 5s rise 3
    server srv4_all 127.0.0.1:8004 check fall 2 inter 5s rise 3

frontend frontend_proc34
    bind :84 process 3
    bind :84 process 4
    default_backend backend_proc34

backend backend_proc34
    bind-process 3-4
    default-server inter 1000s
    option httpchk GET / HTTP/1.1\r\nHost:\ app.foo.com\r\nUser-Agent:\ HAProxy
    server srv1_proc34 127.0.0.1:83 check fall 2 inter 25s rise 3

frontend frontend_proc4
    bind :85 process 4
    default_backend backend_proc4

backend backend_proc4
    bind-process 4
    default-server inter 1000s
    option httpchk GET / HTTP/1.1\r\nHost:\ app.foo.com\r\nUser-Agent:\ HAProxy
    server srv1_proc4 127.0.0.1:8888 check fall 2 inter 25s rise 3

frontend frontend2_proc34
   bind :85 process 3
   bind :85 process 4
   use_backend %[req.hdr(host),lower,map(/etc/haproxy/test_map.map)]

frontend frontend2_proc3
   bind :86 process 3
   use_backend %[req.hdr(host),lower,map(/etc/haproxy/test2_map.map)]

backend backend_dynamic
    server-template srv 1-5 127.0.0.5:8080 check disabled


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to