nigoroll / libvmod-dynamic

The Varnish dns/named director continued
BSD 2-Clause "Simplified" License
95 stars 34 forks source link

7.5 release #113

Closed gquintard closed 5 months ago

gquintard commented 5 months ago

Hi!

could we get a release (or a branch, I'm not greedy) targeting 7.5 (master targets trunk at the moment)? I need it to release the docker images

gquintard commented 5 months ago

I've tried the very naive https://github.com/gquintard/libvmod-dynamic/commit/5dc09f52cd8eeed77d879b0313bd8ad9a749477f approach to get the vmod to compile, but I'm still getting one test failure:

FAIL: tests/layer_reload
========================

**** dT    0.000
*    top   TEST ./tests/layer_reload.vtc starting
**** top   extmacro def pkg_version=7.5.0
**** top   extmacro def pkg_branch=7.5
**** top   extmacro def pwd=/tmp/module_to_build/src
**** top   extmacro def date(...)
**** top   extmacro def string(...)
**** top   extmacro def vmod_dynamic=dynamic from "/tmp/module_to_build/src/.libs/libvmod_dynamic.so"
**** top   extmacro def localhost=127.0.0.1
**** top   extmacro def bad_backend=127.0.0.1:46569
**** top   extmacro def listen_addr=127.0.0.1:0
**** top   extmacro def bad_ip=192.0.2.255
**** top   macro def testdir=/tmp/module_to_build/src/./tests
**** top   macro def tmpdir=/tmp/vtc.26896.1911e092
**** top   macro def vtcid=vtc.26896.1911e092
**   top   === varnishtest "Reloading after creating backend in init"
*    top   VTEST Reloading after creating backend in init
**   top   === feature cmd "getent hosts example.com"
**** dT    0.048
**   top   === shell {
**** top   shell_cmd|exec 2>&1 ; 
**** top   shell_cmd|\tcat >/tmp/vtc.26896.1911e092/f1 <<-EOF
**** top   shell_cmd|\tvcl 4.1;
**** top   shell_cmd|\timport dynamic from "/tmp/module_to_build/src/.libs/libvmod_dynamic.so";
**** top   shell_cmd|\timport directors;
**** top   shell_cmd|
**** top   shell_cmd|\tbackend none none;
**** top   shell_cmd|
**** top   shell_cmd|\tsub vcl_init {
**** top   shell_cmd|\t\tnew dir = directors.fallback();
**** top   shell_cmd|\t\tnew res = dynamic.resolver();
**** top   shell_cmd|\t\tnew dyn = dynamic.director(domain_usage_timeout = 0.1s, resolver = res.use());
**** top   shell_cmd|\t\tdir.add_backend(dyn.backend(host={"example.com"}, port={"80"}) );
**** top   shell_cmd|\t}
**** top   shell_cmd|\tEOF
**** dT    0.051
**** top   shell_status = 0x0000
**   top   === varnish v1 -cliok "vcl.load vcl1 ${tmpdir}/f1"
**** dT    0.054
**   v1    Launch
***  v1    CMD: cd ${pwd} && exec varnishd  -d -n /tmp/vtc.26896.1911e092/v1 -i v1 -p debug=+vcl_keep -p debug=+vmod_so_keep -p debug=+vsm_keep -l 2m -p auto_restart=off -p syslog_cli_traffic=off -p thread_pool_min=10 -p debug=+vtc_mode -p vsl_mask=+Debug,+H2RxHdr,+H2RxBody -p h2_initial_window_size=1m -p h2_rx_window_low_water=64k -a '127.0.0.1:0' -M '127.0.0.1 46841' -P /tmp/vtc.26896.1911e092/v1/varnishd.pid 
***  v1    CMD: cd /tmp/module_to_build/src && exec varnishd  -d -n /tmp/vtc.26896.1911e092/v1 -i v1 -p debug=+vcl_keep -p debug=+vmod_so_keep -p debug=+vsm_keep -l 2m -p auto_restart=off -p syslog_cli_traffic=off -p thread_pool_min=10 -p debug=+vtc_mode -p vsl_mask=+Debug,+H2RxHdr,+H2RxBody -p h2_initial_window_size=1m -p h2_rx_window_low_water=64k -a '127.0.0.1:0' -M '127.0.0.1 46841' -P /tmp/vtc.26896.1911e092/v1/varnishd.pid 
***  v1    PID: 27020
**** v1    macro def v1_pid=27020
**** v1    macro def v1_name=/tmp/vtc.26896.1911e092/v1
**** dT    0.064
***  v1    debug|Debug: Version: varnish-7.5.0 revision eef25264e5ca5f96a77129308edb83ccf84cb1b1
***  v1    debug|Debug: Platform: Linux,6.7.5-arch1-1,x86_64,-junix,-sdefault,-sdefault,-hcritbit
***  v1    debug|200 314     
***  v1    debug|-----------------------------
***  v1    debug|Varnish Cache CLI 1.0
***  v1    debug|-----------------------------
***  v1    debug|Linux,6.7.5-arch1-1,x86_64,-junix,-sdefault,-sdefault,-hcritbit
***  v1    debug|varnish-7.5.0 revision eef25264e5ca5f96a77129308edb83ccf84cb1b1
***  v1    debug|
***  v1    debug|Type 'help' for command list.
***  v1    debug|Type 'quit' to close CLI session.
***  v1    debug|Type 'start' to launch worker process.
***  v1    debug|
**** dT    0.163
**** v1    CLIPOLL 1 0x1 0x0 0x0
***  v1    CLI connection fd = 5
***  v1    CLI RX  107
**** v1    CLI RX|gxkvzjqrevssmqmplghjjmxhgwsweruj
**** v1    CLI RX|
**** v1    CLI RX|Authentication required.
**** dT    0.164
**** v1    CLI TX|auth 5550be68b3c8e8eeebbbea732014bc6bbf13da5a0b43a6588f3816de3dfb5fa1
**** dT    0.165
***  v1    CLI RX  200
**** v1    CLI RX|-----------------------------
**** v1    CLI RX|Varnish Cache CLI 1.0
**** v1    CLI RX|-----------------------------
**** v1    CLI RX|Linux,6.7.5-arch1-1,x86_64,-junix,-sdefault,-sdefault,-hcritbit
**** v1    CLI RX|varnish-7.5.0 revision eef25264e5ca5f96a77129308edb83ccf84cb1b1
**** v1    CLI RX|
**** v1    CLI RX|Type 'help' for command list.
**** v1    CLI RX|Type 'quit' to close CLI session.
**** v1    CLI RX|Type 'start' to launch worker process.
**** v1    CLI TX|vcl.load vcl1 /tmp/vtc.26896.1911e092/f1
**** dT    0.265
***  v1    vsl|No VSL chunk found (child not started ?)
**** dT    0.366
***  v1    vsl|No VSL chunk found (child not started ?)
**** dT    0.466
***  v1    vsl|No VSL chunk found (child not started ?)
**** dT    0.567
***  v1    vsl|No VSL chunk found (child not started ?)
**** dT    0.667
***  v1    vsl|No VSL chunk found (child not started ?)
**** dT    0.748
***  v1    CLI RX  200
**** v1    CLI RX|VCL compiled.
**   v1    CLI 200 <vcl.load vcl1 /tmp/vtc.26896.1911e092/f1>
**   top   === varnish v1 -cliok "vcl.use vcl1"
**** v1    CLI TX|vcl.use vcl1
***  v1    CLI RX  200
**** v1    CLI RX|VCL 'vcl1' now active
**   v1    CLI 200 <vcl.use vcl1>
**   top   === varnish v1 -cliok "start"
**** v1    CLI TX|start
**** dT    0.767
***  v1    vsl|No VSL chunk found (child not started ?)
**** dT    0.797
***  v1    debug|Debug: Child (27542) Started
**** dT    0.827
***  v1    debug|Child launched OK
**** dT    0.830
***  v1    debug|Error: Child (27542) Pushing vcls failed:
***  v1    debug|VCL "vcl1" Failed initialization
***  v1    debug|Message:
***  v1    debug|\tObject res not initialized
***  v1    debug|
***  v1    debug|Debug: Stopping Child
***  v1    debug|Info: Child (27542) said Child starts
**** dT    0.868
**** v1    vsl|          0 CLI             - Rd vcl.load "vcl1" vcl_vcl1.1710865563.743833/vgc.so 1auto
**** v1    vsl|          0 Timestamp       - vmod-dynamic vcl1.(null)(example.com:80) Done: 1710865564.365246 0.000000 0.000000
**** v1    vsl|          0 CLI             - Wr 300 70 VCL "vcl1" Failed initialization
Message:
    Object res not initialized

**** v1    vsl|          0 CLI             - EOF on CLI connection, worker stops
**** dT    0.930
***  v1    debug|Info: Child (27542) said Child dies
***  v1    debug|Info: Child (27542) ended
**** dT    0.931
***  v1    debug|Debug: Child cleanup complete
***  v1    CLI RX  300
**** v1    CLI RX|Child (27542) Pushing vcls failed:
**** v1    CLI RX|VCL "vcl1" Failed initialization
**** v1    CLI RX|Message:
**** v1    CLI RX|\tObject res not initialized
**   v1    CLI 300 <start>
---- v1    FAIL CLI response 300 expected 200
*    top   RESETTING after ./tests/layer_reload.vtc
**   v1    Wait
**** v1    CLI TX|panic.show
***  v1    CLI RX  300
**** v1    CLI RX|Child has not panicked or panic has been cleared
***  v1    debug|Info: manager stopping child
***  v1    debug|Info: manager dies
**** dT    0.932
**** v1    STDOUT EOF
**** dT    0.968
**   v1    WAIT4 pid=27020 status=0x0000 (user 0.455957 sys 0.095758)
*    top   TEST ./tests/layer_reload.vtc FAILED
*    diag  0.0 2606:2800:220:1:248:1893:25c8:1946  example.com  example.com
#    top  TEST ./tests/layer_reload.vtc FAILED (0.969) exit=2
FAIL tests/layer_reload.vtc (exit status: 2)
gquintard commented 5 months ago

looks like it's due to the absence of libgetdns, so that test probably shouldn't be run here?

I'll disable tests when building the docker image, but if you have a more solid fix, I'll welcome it

nigoroll commented 5 months ago

The failing test was addressed in 7ff0f863469a6ca995b0258f92a40120ae2ac82f

A 7.5 branch has been created

For packaging, I would strongly recommend to add getdns support, because important features like SRV resolution and ttl from dns depend on it.

gquintard commented 4 months ago

thank you @nigoroll !

I was about to say that we couldn't have getdns on alpine because there was no package, but apparently, that's been added, so we can start using it, w00t!

gquintard commented 3 months ago

in case somebody stumbles on this: I looked at this and it looks like getdns is in the testing repository, only available to the edge release (the sid/unstable equivalent), and I don't want to pull that one because that would mix packages from various versions.