- 18 Jan, 2016 6 commits
-
-
Dridi Boukelmoune authored
By the time we decide to switch to a VCL, it must be warm and usable. The deprecated VCL_EVENT_USE should not get in the way.
-
Dridi Boukelmoune authored
Don't update the state of the VCL to warm if it failed, and don't start the child if the active VCL failed to warm up.
-
Dridi Boukelmoune authored
The implementation is similar to the load/discard dance when a load fails. New VGC functions are introduced iff the VCL has at least one VMOD handling events. The generated code looks like this: static unsigned vgc_inistep; static unsigned vgc_warmupstep; ... static int VGC_Load(VRT_CTX) { ... } static int VGC_Discard(VRT_CTX) { ... } static int VGC_Warmup(VRT_CTX, enum vcl_event_e ev) { vgc_warmupstep = 0; /* 4 */ if (Vmod_debug_Func._event(ctx, &vmod_priv_debug, ev)) return (1); vgc_warmupstep = 4; return (0); } static int VGC_Use(VRT_CTX, enum vcl_event_e ev) { /* 4 */ if (Vmod_debug_Func._event(ctx, &vmod_priv_debug, ev)) return (1); return (0); } static int VGC_Cooldown(VRT_CTX, enum vcl_event_e ev) { int retval = 0; /* 4 */ if (vgc_warmupstep >= 4 && Vmod_debug_Func._event(ctx, &vmod_priv_debug, ev) != 0) retval = 1; return (retval); } static int VGC_Event(VRT_CTX, enum vcl_event_e ev) { if (ev == VCL_EVENT_LOAD) return(VGC_Load(ctx)); if (ev == VCL_EVENT_WARM) return(VGC_Warmup(ctx, ev)); if (ev == VCL_EVENT_USE) return(VGC_Use(ctx, ev)); if (ev == VCL_EVENT_COLD) return(VGC_Cooldown(ctx, ev)); if (ev == VCL_EVENT_DISCARD) return(VGC_Discard(ctx)); return (1); } However, if there are no VMODs handling events, no new functions shall be generated, leading to code looking like this: static unsigned vgc_inistep; static unsigned vgc_warmupstep; ... static int VGC_Load(VRT_CTX) { ... } static int VGC_Discard(VRT_CTX) { ... } static int VGC_Event(VRT_CTX, enum vcl_event_e ev) { if (ev == VCL_EVENT_LOAD) return(VGC_Load(ctx)); if (ev == VCL_EVENT_DISCARD) return(VGC_Discard(ctx)); (void)vgc_warmupstep; return (0); }
-
Dridi Boukelmoune authored
It is also possible to convey a message to the CLI. In case of a failure the VCL is cooled down. VCL_Load may now fail with either CLIS_PARAM or CLIS_CANT.
-
Poul-Henning Kamp authored
concurrent -C tests don't collided. Problem spotted by: fgs
-
Poul-Henning Kamp authored
Fixes: #1802
-
- 15 Jan, 2016 3 commits
-
-
Federico G. Schwindt authored
-
Federico G. Schwindt authored
-
Lasse Karstensen authored
-
- 14 Jan, 2016 2 commits
-
-
Lasse Karstensen authored
-
Lasse Karstensen authored
-
- 13 Jan, 2016 3 commits
-
-
Federico G. Schwindt authored
This was already called and has not been any changes since then.
-
Federico G. Schwindt authored
If we don't have enough space for the requested size, don't xxxassert, just mark the overflow and return 0. Discussed with daghf@ and dridi@.
-
Poul-Henning Kamp authored
changing the storage list. Fixes: #1839
-
- 12 Jan, 2016 1 commit
-
-
Poul-Henning Kamp authored
-
- 11 Jan, 2016 9 commits
-
-
Dridi Boukelmoune authored
This reverts commit f4895da5, there are pending changes in semantics in VCL temperature that conflict with this commit.
-
Poul-Henning Kamp authored
Dridi: Not XXX comments
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
the fetching busyobj is no longer.
-
Poul-Henning Kamp authored
sequence.
-
Poul-Henning Kamp authored
rather than have the fetch code make a blanket ban.
-
Dridi Boukelmoune authored
The two functions are separated in order to have self-documenting signatures because one class of events is (or will be) allowed to fail while the other MUST be failsafe.
-
Dridi Boukelmoune authored
This paves the way towards failing VCL_EVENT_WARM events in VMODs. If setting the temperature fails, we may need to carry a message back to the CLI and other bits of context.
-
Dridi Boukelmoune authored
Make a clear distinction between (struct vclprog).warm that is used as a boolean, unlike the second parameter of mgt_vcl_setstate. We don't use an actual C enum but const char[] to make debugging easier.
-
- 08 Jan, 2016 16 commits
-
-
Poul-Henning Kamp authored
import vmod from "/some/dir/" and have the default vmod shlib filename appended.
-
Poul-Henning Kamp authored
know the filename of the -f argument, it should be possible to include "./" relative to it. The footnote is that the include is resolved at lower privlevel than the -f file is read, so in really obscure cases you could have really obscure error messages.
-
Poul-Henning Kamp authored
VCL file, and illegal everywhere else. This makes it easier to distribute "VCL-packages" Test-case written by: Kacper
-
Poul-Henning Kamp authored
the VCL fileopening logic in mgt so we have it only one place.
-
Poul-Henning Kamp authored
away const.
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
Ondřej Nový authored
-
Dridi Boukelmoune authored
-
Poul-Henning Kamp authored
-
Geoff Simmons authored
-
Geoff Simmons authored
all other methods use rdlock
-
Dridi Boukelmoune authored
-
Poul-Henning Kamp authored
for more clarity, before we start hacking VCC further.
-