varnish-cache icon indicating copy to clipboard operation
varnish-cache copied to clipboard

vsm: Drastically refine status checks

Open dridi opened this issue 2 years ago • 2 comments

From the main patch of the series:

Roughly:

  • index hash change means restarted
  • index new plus or minus means changed
  • reopening the index means restarted

This aligns with my POLA expectations, except for one we can do nothing about after the removal of SIGNULL liveness checks.

Refs b845c2789cae4f165e30a3d0f3af1bfbbeca98ee

I wasted a fair amount of time trying to get transaction logs from a VTC involving a restart of the cache process. Ever since we stopped sending SIGNULL the cache process became virtually always running once started for the first time. Especially since vtc_varnish would only check the VSM_WRK_RUNNING flag.

Between a probable copy-pasta mistake and alleged logic errors, the VSM_WRK_CHANGED flag was effectively dead.

It turned out to be really hard to test, so I started a minimal vtc_vsm facility, and it became obscenely easy.

I picked a test case to test the result, and it wasn't even restarting the child process correctly...

This is very much incomplete, except for the overall structure of the patch series (I cut some corners) and this code has not seen anything remotely close to production.

And for now, I can go back to my troubleshooting in peace.

dridi avatar Jul 04 '23 16:07 dridi

The test failure is unrelated and fixed by https://github.com/varnishcache/varnish-cache/pull/3955.

dridi avatar Jul 10 '23 06:07 dridi

Other than a question about what constitutes a restart, this looks fine so far.

drodden avatar Jul 12 '23 14:07 drodden

I rebased against master and brought back "SIGNULL" handling. Everything is ready for a formal review, except the bits in varnishtest. I remembered this patch series while revisiting the VSM code.

dridi avatar May 25 '24 07:05 dridi

ping @drodden

daghf avatar May 28 '24 15:05 daghf

A couple of very minor things, but otherwise looks fine to me.

drodden avatar May 29 '24 15:05 drodden

This is ready for prime time.

dridi avatar Jun 07 '24 17:06 dridi

bugwash: merge

dridi avatar Jun 10 '24 13:06 dridi