From dridi.boukelmoune at gmail.com Mon Mar 7 16:46:06 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 7 Mar 2022 16:46:06 +0000 (UTC) Subject: [master] cea729bb5 Revert "Add the foundation of the "VEXT" mechanism" Message-ID: <20220307164606.50777966A5@lists.varnish-cache.org> commit cea729bb576c483eccc1a2013832fce8dd18f769 Author: Dridi Boukelmoune Date: Mon Mar 7 17:42:52 2022 +0100 Revert "Add the foundation of the "VEXT" mechanism" This reverts commit 6225c0aff722828944d5bd6c13aa0a62a0c5836b. To be added back after we branch off for the next release. diff --git a/bin/varnishd/Makefile.am b/bin/varnishd/Makefile.am index 8e8d6b117..94ba2f436 100644 --- a/bin/varnishd/Makefile.am +++ b/bin/varnishd/Makefile.am @@ -57,7 +57,6 @@ varnishd_SOURCES = \ cache/cache_ws_common.c \ common/common_vsc.c \ common/common_vsmw.c \ - common/common_vext.c \ hash/hash_classic.c \ hash/hash_critbit.c \ hash/hash_simple_list.c \ diff --git a/bin/varnishd/common/common_vext.c b/bin/varnishd/common/common_vext.c deleted file mode 100644 index 1c1e1ee38..000000000 --- a/bin/varnishd/common/common_vext.c +++ /dev/null @@ -1,163 +0,0 @@ -/*- - * Copyright (c) 2022 Varnish Software AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * SPDX-License-Identifier: BSD-2-Clause - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Loadable extensions - */ - -#include "config.h" - -#include -#include -#include -#include -#include -#include -#include - -#include "vdef.h" -#include "vas.h" -#include "miniobj.h" -#include "vav.h" -#include "vqueue.h" -#include "vrnd.h" -#include "vsb.h" - -#include "heritage.h" - -struct vext { - unsigned magic; -#define VEXT_MAGIC 0xd5063ef6 - VTAILQ_ENTRY(vext) list; - - char **argv; - int fd; - struct vsb *vsb; - void *dlptr; -}; - -static VTAILQ_HEAD(,vext) vext_list = - VTAILQ_HEAD_INITIALIZER(vext_list); - -void -vext_argument(const char *arg) -{ - struct vext *vp; - - fprintf(stderr, "EEE <%s>\n", arg); - ALLOC_OBJ(vp, VEXT_MAGIC); - AN(vp); - vp->argv = VAV_Parse(arg, NULL, ARGV_COMMA); - AN(vp->argv); - if (vp->argv[0] != NULL) - ARGV_ERR("\tParse failure in argument: %s\n\t%s\n", - arg, vp->argv[0]); - VTAILQ_INSERT_TAIL(&vext_list, vp, list); - fprintf(stderr, "eee <%s>\n", vp->argv[1]); - vp->fd = open(vp->argv[1], O_RDONLY); - if (vp->fd < 0) - ARGV_ERR("\tCannot open %s\n\t%s\n", - vp->argv[1], strerror(errno)); -} - -void -vext_copyin(struct vsb *vident) -{ - struct vext *vp; - const char *p; - int i, fdo; - unsigned u; - char buf[BUFSIZ]; - ssize_t sz, szw; - - VTAILQ_FOREACH(vp, &vext_list, list) { - if (vp->vsb == NULL) { - vp->vsb = VSB_new_auto(); - AN(vp->vsb); - } - VSB_clear(vp->vsb); - p = strrchr(vp->argv[1], '/'); - if (p != NULL) - p++; - else - p = vp->argv[0]; - VSB_printf(vident, ",-E%s", p); - VSB_printf(vp->vsb, "vext_cache/%s,", p); - for (i = 0; i < 8; i++) { - AZ(VRND_RandomCrypto(&u, sizeof u)); - u %= 26; - VSB_printf(vp->vsb, "%c", 'a' + (char)u); - } - VSB_printf(vp->vsb, ".so"); - AZ(VSB_finish(vp->vsb)); - fprintf(stderr, "ee2 %s\n", VSB_data(vp->vsb)); - fdo = open(VSB_data(vp->vsb), O_WRONLY|O_CREAT|O_EXCL, 0700); - xxxassert(fdo >= 0); - AZ(lseek(vp->fd, 0, SEEK_SET)); - do { - sz = read(vp->fd, buf, sizeof buf); - if (sz > 0) { - szw = write(fdo, buf, sz); - xxxassert(szw == sz); - } - } while (sz > 0); - closefd(&fdo); - closefd(&vp->fd); - } -} - -void -vext_load(void) -{ - struct vext *vp; - - VTAILQ_FOREACH(vp, &vext_list, list) { - vp->dlptr = dlopen( - VSB_data(vp->vsb), - RTLD_NOW | RTLD_GLOBAL - ); - if (vp->dlptr == NULL) { - XXXAN(vp->dlptr); - } - fprintf(stderr, "Loaded -E %s\n", VSB_data(vp->vsb)); - } -} - -void -vext_cleanup(void) -{ - struct vext *vp; - - VTAILQ_FOREACH(vp, &vext_list, list) { - fprintf(stderr, "ee3 %s\n", VSB_data(vp->vsb)); - if (vp->vsb != NULL && VSB_len(vp->vsb) > 0) { - XXXAZ(unlink(VSB_data(vp->vsb))); - VSB_clear(vp->vsb); - } - } -} diff --git a/bin/varnishd/common/heritage.h b/bin/varnishd/common/heritage.h index af312b265..8244f8046 100644 --- a/bin/varnishd/common/heritage.h +++ b/bin/varnishd/common/heritage.h @@ -129,9 +129,3 @@ extern vsm_lock_f *vsc_unlock; extern vsm_lock_f *vsmw_lock; extern vsm_lock_f *vsmw_unlock; -/* common/common_vext.c */ - -void vext_argument(const char *); -void vext_copyin(struct vsb *); -void vext_load(void); -void vext_cleanup(void); diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c index 7a218fc42..17c80cf67 100644 --- a/bin/varnishd/mgt/mgt_child.c +++ b/bin/varnishd/mgt/mgt_child.c @@ -378,8 +378,6 @@ mgt_launch_child(struct cli *cli) heritage.cls = mgt_cls; heritage.ident = VSB_data(vident) + 1; - vext_load(); - VJ_subproc(JAIL_SUBPROC_WORKER); heritage.proc_vsmw = VSMW_New(heritage.vsm_fd, 0640, "_.index"); @@ -387,7 +385,7 @@ mgt_launch_child(struct cli *cli) /* * We pass these two params because child_main needs them - * well before it has found its own param struct. + * Well before it has found its own param struct. */ child_main(mgt_param.sigsegv_handler, mgt_param.wthread_stacksize); diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c index cc09cb06f..b49bebb09 100644 --- a/bin/varnishd/mgt/mgt_main.c +++ b/bin/varnishd/mgt/mgt_main.c @@ -74,7 +74,7 @@ static char *workdir; static struct vfil_path *vcl_path = NULL; -static const char opt_spec[] = "?a:b:CdE:f:Fh:i:I:j:l:M:n:P:p:r:S:s:T:t:VW:x:"; +static const char opt_spec[] = "?a:b:Cdf:Fh:i:I:j:l:M:n:P:p:r:S:s:T:t:VW:x:"; /*--------------------------------------------------------------------*/ @@ -123,7 +123,6 @@ usage(void) printf(FMT, "-P file", "PID file"); printf(FMT, "-i identity", "Identity of varnish instance"); printf(FMT, "-I clifile", "Initialization CLI commands"); - printf(FMT, "-E extension", "Load extension"); printf("\nTuning options:\n"); @@ -285,9 +284,7 @@ mgt_Cflag_atexit(void) /* Only master process */ if (getpid() != heritage.mgt_pid) return; - vext_cleanup(); VJ_rmdir("vmod_cache"); - VJ_rmdir("vext_cache"); (void)chdir("/"); VJ_rmdir(workdir); } @@ -663,7 +660,6 @@ main(int argc, char * const *argv) W_arg = optarg; break; case 'a': - case 'E': case 'f': case 'I': case 'p': @@ -756,9 +752,6 @@ main(int argc, char * const *argv) if (*alp->val != '\0') alp->priv = mgt_f_read(alp->val); break; - case 'E': - vext_argument(alp->val); - break; case 'I': VJ_master(JAIL_MASTER_FILE); I_fd = open(alp->val, O_RDONLY); @@ -828,7 +821,6 @@ main(int argc, char * const *argv) VJ_master(JAIL_MASTER_SYSTEM); AZ(system("rm -rf vmod_cache")); - AZ(system("rm -rf vext_cache")); VJ_master(JAIL_MASTER_LOW); if (VJ_make_subdir("vmod_cache", "VMOD cache", NULL)) { @@ -837,13 +829,6 @@ main(int argc, char * const *argv) workdir, VAS_errtxt(errno)); } - if (arg_list_count("E") && - VJ_make_subdir("vext_cache", "VMOD cache", NULL)) { - ARGV_ERR( - "Cannot create vmod directory (%s/vext_cache): %s\n", - workdir, VAS_errtxt(errno)); - } - if (C_flag) AZ(atexit(mgt_Cflag_atexit)); @@ -896,8 +881,6 @@ main(int argc, char * const *argv) VPF_Write(alp->priv); } - vext_copyin(vident); - AZ(VSB_finish(vident)); if (S_arg == NULL) @@ -985,10 +968,6 @@ main(int argc, char * const *argv) MGT_Complain(C_INFO, "manager dies"); mgt_cli_close_all(); VEV_Destroy(&mgt_evb); - VJ_master(JAIL_MASTER_SYSTEM); - vext_cleanup(); - (void)rmdir("vext_cache"); - VJ_master(JAIL_MASTER_LOW); VTAILQ_FOREACH(alp, &arglist, list) { if (!strcmp(alp->arg, "P")) VPF_Remove(alp->priv); From dridi.boukelmoune at gmail.com Mon Mar 7 16:46:06 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 7 Mar 2022 16:46:06 +0000 (UTC) Subject: [master] 8ee09eb96 Start skeleton release notes for the next version. Message-ID: <20220307164606.6C3D6966A8@lists.varnish-cache.org> commit 8ee09eb96c422abe6236280ace85b62813a49a99 Author: Geoff Simmons Date: Tue Sep 25 16:31:17 2018 +0200 Start skeleton release notes for the next version. Restructured so that: * 'Upgrading' is limited to work that has to be done to upgrade from a current deployment to the new version. * 'Changes' is a comprehensive, user-level description of changes and new features. Conflicts: doc/sphinx/whats-new/index.rst diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst new file mode 100644 index 000000000..fbda9d6b9 --- /dev/null +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -0,0 +1,73 @@ +**Note: This is a working document for a future release, with running +updates for changes in the development branch. For changes in the +released versions of Varnish, see:** :ref:`whats-new-index` + +.. _whatsnew_changes_CURRENT: + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Changes in Varnish **$NEXT_RELEASE** +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +For information about updating your current Varnish deployment to the +new version, see :ref:`whatsnew_upgrading_CURRENT`. + +A more detailed and technical account of changes in Varnish, with +links to issues that have been fixed and pull requests that have been +merged, may be found in the `change log`_. + +.. _change log: https://github.com/varnishcache/varnish-cache/blob/master/doc/changes.rst + +varnishd +======== + +Parameters +~~~~~~~~~~ + +**XXX changes in -p parameters** + +Other changes in varnishd +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Changes to VCL +============== + +VCL variables +~~~~~~~~~~~~~ + +**XXX new, deprecated or removed variables, or changed semantics** + +Other changes to VCL +~~~~~~~~~~~~~~~~~~~~ + +VMODs +===== + +**XXX changes in the bundled VMODs** + +varnishlog +========== + +**XXX changes concerning varnishlog(1) and/or vsl(7)** + +varnishadm +========== + +**XXX changes concerning varnishadm(1) and/or varnish-cli(7)** + +varnishstat +=========== + +**XXX changes concerning varnishstat(1) and/or varnish-counters(7)** + +varnishtest +=========== + +**XXX changes concerning varnishtest(1) and/or vtc(7)** + +Changes for developers and VMOD authors +======================================= + +**XXX changes concerning VRT, the public APIs, source code organization, +builds etc.** + +*eof* diff --git a/doc/sphinx/whats-new/index.rst b/doc/sphinx/whats-new/index.rst index 6257163eb..bab1f3904 100644 --- a/doc/sphinx/whats-new/index.rst +++ b/doc/sphinx/whats-new/index.rst @@ -13,6 +13,19 @@ This section describes the changes and improvements between different versions of Varnish, and what upgrading between the different versions entail. +Varnish **$NEXT_RELEASE** +------------------------- + +**Note: These are working documents for a future release, with running +updates for changes in the development branch. For changes in the +released versions of Varnish, see the chapters listed below.** + +.. toctree:: + :maxdepth: 2 + + changes-trunk + upgrading-trunk + Varnish 7.0 ----------- diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-trunk.rst new file mode 100644 index 000000000..6143fde99 --- /dev/null +++ b/doc/sphinx/whats-new/upgrading-trunk.rst @@ -0,0 +1,33 @@ +**Note: This is a working document for a future release, with running +updates for changes in the development branch. For changes in the +released versions of Varnish, see:** :ref:`whats-new-index` + +.. _whatsnew_upgrading_CURRENT: + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Upgrading to Varnish **$NEXT_RELEASE** +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +**XXX: how to upgrade from previous deployments to this +version. Limited to work that has to be done for an upgrade, new +features are listed in "Changes". Explicitly mention what does *not* +have to be changed, especially in VCL. May include, but is not limited +to:** + +* Elements of VCL that have been removed or are deprecated, or whose + semantics have changed. + +* -p parameters that have been removed or are deprecated, or whose + semantics have changed. + +* Changes in the CLI. + +* Changes in the output or interpretation of stats or the log, including + changes affecting varnishncsa/-hist/-top. + +* Changes that may be necessary in VTCs or in the use of varnishtest. + +* Changes in public APIs that may require changes in VMODs or VAPI/VUT + clients. + +*eof* From dridi.boukelmoune at gmail.com Tue Mar 8 11:54:08 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 8 Mar 2022 11:54:08 +0000 (UTC) Subject: [master] 602ff6014 param: Mention aliases in param.show [-j] output Message-ID: <20220308115408.C59AB65DFB@lists.varnish-cache.org> commit 602ff6014c6701fe7b1b0cd824bf269b2e117842 Author: Dridi Boukelmoune Date: Tue Mar 8 08:56:31 2022 +0100 param: Mention aliases in param.show [-j] output Working on the release notes I realized that there was nothing actionable to prepare for deprecated aliases in future releases. diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c index 1ea94da54..0aae0c75f 100644 --- a/bin/varnishd/mgt/mgt_param.c +++ b/bin/varnishd/mgt/mgt_param.c @@ -248,7 +248,7 @@ static void v_matchproto_(cli_func_t) mcf_param_show(struct cli *cli, const char * const *av, void *priv) { struct plist *pl; - const struct parspec *pp; + const struct parspec *pp, *pa; int n, lfmt = 0, chg = 0; struct vsb *vsb; const char *show = NULL; @@ -316,6 +316,11 @@ mcf_param_show(struct cli *cli, const char * const *av, void *priv) } VCLI_Out(cli, "\n"); + if (lfmt && pp->func == tweak_alias) { + pa = TRUST_ME(pp->priv); + VCLI_Out(cli, "%-*sAlias of: %s\n", + margin1, " ", pa->name); + } if (lfmt && pp->flags & NOT_IMPLEMENTED) { VCLI_Out(cli, "\n"); mcf_wrap(cli, NOT_IMPLEMENTED_TEXT); @@ -373,7 +378,7 @@ mcf_param_show_json(struct cli *cli, const char * const *av, void *priv) { int n, comma = 0, chg = 0; struct plist *pl; - const struct parspec *pp; + const struct parspec *pp, *pa; struct vsb *vsb, *def; const char *show = NULL, *sep; @@ -432,6 +437,10 @@ mcf_param_show_json(struct cli *cli, const char * const *av, void *priv) VCLI_Out(cli, "{\n"); VSB_indent(cli->sb, 2); mcf_json_key_valstr(cli, "name", pp->name); + if (pp->func == tweak_alias) { + pa = TRUST_ME(pp->priv); + mcf_json_key_valstr(cli, "alias", pa->name); + } if (pp->flags & NOT_IMPLEMENTED) { VCLI_Out(cli, "\"implemented\": false\n"); VSB_indent(cli->sb, -2); From dridi.boukelmoune at gmail.com Tue Mar 8 11:54:08 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 8 Mar 2022 11:54:08 +0000 (UTC) Subject: [master] 3d37be584 whats-new: First pass on changes since 7.0.0 Message-ID: <20220308115408.E819A65DFD@lists.varnish-cache.org> commit 3d37be58422e273ec5d35ef393dfaf16ac3f2539 Author: Dridi Boukelmoune Date: Tue Mar 8 09:06:57 2022 +0100 whats-new: First pass on changes since 7.0.0 diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index fbda9d6b9..d28b288b1 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -23,51 +23,183 @@ varnishd Parameters ~~~~~~~~~~ -**XXX changes in -p parameters** +A new kind of parameters exists: deprecated aliases. Their documentation is +minimal, mainly referring to the actual symbols they alias. They are not +listed in the CLI, unless referred to explicitly. + +There is no deprecated alias yet, but some are already planned for future +releases. Alias parameters have next to no overhead when used directly. + +The deprecated ``vsm_space`` parameter was removed. + +A new ``cc_warnings`` parameter contains a subset of the compiler flags +extracted from ``cc_command``, which in turn grew new expansions: + +- ``%d``: the raw default ``cc_command`` +- ``%D``: the expanded default ``cc_command`` +- ``%w``: the ``cc_warnings`` parameter +- ``%n``: the working directory (``-n`` option) + +This should facilitate the creation of wrapper scripts around VCL compilation. + +There is a new ``experimental`` parameter that is identical to the ``feature`` +parameter, except that it guards features that may not be considered complete +or stable. An experimental feature may be promoted to a regular feature or +dropped without being considered a breaking change. + +Command line options +~~~~~~~~~~~~~~~~~~~~ + +The deprecated sub-argument of the ``-l`` option was removed, it is now a +shorthand for the ``vsl_space`` parameter only. + +The ``-T``, ``-M`` and ``-P`` command line options can be used multiple times, +instead of retaining only the last occurrence. + +When there is no active VCL, the first loaded VCL was always implicitly used +too. This is now only true for VCLs loaded with either the ``-f`` or ``-b`` +options, since they imply a ``vcl.use``. VCL loaded through the Varnish CLI +(``vcl.load`` or ``vcl.inline``) via a CLI script loaded through the ``-I`` +command line option require an explicit ``vcl.use``. Other changes in varnishd ~~~~~~~~~~~~~~~~~~~~~~~~~ +ESI includes now support the ``onerror="continue"`` attribute. However, in +order to take effect a new ``+esi_include_onerror`` feature flag needs to be +raised. + Changes to VCL ============== +It is now possible to assign a ``BODY`` variable with either a ``STRING`` type +or a ``BLOB``. + VCL variables ~~~~~~~~~~~~~ -**XXX new, deprecated or removed variables, or changed semantics** +New VCL variables to track the beginning of HTTP messages: + +- ``req.time`` +- ``req_top.time`` +- ``resp.time`` +- ``bereq.time`` +- ``beresp.time`` +- ``obj.time`` + +New ``req.transport`` which returns "HTTP/1" or "HTTP/2" as appropriate. Other changes to VCL ~~~~~~~~~~~~~~~~~~~~ +Where a regular expression literal is expected, it is now possible to have a +concatenation of constant strings. It can be useful when part of the +expression comes from an environment-specific include, or to break a long +expression into multiple lines. + +Similarly to ``varnishd`` parameters, it is now possible to have deprecated +aliases of VCL variables. Although there are none so far, aliases will allow +some symbols to be renamed without immediately breaking existing VCL code. + +Deprecated VCL aliases have no runtime overhead, they are reified at VCL +compile time. + VMODs ===== -**XXX changes in the bundled VMODs** +New :ref:`std.strftime()` function for UTC formatting. + +It is now possible to declare deprecated aliases of VMOD functions and object +methods, just like VCL aliases. The ``cookie.format_rfc1123()`` was renamed to +:ref:`cookie.format_date()`, and the former was retained as a deprecated alias +of the latter for compatibility. + +Deprecated VMOD aliases have no runtime overhead, they are reified at VCL +compile time. varnishlog ========== -**XXX changes concerning varnishlog(1) and/or vsl(7)** +It is now possible to write to the standard output with ``-w -``, to be on par +with the ability to read from the standard input with ``-r -``. This is not +possible in daemon mode. + +In a pipe scenario, the backend transaction emits a Start timestamp and both +client and backend transactions emit the Process timestamp. + +varnishncsa +=========== + +It is now possible to write to the standard output with ``-w -``, to be on par +with the ability to read from the standard input with ``-r -``. This is not +possible in daemon mode. varnishadm ========== -**XXX changes concerning varnishadm(1) and/or varnish-cli(7)** +When ``vcl.show`` is invoked without a parameter, it defaults to the active +VCL. -varnishstat -=========== +The ``param.set`` command accepts a ``-j`` option. In this case the JSON +output is the same as ``param.show -j`` of the updated parameter. -**XXX changes concerning varnishstat(1) and/or varnish-counters(7)** +A new ``debug.shutdown.delay`` command is available in the Varnish CLI for +testing purposes. It can be useful for testing purposes to see how its +environment (service manager, container orchestrator, etc) reacts to a +``varnishd``'s child process taking significant time to ``stop``. varnishtest =========== -**XXX changes concerning varnishtest(1) and/or vtc(7)** +The ``SO_RCVTIMEO_WORKS`` feature check is gone. + +The reporting of ``logexpect`` events was rearranged for readability. + +XXX: mention the logexpect abort trigger? (it's not documented) + +The ``vtc.barrier_sync()`` VMOD function can be used in ``vcl_init`` from now +on. Changes for developers and VMOD authors ======================================= -**XXX changes concerning VRT, the public APIs, source code organization, -builds etc.** +The ``SO_RCVTIMEO`` and ``SO_SNDTIMEO`` socket options are now required at +build time since their absence would otherwise prevent some timeouts to take +effect. We no longer check whether they effectively work, hence the removal of +the ``SO_RCVTIMEO_WORKS`` feature check in ``varnishtest``. + +Varnish will use libunwind by default when available at configure time, the +``--without-unwind`` configure flag can prevent this and fall back to +libexecinfo to generate backtraces. + +There is a new debug storage backend for testing purposes. So far, it can only +be used to ensure that allocation attempts return less space than requested. + +There are new C macros for ``VCL_STRANDS`` creation: ``TOSTRAND()`` and +``TOSTRANDS()`` are available in ``vrt.h``. + +New utility macros ``vmin[_t]``, ``vmax[_t]`` and ``vlimit[_t]`` available in +``vdef.h``. + +The fetch and delivery filters should now be registered and unregistered with +``VRT_AddFilter()`` and ``VRT_RemoveFilter()``. + +Dynamic backends are now reference-counted, and VMOD authors must explicitly +track assignments with ``VRT_Assign_Backend()``. + +The ``vtc.workspace_reserve()`` VMOD function will zero memory from now on. + +When the ``+workspace`` debug flag is raised, workspace logs are no longer +emitted as raw logs disconnected from the task. Having workspace logs grouped +with the rest of the task should help workspace footprint analysis. + +It is possible to generate of arbitrary log lines with ``vtc.vsl_replay()``, +which can help testing log processing utilities. + +It is also possible to tweak the VXID cache chunk size per thread pool with +the ``debug.xid`` command for the Varnish CLI, which can also help testing +log processing utilities. + +``http_IsHdr()`` is now exposed as part of the strict ABI for VMODs. *eof* From dridi.boukelmoune at gmail.com Tue Mar 8 11:54:09 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 8 Mar 2022 11:54:09 +0000 (UTC) Subject: [master] 46629b2fb whats-new: First pass on upgrade notes since 7.0.0 Message-ID: <20220308115409.2906B65E01@lists.varnish-cache.org> commit 46629b2fbfc37f232d1184bc0dade94904c8bef0 Author: Dridi Boukelmoune Date: Tue Mar 8 12:49:03 2022 +0100 whats-new: First pass on upgrade notes since 7.0.0 diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-trunk.rst index 6143fde99..2ceed9c0c 100644 --- a/doc/sphinx/whats-new/upgrading-trunk.rst +++ b/doc/sphinx/whats-new/upgrading-trunk.rst @@ -30,4 +30,117 @@ to:** * Changes in public APIs that may require changes in VMODs or VAPI/VUT clients. +varnishd +======== + +Varnish now has an infrastructure in place to rename parameters or VCL +variables while keeping a deprecated alias for compatibility. + +Parameters +~~~~~~~~~~ + +There are plans to rename certain arguments. When this happens, aliases will +not be listed by ``param.show [-j|-l]`` commands, but they will be displayed +by ``param.show [-j] ``. Systems operating on top of ``varnishadm`` or +the Varnish CLI can be updated to anticipate this change with the help of the +``deprecated_dummy`` parameter added for testing purposes. + +The deprecated ``vsm_space`` parameter was removed. It was ignored and having +no effect since Varnish 6.0.0 and should have disappeared with the 7.0.0 +release. The sub-argument of the ``-l`` command line option that was used as +a shorthand for ``vsm_space`` is also no longer accepted. + +Command line options +~~~~~~~~~~~~~~~~~~~~ + +A common pattern when a CLI script is used during startup is to combine the +``-I`` option with ``-f ''`` to prevent prevent an automatic startup of the +cache process. In this case a start command is usually present in the CLI +script, most likely as the last command. + +This enables loading VCLs and potentially VCL labels which require a specific +order if the active VCL is supposed to switch execution to labels. VCL loaded +through the CLI script is no longer implicitly used if there is no active VCL +yet. If no VCL was loaded through the ``-b`` or ``-f`` options it means that +an explicit ``vcl.use`` command is needed before the ``start`` command. + +In the scenario described above, that would already be the case since the +desired active VCL would likely need to be loaded last, not eligible for an +implicit ``vcl.use`` since dependencies were loaded first. This change should +not affect existing ``-I`` scripts, but if it does, simply add the missing +``vcl.use`` command. + +Other changes in varnishd +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ESI parser now recognizes the ``onerror="continue"`` attribute of the +```` XML tag. Other values than "continue" are simply ignored. +Continuing has always been Varnish's behavior for ESI sub-requests, so this +behavior is guarded by a new ``+esi_include_onerror`` feature flag. + +It means that by default, the top request will continue processing ESI +fragments even if one failed during delivery. The parsing always takes the +attribute, and the feature flag only controls whether to honor it or not. + +This means that the persistence of ESI objects changed and does not tolerate +downgrades. ESI persisted before support for this attribute assumes a lack of +such attribute and will abort the delivery if the flag is raised. + +varnishtest +=========== + +The deprecated ``err_shell`` command was removed, use ``shell -err`` instead. + +Changes for developers and VMOD authors +======================================= + +Backends +~~~~~~~~ + +Backends have reference counters now to avoid the uncertainty of a task +holding onto a dynamic backend for a long time, for example in the waiting +list, with the risk of the backend going away during the transaction. + +Assignments should be replaced as such:: + + -lvalue = expr; + +VRT_Assign_Backend(&lvalue, expr); + +It doesn't have to be strictly assigned this way, as long as when presented to +a VMOD a backend is accounted for as long as it is referenced. + +XXX: there should be a coccinelle patch to help. + +On the other hand, if a backend is created dynamically but is guaranteed by +the VMOD not to be removed before its owning VCL is discarded, it can opt out +of reference counting with ``VRT_StaticDirector()``. + +Filters +~~~~~~~ + +Two new functions ``VRT_AddFilter()`` and ``VRT_RemoveFilter()`` manage +filters as pairs. When used as pairs, the filters must have the same name, +otherwise operating with only one fetch or delivery filter is fine. + +Unlike its deprecated predecessors ``VRT_AddVFP()`` and ``VRT_AddVDP()``, +the new ``VRT_AddFilter()`` returns an error string. The ``VRT_RemoveVFP()`` +and ``VRT_RemoveVDP()`` functions are also deprecated an simply thin wrapper +lacking error handling around the new functions. + +VMOD deprecated aliases +~~~~~~~~~~~~~~~~~~~~~~~ + +A VMOD author can from now on rename a function or object method without +immediately breaking compatibility by declaring the old name as an alias. + +In the VMOD descriptor, it is possible to add the following stanza:: + + $Alias deprecated_function original_function + + or + + $Alias .deprecated_method objec.original_method + +This is a good occasion to revisit unfortunate name choices in existing VMODs. + *eof* From dridi.boukelmoune at gmail.com Wed Mar 9 10:15:08 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 9 Mar 2022 10:15:08 +0000 (UTC) Subject: [master] 7328c2e31 doc: Drop stale references to cloud images Message-ID: <20220309101508.BA5326E796@lists.varnish-cache.org> commit 7328c2e31085dc4ebbc64be063b1fa97d24667da Author: Dridi Boukelmoune Date: Wed Mar 9 07:44:28 2022 +0100 doc: Drop stale references to cloud images diff --git a/doc/sphinx/installation/cloud_debian.rst b/doc/sphinx/installation/cloud_debian.rst deleted file mode 100644 index f9d8c2353..000000000 --- a/doc/sphinx/installation/cloud_debian.rst +++ /dev/null @@ -1,57 +0,0 @@ -.. - Copyright (c) 2019 Varnish Software AS - SPDX-License-Identifier: BSD-2-Clause - See LICENSE file for full text of license - -.. _cloud-debian: - -Debian cloud images -------------------- - -Varnish Cache is also made available by Varnish Software in the following -clouds providers: - -Amazon Web Services (AWS EC2) -............................. - -Here is a list of the currently available images for Ubuntu LTS on -Amazon Web Services (AWS) Elastic Compute Cloud (EC2): - -* `Varnish Cache 4 on Ubuntu LTS 14.04 on AWS`_ -* `Varnish Cache 5 on Ubuntu LTS 14.04 on AWS`_ - -.. _`Varnish Cache 4 on Ubuntu LTS 14.04 on AWS`: https://aws.amazon.com/marketplace/pp/B01H2063F6 -.. _`Varnish Cache 5 on Ubuntu LTS 14.04 on AWS`: https://aws.amazon.com/marketplace/pp/B01MU4VLOA - -Microsoft Azure -............... - -Here is a list of the currently available images for Ubuntu LTS on -Microsoft's Azure cloud: - -* `Varnish Cache 4 and 5 on Ubuntu LTS 14.04 on Azure`_ - -.. _`Varnish Cache 4 and 5 on Ubuntu LTS 14.04 on Azure`: https://azuremarketplace.microsoft.com/en-us/marketplace/apps/varnish.varnish-cache_ - -Google Cloud Platform (GCP) -........................... - -Here is a list of the currently available images for Ubuntu LTS on -Google Cloud Platform (GCP): - -* `Varnish Cache 4 on Ubuntu LTS 14.04 on GCP`_ -* `Varnish Cache 5 on Ubuntu LTS 14.04 on GCP`_ - -.. _`Varnish Cache 4 on Ubuntu LTS 14.04 on GCP`: https://console.cloud.google.com/launcher/details/varnish-public/varnish-cache-4-payg-ubuntu -.. _`Varnish Cache 5 on Ubuntu LTS 14.04 on GCP`: https://console.cloud.google.com/launcher/details/varnish-public/varnish-cache-5-payg-ubuntu - -UPLEX Packages with vmods -......................... - -`UPLEX`_ provides packages of varnish-cache and various vmods for -Debian, Ubuntu and RHEL/CentOS - -* `UPLEX Packages`_ - -.. _`UPLEX Packages`: https://pkg.uplex.de/ -.. _`UPLEX`: https://uplex.de/#anchorvarnish diff --git a/doc/sphinx/installation/cloud_redhat.rst b/doc/sphinx/installation/cloud_redhat.rst deleted file mode 100644 index 8f2f95cf3..000000000 --- a/doc/sphinx/installation/cloud_redhat.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. - Copyright (c) 2019 Varnish Software AS - SPDX-License-Identifier: BSD-2-Clause - See LICENSE file for full text of license - -.. _cloud-redhat: - -RedHat Cloud images -=================== - -Varnish Cache is also made available by Varnish Software in the following -clouds providers: - - -Amazon Web Services (AWS EC2) -............................. - -Here is a list of the currently available images for RHEL7 on -Amazon Web Services (AWS) Elastic Compute Cloud (EC2): - -* `Varnish Cache 4 on Red Hat Enterprise Linux 7 on AWS`_ -* `Varnish Cache 5 on Red Hat Enterprise Linux 7 on AWS`_ - -.. _`Varnish Cache 4 on Red Hat Enterprise Linux 7 on AWS`: https://aws.amazon.com/marketplace/pp/B01H2061O4 -.. _`Varnish Cache 5 on Red Hat Enterprise Linux 7 on AWS`: https://aws.amazon.com/marketplace/pp/B01MR09UKM - - -Microsoft Azure -............... - -Here is a list of the currently available images for RHEL7 on -Microsoft's Azure cloud: - -* `Varnish Cache 4 and 5 on Red Hat Enterprise Linux 7 on Azure`_ - -.. _`Varnish Cache 4 and 5 on Red Hat Enterprise Linux 7 on Azure`: https://azuremarketplace.microsoft.com/en-us/marketplace/apps/varnish.varnish-cache_ - - -Google Cloud Platform (GCP) -........................... - -Here is a list of the currently available images for RHEL7 on -Google Cloud Platform (GCP): - -* `Varnish Cache 4 on Red Hat Enterprise Linux 7 on GCP`_ -* `Varnish Cache 5 on Red Hat Enterprise Linux 7 on GCP`_ - -.. _`Varnish Cache 4 on Red Hat Enterprise Linux 7 on GCP`: https://console.cloud.google.com/launcher/details/varnish-public/varnish-cache-4-payg-red-hat -.. _`Varnish Cache 5 on Red Hat Enterprise Linux 7 on GCP`: https://console.cloud.google.com/launcher/details/varnish-public/varnish-cache-5-payg-red-hat - diff --git a/doc/sphinx/installation/cloud_ubuntu.rst b/doc/sphinx/installation/cloud_ubuntu.rst deleted file mode 100644 index 1df5beb12..000000000 --- a/doc/sphinx/installation/cloud_ubuntu.rst +++ /dev/null @@ -1,48 +0,0 @@ -.. - Copyright (c) 2019 Varnish Software AS - SPDX-License-Identifier: BSD-2-Clause - See LICENSE file for full text of license - -.. _cloud-ubuntu: - -Ubuntu Cloud images -------------------- - -Varnish Cache is also made available by Varnish Software in the following -clouds providers: - -Amazon Web Services (AWS EC2) -............................. - -Here is a list of the currently available images for Ubuntu LTS on -Amazon Web Services (AWS) Elastic Compute Cloud (EC2): - -* `Varnish Cache 4 on Ubuntu LTS 14.04 on AWS`_ -* `Varnish Cache 5 on Ubuntu LTS 14.04 on AWS`_ - -.. _`Varnish Cache 4 on Ubuntu LTS 14.04 on AWS`: https://aws.amazon.com/marketplace/pp/B01H2063F6 -.. _`Varnish Cache 5 on Ubuntu LTS 14.04 on AWS`: https://aws.amazon.com/marketplace/pp/B01MU4VLOA - -Microsoft Azure -............... - -Here is a list of the currently available images for Ubuntu LTS on -Microsoft's Azure cloud: - -* `Varnish Cache 4 and 5 on Ubuntu LTS 14.04 on Azure`_ - -.. _`Varnish Cache 4 and 5 on Ubuntu LTS 14.04 on Azure`: https://azuremarketplace.microsoft.com/en-us/marketplace/apps/varnish.varnish-cache_ - -Google Cloud Platform (GCP) -........................... - -Here is a list of the currently available images for Ubuntu LTS on -Google Cloud Platform (GCP): - -* `Varnish Cache 4 on Ubuntu LTS 14.04 on GCP`_ -* `Varnish Cache 5 on Ubuntu LTS 14.04 on GCP`_ - -.. _`Varnish Cache 4 on Ubuntu LTS 14.04 on GCP`: https://console.cloud.google.com/launcher/details/varnish-public/varnish-cache-4-payg-ubuntu -.. _`Varnish Cache 5 on Ubuntu LTS 14.04 on GCP`: https://console.cloud.google.com/launcher/details/varnish-public/varnish-cache-5-payg-ubuntu - -(this is left here to avoid linkrot) diff --git a/doc/sphinx/installation/install.rst b/doc/sphinx/installation/install.rst index 5acb0cc59..3033ffbde 100644 --- a/doc/sphinx/installation/install.rst +++ b/doc/sphinx/installation/install.rst @@ -27,17 +27,6 @@ is highly operating system specific: install_openbsd install_redhat -Cloud images of Varnish -======================= - -.. toctree:: - :maxdepth: 2 - - cloud_debian - cloud_redhat - cloud_ubuntu - - Compiling Varnish from source ============================= From dridi.boukelmoune at gmail.com Wed Mar 9 10:15:08 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 9 Mar 2022 10:15:08 +0000 (UTC) Subject: [master] 8f11c9252 doc: Move away from el8 or later Message-ID: <20220309101508.DC1FF6E79B@lists.varnish-cache.org> commit 8f11c92523c6808edbf03a3922ceec8af95ee3c3 Author: Dridi Boukelmoune Date: Wed Mar 9 11:13:18 2022 +0100 doc: Move away from el8 or later diff --git a/doc/sphinx/installation/install_redhat.rst b/doc/sphinx/installation/install_redhat.rst index 2baaaeb34..5a7614b10 100644 --- a/doc/sphinx/installation/install_redhat.rst +++ b/doc/sphinx/installation/install_redhat.rst @@ -13,19 +13,17 @@ Varnish is included in the `EPEL incompatible syntax changes in newer versions of Varnish, only older versions are available. -We therefore recommend that you install the latest version directly from our repository, as described above. +We therefore recommend that you install the latest version directly from our +repository, as described above. Varnish Cache is packaged in RPMs for easy installation and upgrade on Red Hat systems. The Varnish Cache project maintains official packages for the current -Enterprise Linux versions. Varnish Cache 6.x series are supported on el7 and el8. +Enterprise Linux versions. Varnish Cache 6.x series are supported on el7. -We try to keep the latest version available as prebuilt RPMs (el7 and el8) -on `packagecloud.io/varnishcache `_. +We try to keep the latest version available as prebuilt RPMs on +`packagecloud.io/varnishcache `_. -Starting with el8 a DNF module will inhibit Varnish packages, and the solution -is to disable the module before installing:: - - dnf module disable varnish +We no longer provide RPM packages for el8 or later. Official packages of 6 ---------------------- @@ -46,6 +44,12 @@ With the release of 6.0.2, users have to switch to switch repositories to get the latest version. Read more about this on `Release 6.0.2 `_. +We still provide el8 packages for Varnish Cache 6.0 LTS, but so does Red Hat. +Their el8 package is provided as a DNF module that inhibits our packages, and +the solution is to disable the module before installing:: + + dnf module disable varnish + External packaging ------------------ @@ -53,6 +57,14 @@ Varnish Cache is also distributed in third party package repositories. .. _`Fedora EPEL`: https://fedoraproject.org/wiki/EPEL +.. _`Software Collections 2.1`: http://developers.redhat.com/blog/2015/11/17/software-collections-2-1-generally-available/ + +.. _`provides`: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.0_release_notes/rhel-8_0_0_release#BZ-1633338 + + * `Fedora EPEL`_ does community packaging of Varnish Cache. -* RedHat has packaged versions of Varnish Cache available since Software Collections 2.1. Announcement on . +* Red Hat has packaged versions of Varnish Cache available since + `Software Collections 2.1`_. + +* Red Hat provides_ Varnish Cache 6.0 LTS on el8. From dridi.boukelmoune at gmail.com Wed Mar 9 10:15:09 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Wed, 9 Mar 2022 10:15:09 +0000 (UTC) Subject: [master] 03f019ee6 whats-new: Drop el8 packages Message-ID: <20220309101509.082B76E7A0@lists.varnish-cache.org> commit 03f019ee69f51ecefd69b2d707a71a0fcfb98bd1 Author: Dridi Boukelmoune Date: Wed Mar 9 11:13:50 2022 +0100 whats-new: Drop el8 packages diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index d28b288b1..8cd6afdc8 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -202,4 +202,12 @@ log processing utilities. ``http_IsHdr()`` is now exposed as part of the strict ABI for VMODs. +Platform Support +================ + +With the End of Life of CentOS 8, there will be no more packages for Red Hat +Enterprise Linux 8 and its derivatives. We track CentOS Stream in Continuous +Integration so Varnish Cache is expected to work on this platform, but there +will be no el8 packages from now on. + *eof* From dridi.boukelmoune at gmail.com Thu Mar 10 16:00:09 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 10 Mar 2022 16:00:09 +0000 (UTC) Subject: [master] f7bd22658 vcc: Remove spurious assertion Message-ID: <20220310160009.9DB31A55F5@lists.varnish-cache.org> commit f7bd22658ca9c2459db8268c55268345ca20b5e7 Author: Dridi Boukelmoune Date: Thu Mar 10 16:58:13 2022 +0100 vcc: Remove spurious assertion Refs #3788 diff --git a/bin/varnishtest/tests/v00016.vtc b/bin/varnishtest/tests/v00016.vtc index 8404b2552..0001c186d 100644 --- a/bin/varnishtest/tests/v00016.vtc +++ b/bin/varnishtest/tests/v00016.vtc @@ -101,6 +101,12 @@ varnish v1 -errvcl {Expected ')' got '-'} { } } +varnish v1 -errvcl {Expression has type BODY, expected BOOL} { + sub vcl_synth { + if (resp.body) { } + } +} + varnish v1 -errvcl {Expression has type directors.shard, expected ACL} { import directors; backend b none; diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c index c4e0380b8..677e36dbb 100644 --- a/lib/libvcc/vcc_expr.c +++ b/lib/libvcc/vcc_expr.c @@ -1419,8 +1419,6 @@ vcc_expr0(struct vcc *tl, struct expr **e, vcc_type_t fmt) vcc_expr_cor(tl, e, fmt); ERRCHK(tl); - assert((*e)->fmt != BODY); - if ((*e)->fmt == fmt) return; From dridi.boukelmoune at gmail.com Fri Mar 11 10:31:07 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 11 Mar 2022 10:31:07 +0000 (UTC) Subject: [master] 20824dc0f vtc: Reduce the window size in r3159 Message-ID: <20220311103107.9947D9692E@lists.varnish-cache.org> commit 20824dc0f75c71dbcd0a2edc83bc88c1b8293641 Author: Dridi Boukelmoune Date: Fri Mar 11 11:28:58 2022 +0100 vtc: Reduce the window size in r3159 It was increased in 635f9f20c6837255ccc5ee5034708aecd1672e1c to avoid sanitizer suppressions to scroll out of screen the lines we expect to find, but on some 32bit ARM system it makes the test even less stable. diff --git a/bin/varnishtest/tests/r03159.vtc b/bin/varnishtest/tests/r03159.vtc index e9862782b..b25a18597 100644 --- a/bin/varnishtest/tests/r03159.vtc +++ b/bin/varnishtest/tests/r03159.vtc @@ -10,7 +10,7 @@ shell { EOF } -process p1 -winsz 200 80 -log { +process p1 -winsz 100 80 -log { varnishd -F -n "${tmpdir}/t" -a "${tmpdir}/sock" \ -p vcc_err_unref=off -f "${tmpdir}/unref.vcl" 2>&1 } -start From dridi.boukelmoune at gmail.com Fri Mar 11 10:39:04 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 11 Mar 2022 10:39:04 +0000 (UTC) Subject: [master] db7776e62 vtc.7: Document process -winsz LIN COL Message-ID: <20220311103904.8948496ED2@lists.varnish-cache.org> commit db7776e621931313357165a50940664c25443b7a Author: Dridi Boukelmoune Date: Fri Mar 11 11:37:19 2022 +0100 vtc.7: Document process -winsz LIN COL diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c index 1fbcc4650..4f6356b34 100644 --- a/bin/varnishtest/vtc_process.c +++ b/bin/varnishtest/vtc_process.c @@ -910,6 +910,9 @@ process_close(struct process *p) * \-stop * Shorthand for -kill TERM. * + * \-winsz LIN COL + * Change the terminal window size to LIN lines and COL columns. + * * \-write STRING * Write a string to the process' stdin. * From dridi.boukelmoune at gmail.com Fri Mar 11 10:40:06 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Fri, 11 Mar 2022 10:40:06 +0000 (UTC) Subject: [master] 6cbc354df param: Typo Message-ID: <20220311104006.B7EC9970F6@lists.varnish-cache.org> commit 6cbc354df01325863b07540d90282d3bbe5385e5 Author: Dridi Boukelmoune Date: Fri Mar 11 11:39:09 2022 +0100 param: Typo diff --git a/include/tbl/params.h b/include/tbl/params.h index 348b75a06..3e76272b6 100644 --- a/include/tbl/params.h +++ b/include/tbl/params.h @@ -1683,7 +1683,7 @@ PARAM_PCRE2( /*-------------------------------------------------------------------- * Parameter deprecated aliases * - * When a parameter is renamed, but the a deprecated alias is kept for + * When a parameter is renamed, but a deprecated alias is kept for * compatibility, its documentation is minimal: only a description in * manual pages, a description and current value in the CLI. * From nils.goroll at uplex.de Sun Mar 13 18:06:06 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Sun, 13 Mar 2022 18:06:06 +0000 (UTC) Subject: [master] 4c9fa3ada Minor addition to 7.0.1 changelog Message-ID: <20220313180606.E8A3DB0EAD@lists.varnish-cache.org> commit 4c9fa3adaec0e25251ad96a4a4c26dd7bb49f698 Author: Nils Goroll Date: Sun Mar 13 19:02:54 2022 +0100 Minor addition to 7.0.1 changelog diff --git a/doc/changes.rst b/doc/changes.rst index caecc06fa..75c12d24c 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -71,6 +71,10 @@ Varnish Cache 7.0.1 (2021-11-23) * There is now a `configure` build-time requirement on working SO_RCVTIMEO and SO_SNDTIMEO socket options. + We no longer check whether they effectively work, so the + ``SO_RCVTIMEO_WORKS`` feature check has been removed from + ``varnishtest``. + * The socket option inheritance checks now correctly identifies situations where UDS and TCP listening sockets behave differently, and are no longer subject to the order the inheritance checks happens to be From nils.goroll at uplex.de Sun Mar 13 18:06:07 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Sun, 13 Mar 2022 18:06:07 +0000 (UTC) Subject: [master] a77f3d71e Update changelog for next release Message-ID: <20220313180607.2FA7CB0EB1@lists.varnish-cache.org> commit a77f3d71e04705a2c31644f2026413fd455ac03b Author: Nils Goroll Date: Sun Mar 13 19:03:24 2022 +0100 Update changelog for next release Thank you do Dridi for his work on the release documentation. I have gone through all commits and reused some wording of his where appropriate. As before, the changelog should roughly match the commit order (from new to old). diff --git a/doc/changes.rst b/doc/changes.rst index 75c12d24c..a09738826 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -35,15 +35,173 @@ release process. Varnish Cache NEXT (2022-03-15) =============================== -* Added macros ``TOSTRAND(s)`` and ``TOSTRANDS(x, ...)`` to create a - ``struct strands *`` (intended to be used as a ``VCL_STANDS``) from - a single string ``s`` or ``x`` strings, respectively. - - Note that the macros create a local pointer value (on the stack), - which should only be used for local variables and parameters, but - never as a function return value (use ``VRT_AllocStrandsWS()`` for - that or just return a ``VCL_STRING`` result created with - ``VRT_StrandsWS()``). +* The ``cookie.format_rfc1123()`` function was renamed to + ``cookie.format_date()``, and the former was retained as a + deprecated alias. + +* The VCC file ``$Alias`` stanza has been added to support vmod alias + functions/methods. + +* VCC now supports alias symbols. + +* There is a new ``experimental`` parameter that is identical to the + ``feature`` parameter, except that it guards features that may not + be considered complete or stable. An experimental feature may be + promoted to a regular feature or dropped without being considered a + breaking change. + +* ESI includes now support the ``onerror="continue"`` + attribute if the ``+esi_include_onerror`` feature flag is set. + +* The deprecated sub-argument of the ``-l`` option was removed, it is + now a shorthand for the ``vsl_space`` parameter only. + +* The ``-T``, ``-M`` and ``-P`` command line options can be used + multiple times, instead of retaining only the last occurrence. + +* The ``debug.xid`` CLI command has been extended to also set and + query the VXID cache chunk size. + +* The ``vtc.barrier_sync()`` VMOD function now also works in ``vcl_init`` + +* The ``abort`` command in the ``logexpect`` facility of + ``varnishtest`` can now be used to trigger an ``abort()`` to help + debugging the vsl client library code. + +* The ``vtc.vsl()`` and ``vtc.vsl_replay()`` functions have been added + to the vtc vmod to generate arbitraty log lines for testing. + +* The limit of the ``vsl_reclen`` parameter has been corrected. + +* Varnish now closes client connections correctly when request body + processing failed. + +* Filter init methods of types ``vdp_init_f`` and ``vfp_init_f`` + gained a ``VRT_CTX`` argument. + +* The ``param.set`` CLI command accepts a ``-j`` option. In this case + the JSON output is the same as ``param.show -j`` of the updated + parameter. + +* A new ``cc_warnings`` parameter contains a subset of the compiler + flags extracted from ``cc_command``, which in turn grew new + expansions: + + - ``%d``: the raw default ``cc_command`` + - ``%D``: the expanded default ``cc_command`` + - ``%w``: the ``cc_warnings`` parameter + - ``%n``: the working directory (``-n`` option) + +* For ``return(pipe)``, the backend transactions now emit a Start + timestamp and both client and backend transactions emit the Process + timestamp. + +* ``http_IsHdr()`` is now exposed as part of the strict ABI for VMODs. + +* The ``req.transport`` VCL variable has been added, which returns + "HTTP/1" or "HTTP/2" as appropriate. + +* The ``vtc.workspace_reserve()`` VMOD function now zeroes memory. + +* Parameter aliases have been added to facilitate parameter deprecation. + +* Two bugs in the catflap facility have been fixed which could trigger + panics due to the state pointer not being cleared. (3752_, 3755_) + +* It is now possible to assign to a ``BODY`` variable either a + ``STRING`` type or a ``BLOB``. + +* When the ``vcl.show`` CLI command is invoked without a parameter, it + now defaults to the active VCL. + +* The reporting of ``logexpect`` events in ``varnishtest`` was + rearranged for readability. + +* Workspace debugging as enabled by the ``+workspace`` debug flag is + now logged with the corresponding transaction. + +* VMODs should now register and unregister fetch and delivery filters + with ``VRT_AddFilter()`` and ``VRT_RemoveFilter()``. + +* ``HSH_purge()`` has been rewritten to properly handle concurrent + purges on the same object head. + +* ``VSL_WriteOpen()``, ``varnishlog`` and ``varnishncsa`` have been + changed to support writing to stdout with ``-w -`` when not in + daemon mode. + +* In VSL, the case has been optimized that the space remaining in a + buffer is close to ``vsl_reclen``. + +* ``std.ip()`` has been changed to always return a valid (bogo ip) + fallback if the fallback argument is invalid. + +* New VCL variables ``{req,req_top,resp,bereq,beresp,obj}.time`` have + been added to track when the respective object was born. + +* ``VRT_StaticDirector()`` has been added to mark directors with VCL + lifetime, to avoid the overhead of reference counting. + +* Dynamic backends are now reference-counted, and VMOD authors must + explicitly track assignments with ``VRT_Assign_Backend()``. + +* Varnish will use libunwind by default when available at configure + time, the ``--without-unwind`` configure flag can prevent this and + fall back to libexecinfo to generate backtraces. + +* A new ``debug.shutdown.delay`` command is available in the Varnish + CLI for testing purposes. + +* New utility macros ``vmin[_t]``, ``vmax[_t]`` and ``vlimit[_t]`` + available in ``vdef.h``. + +* The macros ``TOSTRAND(s)`` and ``TOSTRANDS(x, ...)`` have been added + to create a ``struct strands *`` (intended to be used as a + ``VCL_STANDS``) from a single string ``s`` or ``x`` strings, + respectively. + + Note that the macros create a compund literal whose scope is the + enclosing block. Their value must thus only be used within the same + block (it can be passed to called functions) and must not be + returned or referenced for use outside the enclosing block. + + As before, ``VRT_AllocStrandsWS()`` or ``VRT_StrandsWS()`` must be + used to create ``VCL_STRANDS`` with *task* scope for use outside the + current block. + +* A bug in the backend connection handling code has been fixed which + could trigger an unwarranted assertion failure (3664_). + +* ``std.strftime()`` has been added. + +* ``Lck_CondWait()`` has lost the timeout argument and now waits + forever. ``Lck_CondWaitUntil()`` and ``Lck_CondWaitTimeout()`` have + been added to wait on a condition variable until some point in time + or until a timeout expires, respectively. + +* All mutex locks in core code have been given the + ``PTHREAD_MUTEX_ERRORCHECK`` attribute. + +* ``Host`` and ``Content-Length`` header checks have been moved to + protocol independent code and thus implicitly extended to HTTP2. + +* A potential race on busy objects has been closed. + +* Use of the ``ObjGetSpace()`` for synthetic objects has been fixed to + support stevedores returning less space than requested (as permitted + by the API). + +* The ``FINI_OBJ()`` macro has been added to standardize the common + pattern of zeroing a mini object and clearing a pointer to it. + +* The deprecated ``vsm_space`` parameter was removed. + +* The ``varnishtest`` ``err_shell`` commando has been removed after + having been deprecated since release 5.1.0. + +.. _3755: https://github.com/varnishcache/varnish-cache/issues/3755 +.. _3752: https://github.com/varnishcache/varnish-cache/issues/3752 +.. _3664: https://github.com/varnishcache/varnish-cache/issues/3664 ================================ Varnish Cache 7.0.1 (2021-11-23) From dridi.boukelmoune at gmail.com Mon Mar 14 10:59:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 14 Mar 2022 10:59:05 +0000 (UTC) Subject: [master] 7048a238c whats-new: Mention systemd changes Message-ID: <20220314105905.4E597A7FA8@lists.varnish-cache.org> commit 7048a238cae09be57776f7bc85c79180502a1405 Author: Dridi Boukelmoune Date: Mon Mar 14 11:56:50 2022 +0100 whats-new: Mention systemd changes Refs varnishcache/pkg-varnish-cache#154 diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index 8cd6afdc8..75d34b2e6 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -205,9 +205,21 @@ log processing utilities. Platform Support ================ +CentOS +~~~~~~ + With the End of Life of CentOS 8, there will be no more packages for Red Hat Enterprise Linux 8 and its derivatives. We track CentOS Stream in Continuous Integration so Varnish Cache is expected to work on this platform, but there will be no el8 packages from now on. +systemd +~~~~~~~ + +The kill mode of the varnish service was changed from ``process`` to ``mixed`` +to ensure that the cache process is killed if the manager process is timed out +by systemd. Otherwise, a race exists if the cache process where a restart is +carried on before the old cache process exits, creating conflict on resources +such as listen ports. + *eof* diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-trunk.rst index 2ceed9c0c..975ee2d7f 100644 --- a/doc/sphinx/whats-new/upgrading-trunk.rst +++ b/doc/sphinx/whats-new/upgrading-trunk.rst @@ -143,4 +143,15 @@ In the VMOD descriptor, it is possible to add the following stanza:: This is a good occasion to revisit unfortunate name choices in existing VMODs. +Platform Support +================ + +systemd +~~~~~~~ + +To make the selection of the main process deterministic for the kill mode, a +PID file is now expected by default in the varnish service. In a setup where +the service command for ``ExecStart`` is overridden, a ``-P`` option matching +the ``PIDFile`` setting is needed. + *eof* From nils.goroll at uplex.de Mon Mar 14 13:38:05 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 13:38:05 +0000 (UTC) Subject: [master] 8c4b8defb Release docs: polish Message-ID: <20220314133805.E5642AC943@lists.varnish-cache.org> commit 8c4b8defb72104437c3065a92a1325af8d5990b3 Author: Nils Goroll Date: Mon Mar 14 13:40:51 2022 +0100 Release docs: polish diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index 75d34b2e6..ad885bb93 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -72,13 +72,14 @@ raised. Changes to VCL ============== -It is now possible to assign a ``BODY`` variable with either a ``STRING`` type -or a ``BLOB``. +It is now possible to assign a ``BLOB`` value to a ``BODY`` variable, +in addition to ``STRING`` as before. VCL variables ~~~~~~~~~~~~~ -New VCL variables to track the beginning of HTTP messages: +New VCL timestamp variables have been added to track the point in time +when HTTP messages were created: - ``req.time`` - ``req_top.time`` @@ -87,7 +88,8 @@ New VCL variables to track the beginning of HTTP messages: - ``beresp.time`` - ``obj.time`` -New ``req.transport`` which returns "HTTP/1" or "HTTP/2" as appropriate. +The new ``req.transport`` variable returns "HTTP/1" or "HTTP/2" as +appropriate. Other changes to VCL ~~~~~~~~~~~~~~~~~~~~ @@ -193,8 +195,9 @@ When the ``+workspace`` debug flag is raised, workspace logs are no longer emitted as raw logs disconnected from the task. Having workspace logs grouped with the rest of the task should help workspace footprint analysis. -It is possible to generate of arbitrary log lines with ``vtc.vsl_replay()``, -which can help testing log processing utilities. +It is now possible to generate arbitrary log lines with ``vtc.vsl()`` +and ``vtc.vsl_replay()``, which can help testing log processing +utilities. It is also possible to tweak the VXID cache chunk size per thread pool with the ``debug.xid`` command for the Varnish CLI, which can also help testing diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-trunk.rst index 975ee2d7f..d516efc75 100644 --- a/doc/sphinx/whats-new/upgrading-trunk.rst +++ b/doc/sphinx/whats-new/upgrading-trunk.rst @@ -53,16 +53,18 @@ a shorthand for ``vsm_space`` is also no longer accepted. Command line options ~~~~~~~~~~~~~~~~~~~~ -A common pattern when a CLI script is used during startup is to combine the -``-I`` option with ``-f ''`` to prevent prevent an automatic startup of the -cache process. In this case a start command is usually present in the CLI -script, most likely as the last command. - -This enables loading VCLs and potentially VCL labels which require a specific -order if the active VCL is supposed to switch execution to labels. VCL loaded -through the CLI script is no longer implicitly used if there is no active VCL -yet. If no VCL was loaded through the ``-b`` or ``-f`` options it means that -an explicit ``vcl.use`` command is needed before the ``start`` command. +A common pattern when a CLI script is used during startup is to +combine the ``-I`` and ``-f ''`` options to prevent an automatic +startup of the cache process. In this case a start command is usually +present in the CLI script, most likely as the last command. This +enables loading VCLs and potentially VCL labels which require a +specific order if the active VCL is supposed to switch execution to +labels. + +To support this pattern, a VCL loaded through the CLI script is no +longer implicitly used if there is no active VCL yet. If no VCL was +loaded through the ``-b`` or ``-f`` options it means that an explicit +``vcl.use`` command is needed before the ``start`` command. In the scenario described above, that would already be the case since the desired active VCL would likely need to be loaded last, not eligible for an @@ -118,14 +120,15 @@ of reference counting with ``VRT_StaticDirector()``. Filters ~~~~~~~ -Two new functions ``VRT_AddFilter()`` and ``VRT_RemoveFilter()`` manage -filters as pairs. When used as pairs, the filters must have the same name, -otherwise operating with only one fetch or delivery filter is fine. +Two new functions ``VRT_AddFilter()`` and ``VRT_RemoveFilter()`` +manage filters as VDP/VFP pairs. When used as pairs, the filters must +have the same name, otherwise operating with only one fetch or +delivery filter is fine. Unlike its deprecated predecessors ``VRT_AddVFP()`` and ``VRT_AddVDP()``, the new ``VRT_AddFilter()`` returns an error string. The ``VRT_RemoveVFP()`` -and ``VRT_RemoveVDP()`` functions are also deprecated an simply thin wrapper -lacking error handling around the new functions. +and ``VRT_RemoveVDP()`` functions are also deprecated and kept for now +as wrappers of ``VRT_RemoveFilter()`` without error handling. VMOD deprecated aliases ~~~~~~~~~~~~~~~~~~~~~~~ From nils.goroll at uplex.de Mon Mar 14 13:38:06 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 13:38:06 +0000 (UTC) Subject: [master] f56d1bf34 Release docs: Mark changes introduced with 7.0.1 Message-ID: <20220314133806.04B3FAC946@lists.varnish-cache.org> commit f56d1bf34adbaed98497923e978ac0016ce22071 Author: Nils Goroll Date: Mon Mar 14 13:49:28 2022 +0100 Release docs: Mark changes introduced with 7.0.1 diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index ad885bb93..9f6f11b8f 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -97,7 +97,7 @@ Other changes to VCL Where a regular expression literal is expected, it is now possible to have a concatenation of constant strings. It can be useful when part of the expression comes from an environment-specific include, or to break a long -expression into multiple lines. +expression into multiple lines. (introduced with 7.0.1) Similarly to ``varnishd`` parameters, it is now possible to have deprecated aliases of VCL variables. Although there are none so far, aliases will allow @@ -153,7 +153,7 @@ environment (service manager, container orchestrator, etc) reacts to a varnishtest =========== -The ``SO_RCVTIMEO_WORKS`` feature check is gone. +The ``SO_RCVTIMEO_WORKS`` feature check is gone. (introduced with 7.0.1) The reporting of ``logexpect`` events was rearranged for readability. @@ -165,10 +165,11 @@ on. Changes for developers and VMOD authors ======================================= -The ``SO_RCVTIMEO`` and ``SO_SNDTIMEO`` socket options are now required at -build time since their absence would otherwise prevent some timeouts to take -effect. We no longer check whether they effectively work, hence the removal of -the ``SO_RCVTIMEO_WORKS`` feature check in ``varnishtest``. +The ``SO_RCVTIMEO`` and ``SO_SNDTIMEO`` socket options are now +required at build time since their absence would otherwise prevent +some timeouts to take effect. We no longer check whether they +effectively work, hence the removal of the ``SO_RCVTIMEO_WORKS`` +feature check in ``varnishtest``. (introduced with 7.0.1) Varnish will use libunwind by default when available at configure time, the ``--without-unwind`` configure flag can prevent this and fall back to From nils.goroll at uplex.de Mon Mar 14 13:38:06 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 13:38:06 +0000 (UTC) Subject: [master] f2e40b0ce Release docs: mention logexpect abort Message-ID: <20220314133806.1F616AC94A@lists.varnish-cache.org> commit f2e40b0ce9c02de2c2b05c00219c15b58e258663 Author: Nils Goroll Date: Mon Mar 14 13:50:55 2022 +0100 Release docs: mention logexpect abort diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index 9f6f11b8f..64c3b4287 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -157,7 +157,9 @@ The ``SO_RCVTIMEO_WORKS`` feature check is gone. (introduced with 7.0.1) The reporting of ``logexpect`` events was rearranged for readability. -XXX: mention the logexpect abort trigger? (it's not documented) +The ``abort`` command in the ``logexpect`` facility of ``varnishtest`` +can now be used to trigger an ``abort()`` to help debugging the vsl +client library code. The ``vtc.barrier_sync()`` VMOD function can be used in ``vcl_init`` from now on. From nils.goroll at uplex.de Mon Mar 14 13:38:06 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 13:38:06 +0000 (UTC) Subject: [master] 66717e51d Release docs: Rewrite ESI onerror="continue" Message-ID: <20220314133806.3C3EBAC94E@lists.varnish-cache.org> commit 66717e51dde040d1085d20331ff4e1aed7920c08 Author: Nils Goroll Date: Mon Mar 14 14:25:31 2022 +0100 Release docs: Rewrite ESI onerror="continue" I found the previous wording confusing and hope this is considered an improvement. We should make clear that lack of onerror="continue" implies abort only if the feature flag is set. diff --git a/doc/changes.rst b/doc/changes.rst index a09738826..162a1f847 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -50,8 +50,15 @@ Varnish Cache NEXT (2022-03-15) promoted to a regular feature or dropped without being considered a breaking change. -* ESI includes now support the ``onerror="continue"`` - attribute if the ``+esi_include_onerror`` feature flag is set. +* ESI includes now support the ``onerror="continue"`` attribute of + ```` tags. + + The ``+esi_include_onerror`` feature flag controls if the attribute + is honored: If enabled, failure of an include stops ESI processing + unless the ``onerror="continue"`` attribute was set for it. + + The feature flag is off by default, preserving the existing behavior + to continue ESI processing despite include failures. * The deprecated sub-argument of the ``-l`` option was removed, it is now a shorthand for the ``vsl_space`` parameter only. diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-trunk.rst index d516efc75..fa1b77d56 100644 --- a/doc/sphinx/whats-new/upgrading-trunk.rst +++ b/doc/sphinx/whats-new/upgrading-trunk.rst @@ -75,18 +75,24 @@ not affect existing ``-I`` scripts, but if it does, simply add the missing Other changes in varnishd ~~~~~~~~~~~~~~~~~~~~~~~~~ -The ESI parser now recognizes the ``onerror="continue"`` attribute of the -```` XML tag. Other values than "continue" are simply ignored. -Continuing has always been Varnish's behavior for ESI sub-requests, so this -behavior is guarded by a new ``+esi_include_onerror`` feature flag. - -It means that by default, the top request will continue processing ESI -fragments even if one failed during delivery. The parsing always takes the -attribute, and the feature flag only controls whether to honor it or not. - -This means that the persistence of ESI objects changed and does not tolerate -downgrades. ESI persisted before support for this attribute assumes a lack of -such attribute and will abort the delivery if the flag is raised. +The ESI parser now recognizes the ``onerror="continue"`` attribute of +the ```` XML tag. + +The ``+esi_include_onerror`` feature flag controls if the attribute is +honored: If enabled, failure of an include stops ESI processing unless +the ``onerror="continue"`` attribute was set for it. + +The feature flag is off by default, preserving the existing behavior +to continue ESI processing despite include failures. + +Users of persistent storage engines be advised that objects created +before the introduction of this change can not carry the +``onerror="continue"`` attribute and, consequently, will be handled as +if it was not present if the ``+esi_include_onerror`` feature flag is +enabled. + +Also, as this change is not backwards compatible, downgrades with +persisted storage are not supported across this release. varnishtest =========== From nils.goroll at uplex.de Mon Mar 14 13:38:06 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 13:38:06 +0000 (UTC) Subject: [master] 16cf6597d Release docs: Polish advise on VRT_Assign_Backend Message-ID: <20220314133806.536E1AC953@lists.varnish-cache.org> commit 16cf6597dccd59042dfc6dc36b64c57c0d7a8499 Author: Nils Goroll Date: Mon Mar 14 14:30:01 2022 +0100 Release docs: Polish advise on VRT_Assign_Backend Removed one paragraph which was really confusing and, I guess, wrong: IIUC, backend references _always_ need to be taken with VRT_Assign_Backend, because the referencing vmod can make _no_ assumptions about the assigned backend. Also I hope to have clarified use of VRT_StaticDirector(). diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-trunk.rst index fa1b77d56..8a439d212 100644 --- a/doc/sphinx/whats-new/upgrading-trunk.rst +++ b/doc/sphinx/whats-new/upgrading-trunk.rst @@ -114,14 +114,11 @@ Assignments should be replaced as such:: -lvalue = expr; +VRT_Assign_Backend(&lvalue, expr); -It doesn't have to be strictly assigned this way, as long as when presented to -a VMOD a backend is accounted for as long as it is referenced. +.. XXX: there should be a coccinelle patch to help. -XXX: there should be a coccinelle patch to help. - -On the other hand, if a backend is created dynamically but is guaranteed by -the VMOD not to be removed before its owning VCL is discarded, it can opt out -of reference counting with ``VRT_StaticDirector()``. +For backends which are guaranteed at least VCL lifetime, the +respective VMOD can opt out of reference counting with +``VRT_StaticDirector()`` to avoid the reference counting overhead. Filters ~~~~~~~ From nils.goroll at uplex.de Mon Mar 14 14:00:07 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 14:00:07 +0000 (UTC) Subject: [master] 7615e5599 Polish varnishtest logexpect abort and document it Message-ID: <20220314140008.017B5ADC08@lists.varnish-cache.org> commit 7615e55999bbd81321c4ad0df7b4183dc12f35c8 Author: Nils Goroll Date: Mon Mar 14 14:59:47 2022 +0100 Polish varnishtest logexpect abort and document it diff --git a/bin/varnishtest/tests/l00001.vtc b/bin/varnishtest/tests/l00001.vtc index bcd4391b7..a53187ee3 100644 --- a/bin/varnishtest/tests/l00001.vtc +++ b/bin/varnishtest/tests/l00001.vtc @@ -22,6 +22,7 @@ client c1 { # Test 'eq' operator logexpect l1 -d 1 -g vxid -q "Begin eq 'req 1000 rxreq'" { expect 0 * Begin req + abort expect * = End } -run diff --git a/bin/varnishtest/vtc_logexp.c b/bin/varnishtest/vtc_logexp.c index b9a1300be..c542619b1 100644 --- a/bin/varnishtest/vtc_logexp.c +++ b/bin/varnishtest/vtc_logexp.c @@ -45,6 +45,7 @@ * expect * fail add * fail clear + * abort * ... * } [-start|-wait] * @@ -139,6 +140,11 @@ * fail clear * * .. XXX can we come up with a better solution which is still safe? + * + * abort specification: + * + * abort(3) varnishtest, intended to help debugging of the VSL client library + * itself. */ #include "config.h" @@ -760,9 +766,6 @@ cmd_logexp_abort(CMD_ARGS) CAST_OBJ_NOTNULL(le, priv, LOGEXP_MAGIC); - if (av[1] == NULL || av[2] == NULL || av[3] == NULL) - vtc_fatal(vl, "Syntax error"); - cmd_logexp_common(le, vl, LE_ABORT, av); } From dridi.boukelmoune at gmail.com Mon Mar 14 14:56:04 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 14 Mar 2022 14:56:04 +0000 (UTC) Subject: [master] 0ede556cc circleci: Add almalinux:8 jobs for el8 Message-ID: <20220314145605.0A639AF777@lists.varnish-cache.org> commit 0ede556cc941249091e7e7bd16e179befaf9e96f Author: Dridi Boukelmoune Date: Mon Mar 14 14:02:57 2022 +0100 circleci: Add almalinux:8 jobs for el8 And while at it, make it easier to work with distribution names with less if statements and more case matching. Better diff with the --ignore-all-space option. diff --git a/.circleci/config.yml b/.circleci/config.yml index 9707e08f1..7ce929b8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -161,6 +161,7 @@ jobs: case "<< parameters.platform >>" in debian:*|ubuntu:*) EXT=deb ;; centos:*|fedora:*) EXT=rpm ;; + almalinux:*) EXT=rpm ;; alpine:*) EXT=apk ;; *) echo "unrecognized platform: << parameters.platform >>" @@ -225,16 +226,20 @@ jobs: docker create --name workspace -v /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> /bin/true docker cp /workspace workspace:/ docker run --volumes-from workspace -w /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> sh -c ' - if [ << parameters.dist >> = centos -o << parameters.dist >> = fedora ]; then + case "<< parameters.dist >>" in + centos|almalinux|fedora) yum groupinstall -y "Development Tools" - if [ << parameters.dist >> = centos ]; then - if [ << parameters.release >> = stream ]; then + case "<< parameters.dist >>:<< parameters.release >>" in + centos:stream|almalinux:8) dnf install -y "dnf-command(config-manager)" yum config-manager --set-enabled powertools yum install -y diffutils - fi - yum install -y epel-release - fi + yum install -y epel-release + ;; + centos:7) + yum install -y epel-release + ;; + esac yum install -y \ cpio \ automake \ @@ -248,7 +253,8 @@ jobs: python3 \ /usr/bin/sphinx-build \ sudo - elif [ << parameters.dist >> = debian -o << parameters.dist >> = ubuntu ]; then + ;; + debian|ubuntu) export DEBIAN_FRONTEND=noninteractive export DEBCONF_NONINTERACTIVE_SEEN=true apt-get update @@ -269,7 +275,8 @@ jobs: pkg-config \ python3-sphinx \ sudo - elif [ << parameters.dist >> = alpine ]; then + ;; + alpine) apk update apk add -q \ autoconf \ @@ -288,7 +295,8 @@ jobs: py3-sphinx \ tar \ sudo - elif [ << parameters.dist >> = archlinux ]; then + ;; + archlinux) pacman -Syu --noconfirm \ ca-certificates \ cpio \ @@ -301,15 +309,20 @@ jobs: python-docutils \ python-sphinx \ tar - fi + ;; + esac - if [ << parameters.dist >> = archlinux ]; then + case "<< parameters.dist >>" in + archlinux) useradd varnish - elif [ << parameters.dist >> = centos -o << parameters.dist >> = fedora ]; then - adduser varnish - else - adduser --disabled-password --gecos "" varnish - fi + ;; + centos|almalinux|fedora) + adduser varnish + ;; + *) + adduser --disabled-password --gecos "" varnish + ;; + esac chown -R varnish:varnish . @@ -360,6 +373,10 @@ workflows: prefix: quay.io/centos/ dist: centos release: stream + - distcheck: + name: distcheck_almalinux_8 + dist: almalinux + release: "8" - distcheck: name: distcheck_fedora_latest dist: fedora @@ -413,6 +430,7 @@ workflows: - debian:stretch - centos:7 - centos:stream + - almalinux:8 - fedora:latest - alpine:3 rclass: diff --git a/.circleci/make-rpm-packages.sh b/.circleci/make-rpm-packages.sh index 40c883d98..566fbc2ca 100755 --- a/.circleci/make-rpm-packages.sh +++ b/.circleci/make-rpm-packages.sh @@ -13,13 +13,16 @@ elif [ -z "$PARAM_DIST" ]; then exit 1 fi -if [ "$PARAM_DIST" = centos ]; then - if [ "$PARAM_RELEASE" = stream ]; then +case "$PARAM_DIST:$PARAM_RELEASE" in + centos:stream|almalinux:8) dnf install -y 'dnf-command(config-manager)' yum config-manager --set-enabled powertools - fi - yum install -y epel-release -fi + yum install -y epel-release + ;; + centos:7) + yum install -y epel-release + ;; +esac yum install -y rpm-build yum-utils From dridi.boukelmoune at gmail.com Mon Mar 14 14:56:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 14 Mar 2022 14:56:05 +0000 (UTC) Subject: [master] e759dfeee whats-new: Don't drop el8 packaging just yet Message-ID: <20220314145605.1E367AF77A@lists.varnish-cache.org> commit e759dfeee6d063e39f4e4be90bb915d09a0002f2 Author: Dridi Boukelmoune Date: Mon Mar 14 14:05:56 2022 +0100 whats-new: Don't drop el8 packaging just yet diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index 64c3b4287..f72626cfc 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -214,10 +214,10 @@ Platform Support CentOS ~~~~~~ -With the End of Life of CentOS 8, there will be no more packages for Red Hat -Enterprise Linux 8 and its derivatives. We track CentOS Stream in Continuous -Integration so Varnish Cache is expected to work on this platform, but there -will be no el8 packages from now on. +With the End of Life of CentOS 8, we will build el8 packages on almalinux +from now on. This means that we will always target the oldest el8 branch. +For example a package built for el8.5 is not guaranteed to work on el8.1 +even though the latter may still be supported by Red Hat. systemd ~~~~~~~ From dridi.boukelmoune at gmail.com Mon Mar 14 14:56:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 14 Mar 2022 14:56:05 +0000 (UTC) Subject: [master] 99a57ab81 Revert "doc: Move away from el8 or later" Message-ID: <20220314145605.42FADAF77D@lists.varnish-cache.org> commit 99a57ab813a2d0383347be5905e64a4afb7774e0 Author: Dridi Boukelmoune Date: Mon Mar 14 14:24:42 2022 +0100 Revert "doc: Move away from el8 or later" This reverts commit 8f11c92523c6808edbf03a3922ceec8af95ee3c3. diff --git a/doc/sphinx/installation/install_redhat.rst b/doc/sphinx/installation/install_redhat.rst index 5a7614b10..2baaaeb34 100644 --- a/doc/sphinx/installation/install_redhat.rst +++ b/doc/sphinx/installation/install_redhat.rst @@ -13,17 +13,19 @@ Varnish is included in the `EPEL incompatible syntax changes in newer versions of Varnish, only older versions are available. -We therefore recommend that you install the latest version directly from our -repository, as described above. +We therefore recommend that you install the latest version directly from our repository, as described above. Varnish Cache is packaged in RPMs for easy installation and upgrade on Red Hat systems. The Varnish Cache project maintains official packages for the current -Enterprise Linux versions. Varnish Cache 6.x series are supported on el7. +Enterprise Linux versions. Varnish Cache 6.x series are supported on el7 and el8. -We try to keep the latest version available as prebuilt RPMs on -`packagecloud.io/varnishcache `_. +We try to keep the latest version available as prebuilt RPMs (el7 and el8) +on `packagecloud.io/varnishcache `_. -We no longer provide RPM packages for el8 or later. +Starting with el8 a DNF module will inhibit Varnish packages, and the solution +is to disable the module before installing:: + + dnf module disable varnish Official packages of 6 ---------------------- @@ -44,12 +46,6 @@ With the release of 6.0.2, users have to switch to switch repositories to get the latest version. Read more about this on `Release 6.0.2 `_. -We still provide el8 packages for Varnish Cache 6.0 LTS, but so does Red Hat. -Their el8 package is provided as a DNF module that inhibits our packages, and -the solution is to disable the module before installing:: - - dnf module disable varnish - External packaging ------------------ @@ -57,14 +53,6 @@ Varnish Cache is also distributed in third party package repositories. .. _`Fedora EPEL`: https://fedoraproject.org/wiki/EPEL -.. _`Software Collections 2.1`: http://developers.redhat.com/blog/2015/11/17/software-collections-2-1-generally-available/ - -.. _`provides`: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.0_release_notes/rhel-8_0_0_release#BZ-1633338 - - * `Fedora EPEL`_ does community packaging of Varnish Cache. -* Red Hat has packaged versions of Varnish Cache available since - `Software Collections 2.1`_. - -* Red Hat provides_ Varnish Cache 6.0 LTS on el8. +* RedHat has packaged versions of Varnish Cache available since Software Collections 2.1. Announcement on . From dridi at varni.sh Mon Mar 14 15:56:50 2022 From: dridi at varni.sh (Dridi Boukelmoune) Date: Mon, 14 Mar 2022 15:56:50 +0000 Subject: [master] 7615e5599 Polish varnishtest logexpect abort and document it In-Reply-To: <20220314140008.017B5ADC08@lists.varnish-cache.org> References: <20220314140008.017B5ADC08@lists.varnish-cache.org> Message-ID: On Mon, Mar 14, 2022 at 2:00 PM Nils Goroll wrote: > > > commit 7615e55999bbd81321c4ad0df7b4183dc12f35c8 > Author: Nils Goroll > Date: Mon Mar 14 14:59:47 2022 +0100 > > Polish varnishtest logexpect abort and document it > > diff --git a/bin/varnishtest/tests/l00001.vtc b/bin/varnishtest/tests/l00001.vtc > index bcd4391b7..a53187ee3 100644 > --- a/bin/varnishtest/tests/l00001.vtc > +++ b/bin/varnishtest/tests/l00001.vtc > @@ -22,6 +22,7 @@ client c1 { > # Test 'eq' operator > logexpect l1 -d 1 -g vxid -q "Begin eq 'req 1000 rxreq'" { > expect 0 * Begin req > + abort Is is a test leftover? It's failing the test suite. > expect * = End > } -run > > diff --git a/bin/varnishtest/vtc_logexp.c b/bin/varnishtest/vtc_logexp.c > index b9a1300be..c542619b1 100644 > --- a/bin/varnishtest/vtc_logexp.c > +++ b/bin/varnishtest/vtc_logexp.c > @@ -45,6 +45,7 @@ > * expect > * fail add > * fail clear > + * abort > * ... > * } [-start|-wait] > * > @@ -139,6 +140,11 @@ > * fail clear > * > * .. XXX can we come up with a better solution which is still safe? > + * > + * abort specification: > + * > + * abort(3) varnishtest, intended to help debugging of the VSL client library > + * itself. > */ > > #include "config.h" > @@ -760,9 +766,6 @@ cmd_logexp_abort(CMD_ARGS) > > CAST_OBJ_NOTNULL(le, priv, LOGEXP_MAGIC); > > - if (av[1] == NULL || av[2] == NULL || av[3] == NULL) > - vtc_fatal(vl, "Syntax error"); > - > cmd_logexp_common(le, vl, LE_ABORT, av); > } > > _______________________________________________ > varnish-commit mailing list > varnish-commit at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit From nils.goroll at uplex.de Mon Mar 14 16:00:32 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 17:00:32 +0100 Subject: [master] 7615e5599 Polish varnishtest logexpect abort and document it In-Reply-To: References: <20220314140008.017B5ADC08@lists.varnish-cache.org> Message-ID: <3fdfbb66-5f04-8365-3c4f-e98d3b8b2d8d@uplex.de> On 14.03.22 16:56, Dridi Boukelmoune wrote: > Is is a test leftover? It's failing the test suite. stupid /me -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 22301 Hamburg tel +49 40 28805731 mob +49 170 2723133 fax +49 40 42949753 xmpp://slink at jabber.int.uplex.de/ http://uplex.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: From nils.goroll at uplex.de Mon Mar 14 16:03:05 2022 From: nils.goroll at uplex.de (Nils Goroll) Date: Mon, 14 Mar 2022 16:03:05 +0000 (UTC) Subject: [master] afd9a2181 Clean up accidentally committed quick test Message-ID: <20220314160305.3BC8FB1E87@lists.varnish-cache.org> commit afd9a2181076b03d7e571b8f3498fe79a881bc1f Author: Nils Goroll Date: Mon Mar 14 17:01:25 2022 +0100 Clean up accidentally committed quick test from 7615e55999bbd81321c4ad0df7b4183dc12f35c8 - sorry diff --git a/bin/varnishtest/tests/l00001.vtc b/bin/varnishtest/tests/l00001.vtc index a53187ee3..bcd4391b7 100644 --- a/bin/varnishtest/tests/l00001.vtc +++ b/bin/varnishtest/tests/l00001.vtc @@ -22,7 +22,6 @@ client c1 { # Test 'eq' operator logexpect l1 -d 1 -g vxid -q "Begin eq 'req 1000 rxreq'" { expect 0 * Begin req - abort expect * = End } -run From dridi.boukelmoune at gmail.com Tue Mar 15 08:56:07 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 15 Mar 2022 08:56:07 +0000 (UTC) Subject: [master] 7a1ede040 whats-new: Typo Message-ID: <20220315085607.EDB0FA96ED@lists.varnish-cache.org> commit 7a1ede04055eb6496b20c46109cf83eecf94a214 Author: Dridi Boukelmoune Date: Tue Mar 15 09:55:39 2022 +0100 whats-new: Typo diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-trunk.rst index f72626cfc..a9fcff392 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-trunk.rst @@ -224,7 +224,7 @@ systemd The kill mode of the varnish service was changed from ``process`` to ``mixed`` to ensure that the cache process is killed if the manager process is timed out -by systemd. Otherwise, a race exists if the cache process where a restart is +by systemd. Otherwise, a race exists with the cache process where a restart is carried on before the old cache process exits, creating conflict on resources such as listen ports. From dridi.boukelmoune at gmail.com Tue Mar 15 11:06:06 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 15 Mar 2022 11:06:06 +0000 (UTC) Subject: [master] 686c6f0e2 vrt: Add missing changes Message-ID: <20220315110606.6F1C4AE6A2@lists.varnish-cache.org> commit 686c6f0e274c51a7de73485172f2e6cbd511fc72 Author: Dridi Boukelmoune Date: Tue Mar 15 12:01:00 2022 +0100 vrt: Add missing changes diff --git a/include/vrt.h b/include/vrt.h index c23ac1eee..d8e290303 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -65,7 +65,13 @@ * BODY can either be a BLOB or a STRANDS, but only a STRANDS * can take a non-NULL const char * prefix. The changes to BODY * assignments doesn't break the ABI or the API. - * + * TOSTRAND() and TOSTRANDS() macros added + * [cache.h] enum sess_close replaced by struct stream_close + * [cache.h] http_IsHdr() added + * [cache_filter.h] vfp_init_f() changed to take a VRT_CTX + * [cache_filter.h] vdp_init_f() changed to take a VRT_CTX + * [cache_filter.h] VRT_AddFilter() added + * [cache_filter.h] VRT_RemoveFilter() added * 14.0 (2021-09-15) * VIN_n_Arg() no directly returns the directory name. * VSB_new() and VSB_delete() removed From dridi.boukelmoune at gmail.com Tue Mar 15 11:09:02 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 15 Mar 2022 11:09:02 +0000 (UTC) Subject: [7.1] 686c6f0e2 vrt: Add missing changes Message-ID: <20220315110902.D2DB5AE9AF@lists.varnish-cache.org> commit 686c6f0e274c51a7de73485172f2e6cbd511fc72 Author: Dridi Boukelmoune Date: Tue Mar 15 12:01:00 2022 +0100 vrt: Add missing changes diff --git a/include/vrt.h b/include/vrt.h index c23ac1eee..d8e290303 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -65,7 +65,13 @@ * BODY can either be a BLOB or a STRANDS, but only a STRANDS * can take a non-NULL const char * prefix. The changes to BODY * assignments doesn't break the ABI or the API. - * + * TOSTRAND() and TOSTRANDS() macros added + * [cache.h] enum sess_close replaced by struct stream_close + * [cache.h] http_IsHdr() added + * [cache_filter.h] vfp_init_f() changed to take a VRT_CTX + * [cache_filter.h] vdp_init_f() changed to take a VRT_CTX + * [cache_filter.h] VRT_AddFilter() added + * [cache_filter.h] VRT_RemoveFilter() added * 14.0 (2021-09-15) * VIN_n_Arg() no directly returns the directory name. * VSB_new() and VSB_delete() removed From dridi.boukelmoune at gmail.com Tue Mar 15 12:38:07 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 15 Mar 2022 12:38:07 +0000 (UTC) Subject: [7.1] 2b9eb0029 Prepare for 7.1.0 Message-ID: <20220315123807.C2E8FB1426@lists.varnish-cache.org> commit 2b9eb0029a6048945a7db750a82ccc692e2d946f Author: Dridi Boukelmoune Date: Tue Mar 15 12:08:08 2022 +0100 Prepare for 7.1.0 diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c index d496e6e97..81217159f 100644 --- a/bin/varnishd/cache/cache_req_fsm.c +++ b/bin/varnishd/cache/cache_req_fsm.c @@ -167,7 +167,7 @@ Resp_Setup_Deliver(struct req *req) http_PrintfHeader(h, "Age: %.0f", floor(fmax(0., req->t_prev - oc->t_origin))); - http_SetHeader(h, "Via: 1.1 varnish (Varnish/7.0)"); + http_SetHeader(h, "Via: 1.1 varnish (Varnish/7.1)"); if (cache_param->http_gzip_support && ObjCheckFlag(req->wrk, oc, OF_GZIPED) && diff --git a/configure.ac b/configure.ac index 2d3757755..89619a96d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ(2.69) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006-2021 Varnish Software]) +Copyright (c) 2006-2022 Varnish Software]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [trunk], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [7.1.0], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/miniobj.h) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/doc/changes.rst b/doc/changes.rst index 162a1f847..4b2371646 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -31,9 +31,9 @@ http://varnish-cache.org/docs/trunk/whats-new/index.html and via individual releases. These documents are updated as part of the release process. -=============================== -Varnish Cache NEXT (2022-03-15) -=============================== +================================ +Varnish Cache 7.1.0 (2022-03-15) +================================ * The ``cookie.format_rfc1123()`` function was renamed to ``cookie.format_date()``, and the former was retained as a diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst index 16af4e23e..f3f31a36d 100644 --- a/doc/sphinx/index.rst +++ b/doc/sphinx/index.rst @@ -42,7 +42,7 @@ Longer listings like example command output and VCL look like this:: $ /opt/varnish/sbin/varnishd -V varnishd (varnish-trunk revision 1234567) Copyright (c) 2006 Verdens Gang AS - Copyright (c) 2006-2021 Varnish Software + Copyright (c) 2006-2022 Varnish Software .. For maintainers: diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-7.1.rst similarity index 93% rename from doc/sphinx/whats-new/changes-trunk.rst rename to doc/sphinx/whats-new/changes-7.1.rst index a9fcff392..0b250db85 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-7.1.rst @@ -1,15 +1,11 @@ -**Note: This is a working document for a future release, with running -updates for changes in the development branch. For changes in the -released versions of Varnish, see:** :ref:`whats-new-index` +.. _whatsnew_changes_7.1: -.. _whatsnew_changes_CURRENT: - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Changes in Varnish **$NEXT_RELEASE** -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%% +Changes in Varnish **7.1** +%%%%%%%%%%%%%%%%%%%%%%%%%% For information about updating your current Varnish deployment to the -new version, see :ref:`whatsnew_upgrading_CURRENT`. +new version, see :ref:`whatsnew_upgrading_7.1`. A more detailed and technical account of changes in Varnish, with links to issues that have been fixed and pull requests that have been @@ -112,9 +108,9 @@ VMODs New :ref:`std.strftime()` function for UTC formatting. It is now possible to declare deprecated aliases of VMOD functions and object -methods, just like VCL aliases. The ``cookie.format_rfc1123()`` was renamed to -:ref:`cookie.format_date()`, and the former was retained as a deprecated alias -of the latter for compatibility. +methods, just like VCL aliases. The ``cookie.format_rfc1123()`` function was +renamed to :ref:`cookie.format_date()`, and the former was retained as a +deprecated alias of the latter for compatibility. Deprecated VMOD aliases have no runtime overhead, they are reified at VCL compile time. diff --git a/doc/sphinx/whats-new/index.rst b/doc/sphinx/whats-new/index.rst index bab1f3904..0b441cb8c 100644 --- a/doc/sphinx/whats-new/index.rst +++ b/doc/sphinx/whats-new/index.rst @@ -1,5 +1,5 @@ .. - Copyright (c) 2013-2020 Varnish Software AS + Copyright (c) 2013-2022 Varnish Software AS SPDX-License-Identifier: BSD-2-Clause See LICENSE file for full text of license @@ -13,18 +13,14 @@ This section describes the changes and improvements between different versions of Varnish, and what upgrading between the different versions entail. -Varnish **$NEXT_RELEASE** -------------------------- - -**Note: These are working documents for a future release, with running -updates for changes in the development branch. For changes in the -released versions of Varnish, see the chapters listed below.** +Varnish **7.1** +--------------- .. toctree:: :maxdepth: 2 - changes-trunk - upgrading-trunk + changes-7.1 + upgrading-7.1 Varnish 7.0 ----------- diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-7.1.rst similarity index 81% rename from doc/sphinx/whats-new/upgrading-trunk.rst rename to doc/sphinx/whats-new/upgrading-7.1.rst index 8a439d212..a09a6e649 100644 --- a/doc/sphinx/whats-new/upgrading-trunk.rst +++ b/doc/sphinx/whats-new/upgrading-7.1.rst @@ -1,34 +1,8 @@ -**Note: This is a working document for a future release, with running -updates for changes in the development branch. For changes in the -released versions of Varnish, see:** :ref:`whats-new-index` +.. _whatsnew_upgrading_7.1: -.. _whatsnew_upgrading_CURRENT: - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Upgrading to Varnish **$NEXT_RELEASE** -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -**XXX: how to upgrade from previous deployments to this -version. Limited to work that has to be done for an upgrade, new -features are listed in "Changes". Explicitly mention what does *not* -have to be changed, especially in VCL. May include, but is not limited -to:** - -* Elements of VCL that have been removed or are deprecated, or whose - semantics have changed. - -* -p parameters that have been removed or are deprecated, or whose - semantics have changed. - -* Changes in the CLI. - -* Changes in the output or interpretation of stats or the log, including - changes affecting varnishncsa/-hist/-top. - -* Changes that may be necessary in VTCs or in the use of varnishtest. - -* Changes in public APIs that may require changes in VMODs or VAPI/VUT - clients. +%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Upgrading to Varnish **7.1** +%%%%%%%%%%%%%%%%%%%%%%%%%%%% varnishd ======== diff --git a/include/vrt.h b/include/vrt.h index d8e290303..604758e82 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -53,7 +53,7 @@ * Whenever something is deleted or changed in a way which is not * binary/load-time compatible, increment MAJOR version * - * Next (2022-03-15) + * 15.0 (2022-03-15) * VRT_r_req_transport() added * VRT_Assign_Backend() added * VRT_StaticDirector() added diff --git a/lib/libvarnish/version.c b/lib/libvarnish/version.c index af4fd8835..99bbf2c42 100644 --- a/lib/libvarnish/version.c +++ b/lib/libvarnish/version.c @@ -74,7 +74,7 @@ VCS_String(const char *which) ")" "\n" "Copyright (c) 2006 Verdens Gang AS\n" - "Copyright (c) 2006-2021 Varnish Software\n" + "Copyright (c) 2006-2022 Varnish Software\n" ); default: WRONG("Wrong argument to VCS_String"); From dridi.boukelmoune at gmail.com Tue Mar 15 12:56:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 15 Mar 2022 12:56:05 +0000 (UTC) Subject: [master] 2b9eb0029 Prepare for 7.1.0 Message-ID: <20220315125605.92943B1DD0@lists.varnish-cache.org> commit 2b9eb0029a6048945a7db750a82ccc692e2d946f Author: Dridi Boukelmoune Date: Tue Mar 15 12:08:08 2022 +0100 Prepare for 7.1.0 diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c index d496e6e97..81217159f 100644 --- a/bin/varnishd/cache/cache_req_fsm.c +++ b/bin/varnishd/cache/cache_req_fsm.c @@ -167,7 +167,7 @@ Resp_Setup_Deliver(struct req *req) http_PrintfHeader(h, "Age: %.0f", floor(fmax(0., req->t_prev - oc->t_origin))); - http_SetHeader(h, "Via: 1.1 varnish (Varnish/7.0)"); + http_SetHeader(h, "Via: 1.1 varnish (Varnish/7.1)"); if (cache_param->http_gzip_support && ObjCheckFlag(req->wrk, oc, OF_GZIPED) && diff --git a/configure.ac b/configure.ac index 2d3757755..89619a96d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ(2.69) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS -Copyright (c) 2006-2021 Varnish Software]) +Copyright (c) 2006-2022 Varnish Software]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [trunk], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [7.1.0], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/miniobj.h) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/doc/changes.rst b/doc/changes.rst index 162a1f847..4b2371646 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -31,9 +31,9 @@ http://varnish-cache.org/docs/trunk/whats-new/index.html and via individual releases. These documents are updated as part of the release process. -=============================== -Varnish Cache NEXT (2022-03-15) -=============================== +================================ +Varnish Cache 7.1.0 (2022-03-15) +================================ * The ``cookie.format_rfc1123()`` function was renamed to ``cookie.format_date()``, and the former was retained as a diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst index 16af4e23e..f3f31a36d 100644 --- a/doc/sphinx/index.rst +++ b/doc/sphinx/index.rst @@ -42,7 +42,7 @@ Longer listings like example command output and VCL look like this:: $ /opt/varnish/sbin/varnishd -V varnishd (varnish-trunk revision 1234567) Copyright (c) 2006 Verdens Gang AS - Copyright (c) 2006-2021 Varnish Software + Copyright (c) 2006-2022 Varnish Software .. For maintainers: diff --git a/doc/sphinx/whats-new/changes-trunk.rst b/doc/sphinx/whats-new/changes-7.1.rst similarity index 93% rename from doc/sphinx/whats-new/changes-trunk.rst rename to doc/sphinx/whats-new/changes-7.1.rst index a9fcff392..0b250db85 100644 --- a/doc/sphinx/whats-new/changes-trunk.rst +++ b/doc/sphinx/whats-new/changes-7.1.rst @@ -1,15 +1,11 @@ -**Note: This is a working document for a future release, with running -updates for changes in the development branch. For changes in the -released versions of Varnish, see:** :ref:`whats-new-index` +.. _whatsnew_changes_7.1: -.. _whatsnew_changes_CURRENT: - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Changes in Varnish **$NEXT_RELEASE** -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%% +Changes in Varnish **7.1** +%%%%%%%%%%%%%%%%%%%%%%%%%% For information about updating your current Varnish deployment to the -new version, see :ref:`whatsnew_upgrading_CURRENT`. +new version, see :ref:`whatsnew_upgrading_7.1`. A more detailed and technical account of changes in Varnish, with links to issues that have been fixed and pull requests that have been @@ -112,9 +108,9 @@ VMODs New :ref:`std.strftime()` function for UTC formatting. It is now possible to declare deprecated aliases of VMOD functions and object -methods, just like VCL aliases. The ``cookie.format_rfc1123()`` was renamed to -:ref:`cookie.format_date()`, and the former was retained as a deprecated alias -of the latter for compatibility. +methods, just like VCL aliases. The ``cookie.format_rfc1123()`` function was +renamed to :ref:`cookie.format_date()`, and the former was retained as a +deprecated alias of the latter for compatibility. Deprecated VMOD aliases have no runtime overhead, they are reified at VCL compile time. diff --git a/doc/sphinx/whats-new/index.rst b/doc/sphinx/whats-new/index.rst index bab1f3904..0b441cb8c 100644 --- a/doc/sphinx/whats-new/index.rst +++ b/doc/sphinx/whats-new/index.rst @@ -1,5 +1,5 @@ .. - Copyright (c) 2013-2020 Varnish Software AS + Copyright (c) 2013-2022 Varnish Software AS SPDX-License-Identifier: BSD-2-Clause See LICENSE file for full text of license @@ -13,18 +13,14 @@ This section describes the changes and improvements between different versions of Varnish, and what upgrading between the different versions entail. -Varnish **$NEXT_RELEASE** -------------------------- - -**Note: These are working documents for a future release, with running -updates for changes in the development branch. For changes in the -released versions of Varnish, see the chapters listed below.** +Varnish **7.1** +--------------- .. toctree:: :maxdepth: 2 - changes-trunk - upgrading-trunk + changes-7.1 + upgrading-7.1 Varnish 7.0 ----------- diff --git a/doc/sphinx/whats-new/upgrading-trunk.rst b/doc/sphinx/whats-new/upgrading-7.1.rst similarity index 81% rename from doc/sphinx/whats-new/upgrading-trunk.rst rename to doc/sphinx/whats-new/upgrading-7.1.rst index 8a439d212..a09a6e649 100644 --- a/doc/sphinx/whats-new/upgrading-trunk.rst +++ b/doc/sphinx/whats-new/upgrading-7.1.rst @@ -1,34 +1,8 @@ -**Note: This is a working document for a future release, with running -updates for changes in the development branch. For changes in the -released versions of Varnish, see:** :ref:`whats-new-index` +.. _whatsnew_upgrading_7.1: -.. _whatsnew_upgrading_CURRENT: - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Upgrading to Varnish **$NEXT_RELEASE** -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -**XXX: how to upgrade from previous deployments to this -version. Limited to work that has to be done for an upgrade, new -features are listed in "Changes". Explicitly mention what does *not* -have to be changed, especially in VCL. May include, but is not limited -to:** - -* Elements of VCL that have been removed or are deprecated, or whose - semantics have changed. - -* -p parameters that have been removed or are deprecated, or whose - semantics have changed. - -* Changes in the CLI. - -* Changes in the output or interpretation of stats or the log, including - changes affecting varnishncsa/-hist/-top. - -* Changes that may be necessary in VTCs or in the use of varnishtest. - -* Changes in public APIs that may require changes in VMODs or VAPI/VUT - clients. +%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Upgrading to Varnish **7.1** +%%%%%%%%%%%%%%%%%%%%%%%%%%%% varnishd ======== diff --git a/include/vrt.h b/include/vrt.h index d8e290303..604758e82 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -53,7 +53,7 @@ * Whenever something is deleted or changed in a way which is not * binary/load-time compatible, increment MAJOR version * - * Next (2022-03-15) + * 15.0 (2022-03-15) * VRT_r_req_transport() added * VRT_Assign_Backend() added * VRT_StaticDirector() added diff --git a/lib/libvarnish/version.c b/lib/libvarnish/version.c index af4fd8835..99bbf2c42 100644 --- a/lib/libvarnish/version.c +++ b/lib/libvarnish/version.c @@ -74,7 +74,7 @@ VCS_String(const char *which) ")" "\n" "Copyright (c) 2006 Verdens Gang AS\n" - "Copyright (c) 2006-2021 Varnish Software\n" + "Copyright (c) 2006-2022 Varnish Software\n" ); default: WRONG("Wrong argument to VCS_String"); From dridi.boukelmoune at gmail.com Tue Mar 15 12:56:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Tue, 15 Mar 2022 12:56:05 +0000 (UTC) Subject: [master] 6d707641a Merge tag 'varnish-7.1.0' Message-ID: <20220315125605.A8D61B1DD3@lists.varnish-cache.org> commit 6d707641a4a8c263d58565d53e751f78969bbb0c Merge: 686c6f0e2 2b9eb0029 Author: Dridi Boukelmoune Date: Tue Mar 15 13:53:38 2022 +0100 Merge tag 'varnish-7.1.0' Releasing 7.1.0 diff --cc configure.ac index 2d3757755,89619a96d..e4e903c15 --- a/configure.ac +++ b/configure.ac @@@ -1,8 -1,8 +1,8 @@@ AC_PREREQ(2.69) AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS - Copyright (c) 2006-2021 Varnish Software]) + Copyright (c) 2006-2022 Varnish Software]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [7.1.0], [varnish-dev at varnish-cache.org]) +AC_INIT([Varnish], [trunk], [varnish-dev at varnish-cache.org]) AC_CONFIG_SRCDIR(include/miniobj.h) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) From martin at varnish-software.com Tue Mar 15 14:50:08 2022 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Tue, 15 Mar 2022 14:50:08 +0000 (UTC) Subject: [7.1] 751912394 Convert circleci setup to be a release branch Message-ID: <20220315145008.A04A4427F@lists.varnish-cache.org> commit 75191239483e86beb4423162803272a1602a7635 Author: Martin Blix Grydeland Date: Tue Mar 15 15:43:13 2022 +0100 Convert circleci setup to be a release branch Enable package building on commits diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ce929b8b..ed4359880 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -363,55 +363,6 @@ jobs: workflows: version: 2 commit: - jobs: - - distcheck: - name: distcheck_centos_7 - dist: centos - release: "7" - - distcheck: - name: distcheck_centos_stream - prefix: quay.io/centos/ - dist: centos - release: stream - - distcheck: - name: distcheck_almalinux_8 - dist: almalinux - release: "8" - - distcheck: - name: distcheck_fedora_latest - dist: fedora - release: latest - - distcheck: - name: distcheck_fedora_rawhide - dist: fedora - release: rawhide - - distcheck: - name: distcheck_debian_buster - dist: debian - release: buster - extra_conf: --enable-asan --enable-ubsan --enable-workspace-emulator - - distcheck: - name: distcheck_ubuntu_bionic - prefix: i386/ - dist: ubuntu - release: bionic - - distcheck: - name: distcheck_alpine - dist: alpine - release: "latest" - #extra_conf: --without-jemalloc - - distcheck: - name: distcheck_archlinux - dist: archlinux - release: base-devel - nightly: - triggers: - - schedule: - cron: "0 4 * * *" - filters: - branches: - only: - - master jobs: - dist - tar_pkg_tools From martin at varnish-software.com Tue Mar 15 14:54:06 2022 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Tue, 15 Mar 2022 14:54:06 +0000 (UTC) Subject: [7.1] d48636d23 Default to the 7.1 branch of pkg-varnish-plus Message-ID: <20220315145406.1DE9E464E@lists.varnish-cache.org> commit d48636d23bb277ca8650a6174c872d74080f2859 Author: Martin Blix Grydeland Date: Tue Mar 15 15:52:54 2022 +0100 Default to the 7.1 branch of pkg-varnish-plus diff --git a/.circleci/config.yml b/.circleci/config.yml index ed4359880..5b7d4e41b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ parameters: default: "HEAD" pkg-commit: type: string - default: "master" + default: "7.1" dist-url: type: string default: "" From phk at FreeBSD.org Wed Mar 16 13:48:09 2022 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Wed, 16 Mar 2022 13:48:09 +0000 (UTC) Subject: [master] f2238acc7 Use the canonical -l argument so our tiniest vtesters can cope Message-ID: <20220316134809.C9FD161CF6@lists.varnish-cache.org> commit f2238acc752e54d8b4515a221dcd2bcb8f45d042 Author: Poul-Henning Kamp Date: Wed Mar 16 13:47:08 2022 +0000 Use the canonical -l argument so our tiniest vtesters can cope diff --git a/bin/varnishtest/tests/r03159.vtc b/bin/varnishtest/tests/r03159.vtc index b25a18597..f13aaaf0d 100644 --- a/bin/varnishtest/tests/r03159.vtc +++ b/bin/varnishtest/tests/r03159.vtc @@ -12,7 +12,8 @@ shell { process p1 -winsz 100 80 -log { varnishd -F -n "${tmpdir}/t" -a "${tmpdir}/sock" \ - -p vcc_err_unref=off -f "${tmpdir}/unref.vcl" 2>&1 + -p vcc_err_unref=off -f "${tmpdir}/unref.vcl" \ + -l 2m 2>&1 } -start process p1 -expect-text 0 1 "Unused sub foo, defined:" From phk at FreeBSD.org Wed Mar 16 16:04:07 2022 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Wed, 16 Mar 2022 16:04:07 +0000 (UTC) Subject: [master] 855b3c7c1 Report stdout+stderr from the child if it fails to launch. Message-ID: <20220316160407.11E4A6E29C@lists.varnish-cache.org> commit 855b3c7c1941443145087007f79e35139c5016e7 Author: Poul-Henning Kamp Date: Wed Mar 16 16:03:22 2022 +0000 Report stdout+stderr from the child if it fails to launch. diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c index 17c80cf67..ecacb49d2 100644 --- a/bin/varnishd/mgt/mgt_child.c +++ b/bin/varnishd/mgt/mgt_child.c @@ -414,21 +414,22 @@ mgt_launch_child(struct cli *cli) MCH_Fd_Inherit(heritage.cli_out, NULL); closefd(&heritage.cli_out); + child_std_vlu = VLU_New(child_line, NULL, 0); + AN(child_std_vlu); + /* Wait for cache/cache_cli.c::CLI_Run() to check in */ if (VCLI_ReadResult(child_cli_in, &u, NULL, mgt_param.cli_timeout)) { assert(u == CLIS_COMMS); pidr = waitpid(pid, &i, 0); assert(pidr == pid); - perror("Child failed on launch"); + (void)VLU_Fd(child_std_vlu, child_output); + MGT_Complain(C_ERR, "Child failed on launch"); exit(1); // XXX Harsh ? } else { assert(u == CLIS_OK); fprintf(stderr, "Child launched OK\n"); } - child_std_vlu = VLU_New(child_line, NULL, 0); - AN(child_std_vlu); - AZ(ev_listen); e = VEV_Alloc(); XXXAN(e); From martin at varnish-software.com Thu Mar 17 13:45:05 2022 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Thu, 17 Mar 2022 13:45:05 +0000 (UTC) Subject: [master] 8c3821c6d Tweak the CircleCI config to be master/release branch agnostic Message-ID: <20220317134505.6766692AA0@lists.varnish-cache.org> commit 8c3821c6d6e6e82300d481fb960a27a930f8aa39 Author: Martin Blix Grydeland Date: Thu Mar 17 13:32:27 2022 +0100 Tweak the CircleCI config to be master/release branch agnostic This tweaks the workflows in circleci so that the same configuration can be used both in the regular master workflows and the release branches, removing a brittle release process step of editing there. diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ce929b8b..bf727b86f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,6 +21,10 @@ parameters: --enable-debugging-symbols \ --disable-stack-protector \ --with-persistent-storage \ + build-pkgs: + type: string + default: "" + jobs: dist: description: Build or download varnish-x.y.z.tar.gz that is used later for the packaging jobs @@ -363,6 +367,10 @@ jobs: workflows: version: 2 commit: + unless: &packaging_cond + or: + - << pipeline.parameters.build-pkgs >> + - << pipeline.parameters.dist-url >> jobs: - distcheck: name: distcheck_centos_7 @@ -404,15 +412,9 @@ workflows: name: distcheck_archlinux dist: archlinux release: base-devel - nightly: - triggers: - - schedule: - cron: "0 4 * * *" - filters: - branches: - only: - - master - jobs: + packaging: + when: *packaging_cond + jobs: &packaging_jobs - dist - tar_pkg_tools - package: @@ -439,3 +441,12 @@ workflows: - collect_packages: requires: - package + nightly: + triggers: + - schedule: + cron: "0 4 * * *" + filters: + branches: + only: + - master + jobs: *packaging_jobs From dridi.boukelmoune at gmail.com Thu Mar 17 14:31:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 17 Mar 2022 14:31:05 +0000 (UTC) Subject: [master] a48139143 filter: Mark VRT_{Add, Remove}V[DF]P() as deprecated Message-ID: <20220317143105.AC218943BC@lists.varnish-cache.org> commit a48139143182e4b3d87d48c17bb544037ed2ebc2 Author: Dridi Boukelmoune Date: Thu Mar 17 15:25:33 2022 +0100 filter: Mark VRT_{Add,Remove}V[DF]P() as deprecated diff --git a/bin/varnishd/cache/cache_filter.h b/bin/varnishd/cache/cache_filter.h index ceee01310..2b262d1eb 100644 --- a/bin/varnishd/cache/cache_filter.h +++ b/bin/varnishd/cache/cache_filter.h @@ -93,9 +93,8 @@ enum vfp_status VFP_Suck(struct vfp_ctx *, void *p, ssize_t *lp); enum vfp_status VFP_Error(struct vfp_ctx *, const char *fmt, ...) v_printflike_(2, 3); -/* These two deprecated per 2021-12-01, add v_deprecated_ after next major */ -void VRT_AddVFP(VRT_CTX, const struct vfp *); -void VRT_RemoveVFP(VRT_CTX, const struct vfp *); +void v_deprecated_ VRT_AddVFP(VRT_CTX, const struct vfp *); +void v_deprecated_ VRT_RemoveVFP(VRT_CTX, const struct vfp *); /* Deliver processors ------------------------------------------------*/ @@ -152,9 +151,8 @@ struct vdp_ctx { int VDP_bytes(struct vdp_ctx *, enum vdp_action act, const void *, ssize_t); -/* These two deprecated per 2021-12-01, add v_deprecated_ after next major */ -void VRT_AddVDP(VRT_CTX, const struct vdp *); -void VRT_RemoveVDP(VRT_CTX, const struct vdp *); +void v_deprecated_ VRT_AddVDP(VRT_CTX, const struct vdp *); +void v_deprecated_ VRT_RemoveVDP(VRT_CTX, const struct vdp *); /* Registry functions -------------------------------------------------*/ const char *VRT_AddFilter(VRT_CTX, const struct vfp *, const struct vdp *); diff --git a/include/vrt.h b/include/vrt.h index 441095920..b149ad215 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -53,6 +53,11 @@ * Whenever something is deleted or changed in a way which is not * binary/load-time compatible, increment MAJOR version * + * NEXT (2022-09-15) + * VRT_AddVDP() deprecated + * VRT_AddVFP() deprecated + * VRT_RemoveVDP() deprecated + * VRT_RemoveVFP() deprecated * 15.0 (2022-03-15) * VRT_r_req_transport() added * VRT_Assign_Backend() added diff --git a/vmod/vmod_debug.c b/vmod/vmod_debug.c index 654b4f433..d1149b09b 100644 --- a/vmod/vmod_debug.c +++ b/vmod/vmod_debug.c @@ -453,20 +453,17 @@ event_load(VRT_CTX, struct vmod_priv *priv) priv->priv = priv_vcl; priv->methods = priv_vcl_methods; - VRT_AddVFP(ctx, &xyzzy_vfp_rot13); - VRT_AddVDP(ctx, &xyzzy_vdp_rot13); + AZ(VRT_AddFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13)); // This should fail AN(VRT_AddFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13)); // Reset the error, we know what we're doing. *ctx->handling = 0; - VRT_RemoveVFP(ctx, &xyzzy_vfp_rot13); - VRT_RemoveVDP(ctx, &xyzzy_vdp_rot13); - + VRT_RemoveFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13); AZ(VRT_AddFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13)); - VRT_AddVDP(ctx, &xyzzy_vdp_pedantic); + VRT_AddFilter(ctx, NULL, &xyzzy_vdp_pedantic); return (0); } @@ -629,7 +626,7 @@ event_discard(VRT_CTX, void *priv) AZ(ctx->msg); VRT_RemoveFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13); - VRT_RemoveVDP(ctx, &xyzzy_vdp_pedantic); + VRT_RemoveFilter(ctx, NULL, &xyzzy_vdp_pedantic); if (--loads) return (0); From dridi.boukelmoune at gmail.com Thu Mar 17 14:31:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 17 Mar 2022 14:31:05 +0000 (UTC) Subject: [master] 114319570 vrt: Move major/minor definitions above the history Message-ID: <20220317143105.BF8D7943BF@lists.varnish-cache.org> commit 114319570d3966a8216c1f851047c03bdb11c8ca Author: Dridi Boukelmoune Date: Thu Mar 17 15:28:43 2022 +0100 vrt: Move major/minor definitions above the history This puts them closer to the 'NEXT' marker to lower the risk of overlooking them in the release process. diff --git a/include/vrt.h b/include/vrt.h index b149ad215..562904942 100644 --- a/include/vrt.h +++ b/include/vrt.h @@ -46,6 +46,10 @@ # error "include vdef.h before vrt.h" #endif +#define VRT_MAJOR_VERSION 15U + +#define VRT_MINOR_VERSION 0U + /*********************************************************************** * Major and minor VRT API versions. * @@ -249,10 +253,6 @@ * vrt_acl type added */ -#define VRT_MAJOR_VERSION 15U - -#define VRT_MINOR_VERSION 0U - /***********************************************************************/ #include // NULL, size_t From dridi.boukelmoune at gmail.com Thu Mar 17 16:07:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 17 Mar 2022 16:07:05 +0000 (UTC) Subject: [master] f46014f2f build: Remove spurious break Message-ID: <20220317160705.E10C59771C@lists.varnish-cache.org> commit f46014f2f2fe37fc5092128bfaf1da849eb6d689 Author: Dridi Boukelmoune Date: Thu Mar 17 17:03:58 2022 +0100 build: Remove spurious break diff --git a/configure.ac b/configure.ac index e4e903c15..42c202d6f 100644 --- a/configure.ac +++ b/configure.ac @@ -807,7 +807,6 @@ else case $PTHREAD_CC in *gcc*) VCC_CC="$PTHREAD_CC $OCFLAGS %w $PTHREAD_CFLAGS -fpic -shared -o %o %s" - break ;; *cc) VCC_CC="$PTHREAD_CC $OCFLAGS %w -errwarn=%%all,no%%E_STATEMENT_NOT_REACHED $PTHREAD_CFLAGS -Kpic -G -o %o %s" From dridi.boukelmoune at gmail.com Thu Mar 17 16:07:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Thu, 17 Mar 2022 16:07:05 +0000 (UTC) Subject: [master] 872ca00d1 vtc: Simplify u0 Message-ID: <20220317160706.020509771F@lists.varnish-cache.org> commit 872ca00d152c064c6faa16c9b99fe70dbf3ba441 Author: Dridi Boukelmoune Date: Thu Mar 17 17:04:44 2022 +0100 vtc: Simplify u0 We no longer pass coverage flags to cc_command. diff --git a/bin/varnishtest/tests/u00000.vtc b/bin/varnishtest/tests/u00000.vtc index e568f4adb..c33bfc9e4 100644 --- a/bin/varnishtest/tests/u00000.vtc +++ b/bin/varnishtest/tests/u00000.vtc @@ -4,8 +4,7 @@ shell "varnishd -b None -C 2> ${tmpdir}/_.c" shell { varnishd -n ${tmpdir}/no_keep -C -b None 2> no_keep.c - test -s no_keep.c && ! test -d no_keep || \ - (test -f no_keep/*/vgc.gcda || test -d no_keep/*/vgc.so.dSYM) + test -s no_keep.c && ! test -d no_keep || test -d no_keep/*/vgc.so.dSYM } shell { From dridi.boukelmoune at gmail.com Mon Mar 21 16:19:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 21 Mar 2022 16:19:05 +0000 (UTC) Subject: [master] dc8f079c6 vmod_cookie: Avoid generating a trailing semi-colon Message-ID: <20220321161905.B22C4AF5AC@lists.varnish-cache.org> commit dc8f079c6183e126cfca092ed434b3f227ce55a4 Author: Dridi Boukelmoune Date: Mon Mar 14 15:34:48 2022 +0100 vmod_cookie: Avoid generating a trailing semi-colon The separator between cookies in a cookie header is "; " and we should not generate it in a way that adds a spurious ';' at the end of the cookie list. Refs #3754 diff --git a/vmod/tests/cookie_b00000.vtc b/vmod/tests/cookie_b00000.vtc index a83633cfd..8da15ef9e 100644 --- a/vmod/tests/cookie_b00000.vtc +++ b/vmod/tests/cookie_b00000.vtc @@ -18,5 +18,5 @@ varnish v1 -vcl { client c1 { txreq -url "/" rxresp - expect resp.http.X-foo == "cookie1=cookie1value; cookie3=cookie3value; cookie4=cookie4value;" + expect resp.http.X-foo == "cookie1=cookie1value; cookie3=cookie3value; cookie4=cookie4value" } -run diff --git a/vmod/tests/cookie_b00001.vtc b/vmod/tests/cookie_b00001.vtc index 9b45f740e..63626f693 100644 --- a/vmod/tests/cookie_b00001.vtc +++ b/vmod/tests/cookie_b00001.vtc @@ -16,6 +16,6 @@ varnish v1 -vcl { client c1 { txreq rxresp - expect resp.http.X-foo == "cookie1=cookie1BAD;" + expect resp.http.X-foo == "cookie1=cookie1BAD" expect resp.http.X-bar == "" } -run diff --git a/vmod/tests/cookie_b00003.vtc b/vmod/tests/cookie_b00003.vtc index af9653035..b458bcf51 100644 --- a/vmod/tests/cookie_b00003.vtc +++ b/vmod/tests/cookie_b00003.vtc @@ -13,7 +13,7 @@ varnish v1 -vcl { set resp.http.X-foo = cookie.get_string(); # Test exotic admin-supplied filter strings. - cookie.parse("bredela=eggwhites; empire=jellytots;"); + cookie.parse("bredela=eggwhites; empire=jellytots"); cookie.keep(",,,,bredela, ,empire,baz,"); set resp.http.X-bar = cookie.get_string(); @@ -25,7 +25,7 @@ varnish v1 -vcl { client c1 { txreq -url "/" rxresp - expect resp.http.X-foo == "bredela=eggwhites; empire=jellytots;" - expect resp.http.X-bar == "bredela=eggwhites; empire=jellytots;" + expect resp.http.X-foo == "bredela=eggwhites; empire=jellytots" + expect resp.http.X-bar == "bredela=eggwhites; empire=jellytots" expect resp.http.X-baz == "" } -run diff --git a/vmod/tests/cookie_b00004.vtc b/vmod/tests/cookie_b00004.vtc index d996fbee2..c1d1a9fd7 100644 --- a/vmod/tests/cookie_b00004.vtc +++ b/vmod/tests/cookie_b00004.vtc @@ -13,11 +13,11 @@ varnish v1 -vcl { set resp.http.X-foo = cookie.get_string(); # Test exotic admin-supplied filter strings. - cookie.parse("bredela=eggwhites; empire=jellytots;"); + cookie.parse("bredela=eggwhites; empire=jellytots"); cookie.filter(",,,,bredela, ,baz,"); set resp.http.X-bar = cookie.get_string(); - cookie.parse("foo=bar; bar=baz;"); + cookie.parse("foo=bar; bar=baz"); cookie.filter(req.http.none); set resp.http.X-baz = cookie.get_string(); } @@ -26,7 +26,7 @@ varnish v1 -vcl { client c1 { txreq -url "/" rxresp - expect resp.http.X-foo == "biscuit=standard; chocolatechip=verychippy;" - expect resp.http.X-bar == "empire=jellytots;" - expect resp.http.X-baz == "foo=bar; bar=baz;" + expect resp.http.X-foo == "biscuit=standard; chocolatechip=verychippy" + expect resp.http.X-bar == "empire=jellytots" + expect resp.http.X-baz == "foo=bar; bar=baz" } -run diff --git a/vmod/tests/cookie_b00008.vtc b/vmod/tests/cookie_b00008.vtc index af1bfcae9..a728d20b4 100644 --- a/vmod/tests/cookie_b00008.vtc +++ b/vmod/tests/cookie_b00008.vtc @@ -15,10 +15,10 @@ client c1 { # Insanely long cookie name. txreq -url "/" -hdr "Cookie: phohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1j=cookievalue" rxresp - expect resp.http.cookiestring == "phohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1j=cookievalue;" + expect resp.http.cookiestring == "phohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1j=cookievalue" # Insane 6KB cookie value. - txreq -url "/" -hdr "Cookie: cookie1=foobarbazfoobarbazphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1j;" + txreq -url "/" -hdr "Cookie: cookie1=foobarbazfoobarbazphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1jphohx8aingie6Ide7peephie5paip6ang4thooh4ooquai8ohvah7eiqueeki8ooth7viequ0Tha5thewiSheih5jaimaiTahr1wi8WooQuoe7loothieThahweeneichoo8cufeelu3tie5cei1iShiemiezoofox6ahcaevaihocheungai2aeghaichaingee0EiGie3Ees5ujaem5uquahpieFeelei7Ohngei1afaTooph4aiquum1aewaidatheshuh1fohhoor0hoo6aeTeiy9xougahf3jeapooshuhoob5deiwareingahth7ahf2fafeer8Oobiewai3rei8ofejohjeiye4die8Na7ze6eixajauCairoth0lek8vioyuom6eih0egho2aingoo7coh1at3niochu6osahthi0ue1Luchae1eifeupiuwaa0raidiewaijese4oozee4eihie5shaBaoreacooNg8uW9eru9kigh3Feesi8iex2pu7ohfaiBiezael6ifaujiek4nutae1aalohchoteiPuaM2chiefaicaopheKohsh6Ho1wiephieseef1daj3Pahfie2ooch8shaing5baXeiLiep9lahfe9uDaxeehielais2eix3iekiew8aiter9Foo8noo2hae7ohdie1iB7hoop3podeengooSothoojui4AhXu5Nain8ohqu8if1ue5iTheimei5oghie9sheiv4Hejah1veixahcaixie8ahyieT8Phay4daeTei1aRiemae6oicheef2miiNuoxeil1kae2nea1roh9Rei1keiwaT2eoJaiNgie0den6aideif3uechaishaec4cai2eozieb9aeN9sai9ahnielohdaeGh2kaeleiteitai0ietoo7eiCha0baiW7dai0im1jul5OWijaLo2ohh3kooxu2oFah3loob6feiw7pie9eighu8ik4chae0Athou2fah5ieQuuic0Mu1j" rxresp # We support long cookie values, should be fine. expect resp.http.cookie1 == "true" diff --git a/vmod/tests/cookie_b00009.vtc b/vmod/tests/cookie_b00009.vtc index de7a8d731..94cc88c52 100644 --- a/vmod/tests/cookie_b00009.vtc +++ b/vmod/tests/cookie_b00009.vtc @@ -14,13 +14,13 @@ varnish v1 -vcl { client c1 { txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" } -run client c2 { txreq -hdr "Cookie: __utmc=253898641; __utma=253898641.654622101.1372224466.1372224466.1372224466.1; __utmb=253898641.44.10.1372224466; __utmz=253898641.1372224466.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=index%2Bof%2Bccnp%2Bpdf" rxresp - expect resp.http.X-foo == "__utmc=253898641; __utma=253898641.654622101.1372224466.1372224466.1372224466.1; __utmb=253898641.44.10.1372224466; __utmz=253898641.1372224466.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=index%2Bof%2Bccnp%2Bpdf;" + expect resp.http.X-foo == "__utmc=253898641; __utma=253898641.654622101.1372224466.1372224466.1372224466.1; __utmb=253898641.44.10.1372224466; __utmz=253898641.1372224466.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=index%2Bof%2Bccnp%2Bpdf" } -run client c3 { @@ -40,12 +40,12 @@ client c4 { client c5 { txreq -hdr "Cookie: cookie1=foobarbaz" rxresp - expect resp.http.X-foo == "cookie1=foobarbaz;" + expect resp.http.X-foo == "cookie1=foobarbaz" } -run # Don't overflow the buffer with an edge case client c6 { txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128a;=" -hdr "X-Not-Cookie: sessionid=a707505310ddf259bb290d3ca63fc561" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128a;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128a" } -run diff --git a/vmod/tests/cookie_b00012.vtc b/vmod/tests/cookie_b00012.vtc index e0584af98..dab3b623e 100644 --- a/vmod/tests/cookie_b00012.vtc +++ b/vmod/tests/cookie_b00012.vtc @@ -27,7 +27,7 @@ client c1 { expect resp.http.X-foo == resp.http.X-bar expect resp.http.X-baz != resp.http.X-foo - expect resp.http.X-baz == "biscuit=standard; empire=jellytots;" + expect resp.http.X-baz == "biscuit=standard; empire=jellytots" expect resp.http.X-qux == "" } -run diff --git a/vmod/tests/cookie_b00013.vtc b/vmod/tests/cookie_b00013.vtc index 31624563a..9510f92d2 100644 --- a/vmod/tests/cookie_b00013.vtc +++ b/vmod/tests/cookie_b00013.vtc @@ -9,7 +9,7 @@ varnish v1 -vcl { cookie.keep_re("NOTHING_MATCHES_SO_NOTHING_KEPT$"); set resp.http.X-empty = cookie.get_string(); - cookie.parse("biscuit=standard; bredela=eggwhites; empire=jellytots;"); + cookie.parse("biscuit=standard; bredela=eggwhites; empire=jellytots"); cookie.keep_re("^b"); set resp.http.X-bees = cookie.get_string(); } @@ -19,5 +19,5 @@ client c1 { txreq -url "/" rxresp expect resp.http.X-empty == "" - expect resp.http.X-bees == "biscuit=standard; bredela=eggwhites;" + expect resp.http.X-bees == "biscuit=standard; bredela=eggwhites" } -run diff --git a/vmod/tests/cookie_r00028.vtc b/vmod/tests/cookie_r00028.vtc index 4e606887b..48ad00772 100644 --- a/vmod/tests/cookie_r00028.vtc +++ b/vmod/tests/cookie_r00028.vtc @@ -13,43 +13,43 @@ varnish v1 -vcl { client c1 { txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" } @@ -57,43 +57,43 @@ client c1 { client c2 { txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" txreq -hdr "Cookie: csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" rxresp - expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560;" + expect resp.http.X-foo == "csrftoken=0e0c3616e41a6bd561b72b7f5fc1128f; sessionid=a707505310ddf259bb290d3ca63fc560" } diff --git a/vmod/vmod_cookie.c b/vmod/vmod_cookie.c index f70f6ee4a..7113e6a18 100644 --- a/vmod/vmod_cookie.c +++ b/vmod/vmod_cookie.c @@ -441,8 +441,8 @@ vmod_get_string(VRT_CTX, struct vmod_priv *priv) CHECK_OBJ_NOTNULL(curr, VMOD_COOKIE_ENTRY_MAGIC); AN(curr->name); AN(curr->value); - VSB_printf(output, "%s%s=%s;", sep, curr->name, curr->value); - sep = " "; + VSB_printf(output, "%s%s=%s", sep, curr->name, curr->value); + sep = "; "; } res = WS_VSB_finish(output, ctx->ws, NULL); if (res == NULL) From dridi.boukelmoune at gmail.com Mon Mar 21 16:19:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 21 Mar 2022 16:19:05 +0000 (UTC) Subject: [master] 1a3b50580 vmod_cookie: Name and value are separated by equal sign Message-ID: <20220321161905.CA019AF5B0@lists.varnish-cache.org> commit 1a3b50580da6f81977ecdfc41fc053d0cacfd718 Author: Jes?s Mart?nez Novo Date: Mon Dec 13 23:45:06 2021 +0100 vmod_cookie: Name and value are separated by equal sign Cookie name and value are separated by equal sign, not colon. Signed-off-by: Dridi Boukelmoune I adjusted the docs to reflect the removal of spurious trailing semi-colon from the generated cookie string. Closes #3754 diff --git a/vmod/vmod_cookie.vcc b/vmod/vmod_cookie.vcc index e92e11e5e..69f167d02 100644 --- a/vmod/vmod_cookie.vcc +++ b/vmod/vmod_cookie.vcc @@ -67,9 +67,9 @@ Delete ``cookiename`` from internal vmod storage if it exists. Example:: sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2;"); + cookie.parse("cookie1=value1; cookie2=value2"); cookie.delete("cookie2"); - # get_string() will now yield "cookie1: value1"; + # get_string() will now yield "cookie1=value1" } $Function VOID filter(PRIV_TASK, STRING filterstring) @@ -80,10 +80,9 @@ comma-separated argument cookienames. Example:: sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2; cookie3: value3"); + cookie.parse("cookie1=value1; cookie2=value2; cookie3=value3"); cookie.filter("cookie1,cookie2"); - # get_string() will now yield - # "cookie3: value3"; + # get_string() will now yield "cookie3=value3" } @@ -95,10 +94,9 @@ regular expression ``expression``. Example:: sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2; cookie3: value3"); + cookie.parse("cookie1=value1; cookie2=value2; cookie3=value3"); cookie.filter_re("^cookie[12]$"); - # get_string() will now yield - # "cookie3: value3"; + # get_string() will now yield "cookie3=value3" } $Function VOID keep(PRIV_TASK, STRING filterstring) @@ -109,10 +107,9 @@ comma-separated argument cookienames. Example:: sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2; cookie3: value3"); + cookie.parse("cookie1=value1; cookie2=value2; cookie3=value3"); cookie.keep("cookie1,cookie2"); - # get_string() will now yield - # "cookie1: value1; cookie2: value2;"; + # get_string() will now yield "cookie1=value1; cookie2=value2" } $Function VOID keep_re(PRIV_TASK, REGEX expression) @@ -123,10 +120,9 @@ expression ``expression``. Example:: sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2; cookie3: value3"); + cookie.parse("cookie1=value1; cookie2=value2; cookie3=value3"); cookie.keep_re("^cookie[12]$"); - # get_string() will now yield - # "cookie1: value1; cookie2: value2;"; + # get_string() will now yield "cookie1=value1; cookie2=value2" } @@ -156,7 +152,7 @@ Example:: import std; sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2;"); + cookie.parse("cookie1=value1; cookie2=value2"); std.log("cookie1 value is: " + cookie.get("cookie1")); } @@ -202,7 +198,7 @@ Example:: import std; sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2;"); + cookie.parse("cookie1=value1; cookie2=value2"); std.log("cookie1 value is: " + cookie.get_re("^cookie1$")); } @@ -227,7 +223,7 @@ Example:: import std; sub vcl_recv { - cookie.parse("cookie1: value1; cookie2: value2;"); + cookie.parse("cookie1=value1; cookie2=value2"); if (cookie.isset("cookie2")) { std.log("cookie2 is set."); } From dridi.boukelmoune at gmail.com Mon Mar 21 16:19:05 2022 From: dridi.boukelmoune at gmail.com (Dridi Boukelmoune) Date: Mon, 21 Mar 2022 16:19:05 +0000 (UTC) Subject: [master] 5424da941 changes: Add a red flag on vmod_cookie changes Message-ID: <20220321161905.E9E5BAF5B5@lists.varnish-cache.org> commit 5424da941529503c724911d8141e6824db756f88 Author: Dridi Boukelmoune Date: Mon Mar 21 15:58:01 2022 +0100 changes: Add a red flag on vmod_cookie changes diff --git a/doc/changes.rst b/doc/changes.rst index 4b2371646..654d06150 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -31,6 +31,14 @@ http://varnish-cache.org/docs/trunk/whats-new/index.html and via individual releases. These documents are updated as part of the release process. +=============================== +Varnish Cache NEXT (2022-09-15) +=============================== + +* Cookie headers generated by vmod_cookie no longer have a spurious trailing + semi-colon (``';'``) at the end of the string. This could break VCL relying + on the previous incorrect behavior. + ================================ Varnish Cache 7.1.0 (2022-03-15) ================================ From phk at FreeBSD.org Tue Mar 29 18:06:07 2022 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Tue, 29 Mar 2022 18:06:07 +0000 (UTC) Subject: [master] a53079e38 Change the OS/X workaround for pthread_cond_timedwait() returning EINVAL Message-ID: <20220329180607.96FA8AC395@lists.varnish-cache.org> commit a53079e385abcfba4bfe88414a52e94c1dc444c5 Author: Poul-Henning Kamp Date: Tue Mar 29 18:04:45 2022 +0000 Change the OS/X workaround for pthread_cond_timedwait() returning EINVAL diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c index 827a12343..6615897eb 100644 --- a/bin/varnishd/cache/cache_lck.c +++ b/bin/varnishd/cache/cache_lck.c @@ -229,34 +229,6 @@ Lck_CondWaitUntil(pthread_cond_t *cond, struct lock *lck, vtim_real when) struct ilck *ilck; struct timespec ts; -#if defined (__APPLE__) - /* - * I hate woo-doo programming in all it's forms and all it's - * manifestations, but for reasons I utterly fail to isolate - * yielding here is stops OSX from throwing a EINVAL to the - * pthread_cond_wait(3) call. - * - * I have tried very hard to determine if any of the three - * arguments are in fact invalid, and found nothing which - * even hints that it might be the case, and with high probability - * repeating the failed call with the exact same arguments - * will succeed. - * - * If you want to dive into this you can trigger the situation - * approx 30% of the time with: - * - * cd .../vmods && make -j check - * - * Env: - * Darwin Kernel Version 20.5.0: - * Sat May 8 05:10:31 PDT 2021; - * root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64 - * - * 20211027 /phk - */ - pthread_yield_np(); -#endif - AN(lck); CAST_OBJ_NOTNULL(ilck, lck->priv, ILCK_MAGIC); AN(ilck->held); @@ -270,6 +242,34 @@ Lck_CondWaitUntil(pthread_cond_t *cond, struct lock *lck, vtim_real when) ts = VTIM_timespec(when); assert(ts.tv_nsec >= 0 && ts.tv_nsec <= 999999999); errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts); +#if defined (__APPLE__) + /* + * I hate woo-doo programming in all it's forms and all it's + * manifestations, but for reasons I utterly fail to isolate, + * OSX sometimes throws an EINVAL. + * + * I have tried very hard to determine if any of the three + * arguments are in fact invalid, and found nothing which + * even hints that it might be the case. + * + * So far I have yet to see a failure if the exact same + * call is repeated after a very short sleep. + * + * Calling pthread_yield_np() instead of sleaping /mostly/ + * works as well, but still fails sometimes. + * + * Env: + * Darwin Kernel Version 20.5.0: + * Sat May 8 05:10:31 PDT 2021; + * root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64 + * + * 20220329 /phk + */ + if (errno == EINVAL) { + usleep(100); + errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts); + } +#endif assert(errno == 0 || errno == ETIMEDOUT || errno == EINTR); From phk at FreeBSD.org Wed Mar 30 14:22:07 2022 From: phk at FreeBSD.org (Poul-Henning Kamp) Date: Wed, 30 Mar 2022 14:22:07 +0000 (UTC) Subject: [master] 271e2b830 Let the VSL catch up between clients. This seems to stabilize this test. Message-ID: <20220330142207.965E7A860B@lists.varnish-cache.org> commit 271e2b8307ff56942ce05f04b90948027ca60cd8 Author: Poul-Henning Kamp Date: Wed Mar 30 14:21:23 2022 +0000 Let the VSL catch up between clients. This seems to stabilize this test. diff --git a/bin/varnishtest/tests/t02022.vtc b/bin/varnishtest/tests/t02022.vtc index 39fbc4c68..a646893be 100644 --- a/bin/varnishtest/tests/t02022.vtc +++ b/bin/varnishtest/tests/t02022.vtc @@ -53,6 +53,8 @@ varnish v1 -expect MAIN.n_lru_nuked == 0 barrier b1 sync client c1 -wait +varnish v1 -vsl_catchup + varnish v1 -expect SM?.rxbuf.g_bytes == 0 varnish v1 -expect SM?.Transient.g_bytes == 0 varnish v1 -expect MAIN.n_lru_nuked == 0 @@ -64,6 +66,8 @@ client c2 { expect resp.bodylen == 1048000 } -run +varnish v1 -vsl_catchup + varnish v1 -expect SM?.rxbuf.g_bytes >= 1048000 varnish v1 -expect MAIN.n_lru_nuked == 0 @@ -90,5 +94,7 @@ varnish v1 -expect MAIN.n_lru_nuked == 1 barrier b1 sync client c3 -wait +varnish v1 -vsl_catchup + varnish v1 -expect SM?.rxbuf.g_bytes == 0 varnish v1 -expect SM?.Transient.g_bytes == 0