2018-06-20 05:26:44 +00:00
|
|
|
# commit b4dd15b
|
|
|
|
# BUG/MINOR: unix: Make sure we can transfer abns sockets on seamless reload.
|
|
|
|
#
|
|
|
|
# When checking if a socket we got from the parent is suitable for a listener,
|
|
|
|
# we just checked that the path matched sockname.tmp, however this is
|
|
|
|
# unsuitable for abns sockets, where we don't have to create a temporary
|
|
|
|
# file and rename it later.
|
|
|
|
# To detect that, check that the first character of the sun_path is 0 for
|
|
|
|
# both, and if so, that &sun_path[1] is the same too.
|
2020-11-03 17:43:48 +00:00
|
|
|
#
|
|
|
|
# Note: there are some tricks here. One of them is that we must not bind the
|
|
|
|
# same abns address to multiple processes that may run in parallel. Since
|
|
|
|
# vtest cannot provide abns sockets, we're instead concatenating the number
|
|
|
|
# of the listening port that vtest allocated for another frontend to the abns
|
|
|
|
# path, which guarantees to make them unique in the system.
|
2018-06-20 05:26:44 +00:00
|
|
|
|
|
|
|
varnishtest "Seamless reload issue with abns sockets"
|
|
|
|
feature ignore_unknown_macro
|
|
|
|
|
2018-12-08 19:51:16 +00:00
|
|
|
# abns@ sockets are not available on freebsd
|
2019-04-25 06:50:25 +00:00
|
|
|
#EXCLUDE_TARGETS=freebsd,osx,generic
|
2020-09-29 08:58:44 +00:00
|
|
|
#REQUIRE_VERSION=1.8
|
2020-11-17 10:45:10 +00:00
|
|
|
#REGTEST_TYPE=broken
|
2018-12-08 19:51:16 +00:00
|
|
|
|
2018-06-20 05:26:44 +00:00
|
|
|
haproxy h1 -W -conf {
|
|
|
|
global
|
2018-12-20 08:55:44 +00:00
|
|
|
stats socket "${tmpdir}/h1/stats" level admin expose-fd listeners
|
2018-06-20 05:26:44 +00:00
|
|
|
|
|
|
|
defaults
|
|
|
|
mode http
|
|
|
|
log global
|
|
|
|
option httplog
|
2020-03-23 08:11:51 +00:00
|
|
|
timeout connect 1s
|
|
|
|
timeout client 1s
|
|
|
|
timeout server 1s
|
2018-06-20 05:26:44 +00:00
|
|
|
|
|
|
|
listen testme
|
|
|
|
bind "fd@${testme}"
|
2020-11-03 17:43:48 +00:00
|
|
|
server test_abns_server abns@wpproc1_${h1_testme_port} send-proxy-v2
|
2018-06-20 05:26:44 +00:00
|
|
|
|
|
|
|
frontend test_abns
|
2020-11-03 17:43:48 +00:00
|
|
|
bind abns@wpproc1_${h1_testme_port} accept-proxy
|
2018-06-20 05:26:44 +00:00
|
|
|
http-request deny deny_status 200
|
|
|
|
} -start
|
|
|
|
|
|
|
|
shell {
|
2018-12-20 08:55:44 +00:00
|
|
|
kill -USR2 $(cat "${tmpdir}/h1/pid")
|
2018-06-20 05:26:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
client c1 -connect ${h1_testme_sock} {
|
|
|
|
txreq -url "/"
|
|
|
|
rxresp
|
|
|
|
} -repeat 50 -run
|
|
|
|
|