Frédéric Lécaille | 9b53b4c | 2018-06-20 07:26:44 +0200 | [diff] [blame] | 1 | # commit b4dd15b |
| 2 | # BUG/MINOR: unix: Make sure we can transfer abns sockets on seamless reload. |
| 3 | # |
| 4 | # When checking if a socket we got from the parent is suitable for a listener, |
| 5 | # we just checked that the path matched sockname.tmp, however this is |
| 6 | # unsuitable for abns sockets, where we don't have to create a temporary |
| 7 | # file and rename it later. |
| 8 | # To detect that, check that the first character of the sun_path is 0 for |
| 9 | # both, and if so, that &sun_path[1] is the same too. |
| 10 | |
| 11 | varnishtest "Seamless reload issue with abns sockets" |
| 12 | feature ignore_unknown_macro |
| 13 | |
PiBa-NL | e6b11e1 | 2018-12-08 20:51:16 +0100 | [diff] [blame] | 14 | # abns@ sockets are not available on freebsd |
Willy Tarreau | 084354f | 2019-04-25 08:50:25 +0200 | [diff] [blame] | 15 | #EXCLUDE_TARGETS=freebsd,osx,generic |
Frédéric Lécaille | dc1a3bd | 2019-03-29 15:07:24 +0100 | [diff] [blame] | 16 | #REGTEST_TYPE=bug |
PiBa-NL | e6b11e1 | 2018-12-08 20:51:16 +0100 | [diff] [blame] | 17 | |
Frédéric Lécaille | 9b53b4c | 2018-06-20 07:26:44 +0200 | [diff] [blame] | 18 | haproxy h1 -W -conf { |
| 19 | global |
Frédéric Lécaille | a702947 | 2018-12-20 09:55:44 +0100 | [diff] [blame] | 20 | stats socket "${tmpdir}/h1/stats" level admin expose-fd listeners |
Frédéric Lécaille | 9b53b4c | 2018-06-20 07:26:44 +0200 | [diff] [blame] | 21 | |
| 22 | defaults |
| 23 | mode http |
Christopher Faulet | 8f16148 | 2018-12-19 11:49:39 +0100 | [diff] [blame] | 24 | ${no-htx} option http-use-htx |
Frédéric Lécaille | 9b53b4c | 2018-06-20 07:26:44 +0200 | [diff] [blame] | 25 | log global |
| 26 | option httplog |
Willy Tarreau | ce6fc25 | 2020-03-23 09:11:51 +0100 | [diff] [blame] | 27 | timeout connect 1s |
| 28 | timeout client 1s |
| 29 | timeout server 1s |
Frédéric Lécaille | 9b53b4c | 2018-06-20 07:26:44 +0200 | [diff] [blame] | 30 | |
| 31 | listen testme |
| 32 | bind "fd@${testme}" |
| 33 | server test_abns_server abns@wpproc1 send-proxy-v2 |
| 34 | |
| 35 | frontend test_abns |
| 36 | bind abns@wpproc1 accept-proxy |
| 37 | http-request deny deny_status 200 |
| 38 | } -start |
| 39 | |
| 40 | shell { |
Frédéric Lécaille | a702947 | 2018-12-20 09:55:44 +0100 | [diff] [blame] | 41 | kill -USR2 $(cat "${tmpdir}/h1/pid") |
Frédéric Lécaille | 9b53b4c | 2018-06-20 07:26:44 +0200 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | client c1 -connect ${h1_testme_sock} { |
| 45 | txreq -url "/" |
| 46 | rxresp |
| 47 | } -repeat 50 -run |
| 48 | |