blob: e916f208c5613624b61c5466467ef07cefc1d7f5 [file] [log] [blame]
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +02001# 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
11varnishtest "Seamless reload issue with abns sockets"
12feature ignore_unknown_macro
13
PiBa-NLe6b11e12018-12-08 20:51:16 +010014# abns@ sockets are not available on freebsd
Willy Tarreau084354f2019-04-25 08:50:25 +020015#EXCLUDE_TARGETS=freebsd,osx,generic
Willy Tarreauf8d46de2020-09-29 10:58:44 +020016#REQUIRE_VERSION=1.8
Willy Tarreau2ea15a02020-10-09 11:14:35 +020017#REGTEST_TYPE=broken
PiBa-NLe6b11e12018-12-08 20:51:16 +010018
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020019haproxy h1 -W -conf {
20 global
Frédéric Lécaillea7029472018-12-20 09:55:44 +010021 stats socket "${tmpdir}/h1/stats" level admin expose-fd listeners
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020022
23 defaults
24 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010025 ${no-htx} option http-use-htx
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020026 log global
27 option httplog
Willy Tarreauce6fc252020-03-23 09:11:51 +010028 timeout connect 1s
29 timeout client 1s
30 timeout server 1s
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020031
32 listen testme
33 bind "fd@${testme}"
34 server test_abns_server abns@wpproc1 send-proxy-v2
35
36 frontend test_abns
37 bind abns@wpproc1 accept-proxy
38 http-request deny deny_status 200
39} -start
40
41shell {
Frédéric Lécaillea7029472018-12-20 09:55:44 +010042 kill -USR2 $(cat "${tmpdir}/h1/pid")
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020043}
44
45client c1 -connect ${h1_testme_sock} {
46 txreq -url "/"
47 rxresp
48} -repeat 50 -run
49