[6.0] 46921d19d Introduce VCL_use SLT which tells us which VCL we're running in
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Jul 10 07:42:08 UTC 2019
commit 46921d19dd24f2e39e384e1361b0e599a0d73278
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Jan 14 11:19:47 2019 +0000
Introduce VCL_use SLT which tells us which VCL we're running in
Conflicts:
bin/varnishd/cache/cache_req_fsm.c
include/tbl/vsl_tags.h
Other SLTs were back-ported as well, but marked as not supported, to
ensure binary forward compatibility up to 6.2 releases.
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index a5701ec8e..9101cc568 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -962,6 +962,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
bo = VBO_GetBusyObj(wrk, req);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
+ AN(bo->vcl);
boc = HSH_RefBoc(oc);
CHECK_OBJ_NOTNULL(boc, BOC_MAGIC);
@@ -983,6 +984,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
}
VSLb(bo->vsl, SLT_Begin, "bereq %u %s", VXID(req->vsl->wid), how);
+ VSLb(bo->vsl, SLT_VCL_use, "%s", VCL_Name(bo->vcl));
VSLb(req->vsl, SLT_Link, "bereq %u %s", VXID(bo->vsl->wid), how);
THR_SetBusyobj(bo);
@@ -990,8 +992,6 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
bo->sp = req->sp;
SES_Ref(bo->sp);
- AN(bo->vcl);
-
oc->boc->vary = req->vary_b;
req->vary_b = NULL;
diff --git a/bin/varnishd/cache/cache_vcl_vrt.c b/bin/varnishd/cache/cache_vcl_vrt.c
index 40cb78430..a63161b81 100644
--- a/bin/varnishd/cache/cache_vcl_vrt.c
+++ b/bin/varnishd/cache/cache_vcl_vrt.c
@@ -264,8 +264,8 @@ VRT_vcl_select(VRT_CTX, VCL_VCL vcl)
VCL_TaskLeave(req->vcl, req->privs);
VCL_Rel(&req->vcl);
vcl_get(&req->vcl, vcl);
- /* XXX: better logging */
- VSLb(ctx->req->vsl, SLT_Debug, "Now using %s VCL", vcl->loaded_name);
+ VSLb(ctx->req->vsl, SLT_VCL_use, "%s via %s",
+ req->vcl->loaded_name, vcl->loaded_name);
VCL_TaskEnter(req->vcl, req->privs);
}
diff --git a/bin/varnishtest/tests/u00010.vtc b/bin/varnishtest/tests/u00010.vtc
index dd37a15d0..329f92567 100644
--- a/bin/varnishtest/tests/u00010.vtc
+++ b/bin/varnishtest/tests/u00010.vtc
@@ -20,7 +20,7 @@ client c1 {
varnish v1 -vsl_catchup
-process p1 -expect-text 1 1 {list length 64}
+process p1 -expect-text 1 1 {list length 65}
process p1 -writehex 0c
diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am
index d9be207ac..0ff57bd96 100644
--- a/doc/sphinx/Makefile.am
+++ b/doc/sphinx/Makefile.am
@@ -192,7 +192,7 @@ include/varnishstat_synopsis.rst: $(top_builddir)/bin/varnishstat/varnishstat
BUILT_SOURCES += include/varnishstat_options.rst \
include/varnishstat_synopsis.rst
-include/vsl-tags.rst: $(top_builddir)/lib/libvarnishapi/vsl2rst
+include/vsl-tags.rst: $(top_builddir)/lib/libvarnishapi/vsl2rst
$(top_builddir)/lib/libvarnishapi/vsl2rst > ${@}_
mv ${@}_ ${@}
BUILT_SOURCES += include/vsl-tags.rst
diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index e1f48ef2d..b50b1f0c7 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -628,6 +628,35 @@ SLTM(HitMiss, 0, "Hit for miss object in cache.",
"\n"
)
+SLTM(Filters, 0, "Body filters",
+ "List of filters applied to the body.\n\n"
+ NOSUP_NOTICE
+)
+
+SLTM(SessError, 0, "Client connection accept failed",
+ "Accepting a client connection has failed.\n\n"
+ "The format is::\n\n"
+ "\t%s %s %s %d %d %s\n"
+ "\t| | | | | |\n"
+ "\t| | | | | +- Detailed error message\n"
+ "\t| | | | +---- Error Number (errno) from accept(2)\n"
+ "\t| | | +------- File descriptor number\n"
+ "\t| | +---------- Local TCP port / 0 for UDS\n"
+ "\t| +------------- Local IPv4/6 address / 0.0.0.0 for UDS\n"
+ "\t+---------------- Socket name (from -a argument)\n"
+ "\n"
+ NOSUP_NOTICE
+)
+
+SLTM(VCL_use, 0, "VCL in use",
+ "Records the name of the VCL being used.\n\n"
+ "The format is::\n\n"
+ "\t%s [via %s]\n"
+ "\t| |\n"
+ "\t| +- Name of label used to find it (optional)\n"
+ "\t+--------- Name of VCL put in use\n"
+)
+
#undef NODEF_NOTICE
#undef SLTM
More information about the varnish-commit
mailing list