[PATCH] add documentation about backend naming for VMOD authors

Dridi Boukelmoune dridi at varni.sh
Mon Nov 2 08:43:29 CET 2015


> So what if two different VMODs both try to create a backend with the
> same name ?

If both VMODs rely on a vcl_name to name their backends (myvcl.mydir)
then they can't get in this situation. That's my whole point.

> In my view, the "magic behaviour" is to fail randomly for reasons the
> VMOD writer has no control over...

In case of a panic, you get a little clue: the VMOD file in the backtrace.

If VRT_new_backend returns NULL, the VMOD can log something
useful before panicking or not panic at all (if that makes any sense
in the VMOD's behavior).

Or again, if Varnish panics, but provides the VCL_HasBackend function
(shouldn't it be in VRT instead?) the VMOD author can also do this
check and log a meaningful error.

Best,
Dridi



More information about the varnish-dev mailing list