- 25 Jul, 2020 1 commit
-
-
Poul-Henning Kamp authored
-
- 24 Jul, 2020 2 commits
-
-
Poul-Henning Kamp authored
-
Nils Goroll authored
When varnishd is started as root (or otherwise will a full privilege set), the user will rightly expect that whatever permissions and mode bits are set for a socket, varnishd will fix them to the specification from the -a argument.
-
- 20 Jul, 2020 1 commit
-
-
Dridi Boukelmoune authored
Spotted by Coverity
-
- 17 Jul, 2020 1 commit
-
-
Nils Goroll authored
-
- 13 Jul, 2020 6 commits
-
-
Poul-Henning Kamp authored
Currently fails with "unsupported", later will turn into BLOB.
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
Fixes: #3360
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
- 06 Jul, 2020 2 commits
-
-
Nils Goroll authored
in VRT_priv_task() we asserted that only one of ctx->req and ctx->bo is set when not in vcl_pipe {}, but we also need to extend that assertion to when ctx->method == 0 after vcl_pipe as finished because VRT_priv_task() could be called from director resolution. Being at it, I also noticed that our behavior in vcl_pipe {} is inconsistent as, from the shard director perspective, it is a backend method. So now, vcl_pipe {} is handled like vcl_backend_* {}. We still need to make up our mind about #3329 / #3330 and depending on the outcome we might need to touch some places again which were changed in this commit. Fixes #3361
-
Nils Goroll authored
-
- 02 Jul, 2020 18 commits
-
-
Dridi Boukelmoune authored
The temporary code that accumulated in order to implement generic type methods is now a bit more tidy.
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
VMODs can now use the same facility as native types to find methods based on the type of the instance instead of the instance itself. Because SYM_METHOD symbols are tied to a type instead of an instance we lose that "extra" argument. To circumvent this, an expression will keep track of the instance before evaluating a method. With this, VCL expression evaluation is no longer aware of methods implementation details, and feeds entirely from the symbol table.
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
Although at this point we are still using the per-instance symbols from the table. For example with the following: new fb1 = directors.fallback(); new fb2 = directors.fallback(); We will get the following entries in the symbol table: object directors.fallback 41 41 directors.fallback method VOID 40 41 directors.fallback.add_backend method BACKEND 40 41 directors.fallback.backend method VOID 40 41 directors.fallback.remove_backend instance INSTANCE 41 41 fb1 func VOID 40 41 fb1.add_backend func BACKEND 40 41 fb1.backend func VOID 40 41 fb1.remove_backend instance INSTANCE 41 41 fb2 func VOID 40 41 fb2.add_backend func BACKEND 40 41 fb2.backend func VOID 40 41 fb2.remove_backend As long as the func symbols exist, and the instance symbols have the generic type INSTANCE, the expression parser will not try to evaluate the method symbols. But the type-based symbols aren't ready to be evaluated yet so we can have peaceful cohabitation for now. This makes this part of the code even more complicated but it will eventually straighten up once the SYM_FUNC symbols are gone.
-
Dridi Boukelmoune authored
Now they appear as ${vmod}.${constructor} instead of VOID in the symbol table. The effective type is based on the VMOD's name, regardless of whether it was imported with an alias or not.
-
Dridi Boukelmoune authored
This enables the possibility for other kinds of SYM_METHOD symbols with different parsing rules.
-
Dridi Boukelmoune authored
Technically the lookup is TYPE.METHOD so it's not as simple as calling VCC_SymbolGet() with the correct namespace.
-
Dridi Boukelmoune authored
The SYM_METHOD kind of symbol was already present but never used so it just found its purpose. They appear in their dedicated symbol table: /* * Symbol Table MAIN * * reserved VOID 41 41 acl * reserved VOID 41 41 backend * [...] */ /* * Symbol Table TYPE * * none VOID 40 41 BACKEND * method BACKEND 40 41 BACKEND.resolve * none VOID 40 41 STEVEDORE * method BYTES 40 41 STEVEDORE.free_space * method BOOL 40 41 STEVEDORE.happy * method BYTES 40 41 STEVEDORE.used_space * none VOID 40 41 STRINGS * method STRING 40 41 STRINGS.lower * method STRING 40 41 STRINGS.upper */ Unlike VMOD functions or object methods, native type methods are never invoked as a standalone statement: strings.upper(); They are only evaluated atop an expression: (string expression).upper(); So any VMOD named after a type, like vmod_blob, should not conflict with native type methods in the symbol table. Unless a symbol already exists in the MAIN namespace, like reserved keywords acl and backend.
-
Dridi Boukelmoune authored
This introduces two namespaces MAIN and TYPE to allow top-level symbol collisions for type methods. For example, `backend` is a reserved keyword but `backend.resolve` is a type method. It is impossible to declare such a method symbol because it would require its parent `backend` symbol to be a type symbol. There would be a conflict between two `backend` symbols of different kinds. The same would apply if the BLOB type had methods and vmod_blob was imported. At this point only the MAIN namespace is used but the split enables the symbolization of types and type methods down the line.
-
Dridi Boukelmoune authored
This is a first step towards making expression parsing more agnostic and type methods more prevalent.
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
For now, this is a copy of struct vcc_methods used in expression parsing and the list includes type properties as well.
-
Dridi Boukelmoune authored
Some assertions or expectations needed to loosen to accomodate $OBJ, $FUNC and $METHOD entries under the same roof. There is a SYM_METHOD symbol kind that is currently not used, and shouldn't be until VMOD methods are per-object symbols instead of per-instance. Once we reach that point, it becomes possible to simplify further and move more things in the func_sym() function.
-
Dridi Boukelmoune authored
-
Dridi Boukelmoune authored
Instead, register all the functions and object constructors at import time.
-
Dridi Boukelmoune authored
It might not be installed as /usr/bin/clang, and there's a mismatch anyway between the check and the outcome. For example on my system's $PATH clang is currently driven by ccache is available at /usr/lib64/ccache/clang.
-
Dridi Boukelmoune authored
In order to bootstrap a $(builddir) outside of $(srcdir) until now the first step needed was to populate the environment. If for example one wants to work from a build/ sub-directory the shortest autogen.des invocation would look like: SRCDIR=.. ../autogen.des [configure options...] Since we can infer $(srcdir) from autogen.des' relative path, it is now possible to simply do this: ../autogen.des [configure options...] It is still possible to provide a specific SRCDIR, even to a different directory but the default should now work out of the box.
-
- 01 Jul, 2020 1 commit
-
-
Dridi Boukelmoune authored
We can get rid of autogen.des' egrep command used to silence this warning too. In fact we can even remove the subshell and simply call autoreconf directly. The problem with egrep is the loss of a meaningful exit status for the autoreconf invocation. I also enabled autoreconf's verbose output.
-
- 30 Jun, 2020 1 commit
-
-
Dridi Boukelmoune authored
We override vmod_debug's LDFLAGS, so that warning is gone.
-
- 29 Jun, 2020 1 commit
-
-
Dridi Boukelmoune authored
Instead of calling all VCC files vmod.vcc they were renamed to vmod_foo.vcc and instead of generating vcc_if.[ch] we do the same thing with vcc_foo_if.[ch]. This a manual mechanical change that will then be picked up by vmodtool's automake boilerplate generator. Better diff with the --word-diff --word-diff-regex=. options.
-
- 24 Jun, 2020 1 commit
-
-
Nils Goroll authored
-
- 23 Jun, 2020 2 commits
-
-
Nils Goroll authored
Ref https://github.com/varnishcache/varnish-cache/pull/3315#discussion_r429796022 OKed by phk on irc. VRT_DirectorResolve() was the name originally proposed in #2680, which was renamed in #3311 and accepted by me to get ahead. Not that Dridi prefers the original name and phk goes along, we change it back before the next release.
-
Nils Goroll authored
recover a minor improvement from #2680: This commit is to emit slightly different error messages to differentiate between the cases "no backend set in vcl" and "none returned from the director". Includes minor polishing Ref #2860 #3311
-
- 18 Jun, 2020 3 commits
-
-
Dridi Boukelmoune authored
With a separate autoconf macro to preserve existing behavior. While at it, I got rid of some intermediate processing in the generated configure script that should result in slightly smaller scripts for third party VMODs.
-
Nils Goroll authored
note: on SmartOS, it should be part of the base install Ref #3309
-
Nils Goroll authored
This reverts commit 970c59ed. this has been discussed on irc. I agree that not rebuilding man pages when they are already there makes sense. But not building man pages when we could, does not make any sense to me. And enforcing maintainer mode to build from git does not seem to make any sense to me either.
-