Commit 46921d19 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Dridi Boukelmoune

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.
parent e7c64230
......@@ -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;
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment