varnishcache / pkg-varnish-cache

Package building scripts for official Debian and Redhat packages of Varnish Cache.
22 stars 32 forks source link

Changed varnishreload to send commands to varnishadm as a batch #170

Closed Bilge closed 11 months ago

Bilge commented 11 months ago

This fixes #168, but comes with some trade-offs:

  1. We can no longer decorate the output of varnishadm with our own. This is unavoidable as far as I know, with the limitations of Bash.

    I even tried assigning STDOUT to FD3 and sending our decorations using >&3 echo invocations, but this causes all our decorations to either appear before all output emitted by varnishadm, or after, depending on the specific semantics used, but there is no way to interlace our output with that of varnishadm in the intuitive manner we expect (as previously).

  2. Due to a bug in varnishadm, output cannot be suppressed when the commands are successful since any commands so sent via STDIN will always cause varnishadm to exit with 0 (success) status. See: varnishcache/varnish-cache/issues/4012.
dridi commented 11 months ago

Thank you for your contribution, but for several reasons, some of them mentioned in #168 I'm ruling out this approach for now.