Odd one, varnish doesn't recognize symbol for std.rand
Guillaume Quintard
guillaume.quintard at gmail.com
Fri Aug 25 18:33:41 UTC 2023
Please use the varnish-misc for that kind of questions (I know it failed
previously, let's try again)
you want `std.random()`, not `std.rand()`:
https://varnish-cache.org/docs/trunk/reference/vmod_std.html#std-random
--
Guillaume Quintard
On Fri, Aug 25, 2023 at 10:14 AM Kari Cowan <kcowan at alm.com> wrote:
> Probably a stupid question, but I have at the top of my file:
>
> import std;
>
> But varnish doesn't recognize symbol for std.rand
>
>
> Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: Message from
> VCC-compiler:
> Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: Symbol not found:
> 'std.rand'
> Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: At:
> ('/etc/varnish/default.vcl' Line 94 Pos 17) -- (Pos 24)
> Aug 25 03:03:35 almstgvarnish124 varnishd[910081]: if
> (std.rand(0, 100) < 50) {
> Aug 25 03:03:35 almstgvarnish124 varnishd[910081]:
> ----------------########----------------
>
> Seems odd... I thought it was included in the 7.3 distribution. How do I
> fix that?
>
> ---
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20230825/63e45674/attachment.html>
More information about the varnish-dev
mailing list