On Wed, May 16, 2018 at 9:20 AM, Poul-Henning Kamp <p...@phk.freebsd.dk> wrote: > -------- > In message > <CABoVN9CUMa3=yzbgva7s6p5qcux7-xkjj8smihvmzaozdas...@mail.gmail.com> > , Dridi Boukelmoune writes: >>> => new CLI command: backend.tell <glob> args >>> => ... if glob matches multiple backends, error-returns are ignored >>> => ... Should "?" args be magic ? >> >>It occurred to me that directors listening to the CLI via a backend.tell >>command is a very special case that we could otherwise generalize >>to a vmod.cmd CLI command. This would allow modules like xkey >>to purge either from VCL or the CLI, just like ban: >> >> vmod.cmd <vmod-name> command [args...] > > That's a sensible generalization, but in difference from the > backend targeted version, it will be up to the vmod itself to > look a string up to find a backend etc.
And you may have several competing vmods loaded with the same name thanks to vmod caching. I'm aware of the can of worms it opens (competing vmods, temperature, active vs labels...) but thought it would be worth mentioning. Then it's up to the director implementation to come batteries^Wcli-included and upstream Varnish could set an example with vmod_directors while Varnish Software could probably find a couple cases like the one I outlined for vmod_xkey to help the generalization. I think that many people would be happy to issue xkey purges via the CLI much like bans and not have to worry about ACLs or other security concerns. Cheers _______________________________________________ varnish-dev mailing list varnish-dev@varnish-cache.org https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev