<div dir="ltr">Yet another alternative might be (and it pains me to say that, but maybe it’s required to not break people’s setups) to have the service file start a wrapper shell script which evaluates /etc/default/varnish before starting varnish.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 1, 2017 at 7:29 AM, Stig Sandbeck Mathisen <span dir="ltr"><<a href="mailto:ssm@debian.org" target="_blank">ssm@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Michael Stapelberg <<a href="mailto:stapelberg@debian.org">stapelberg@debian.org</a>> writes:<br>
<br>
> Hi,<br>
><br>
> Gregory Colpart <<a href="mailto:reg@evolix.fr">reg@evolix.fr</a>> writes:<br>
>> tags 749272 - wontfix<br>
>> severity 749272 serious<br>
>> retitle 749272 varnish doesn't source /etc/default/varnish when started but uses it when reloaded<br>
><br>
> This bug’s severity now results in varnish and, transitively,<br>
> freeradius being removed from testing, so it warrants timely<br>
> action. Whether that’s a downgrade or a fix is up to the package<br>
> maintainers (ssm?).<br>
><br>
> FWIW, I think the request to load environment variable files is<br>
> reasonable. It’s not idiomatic for systemd, but it is a widely used<br>
> technique in Debian and will smoothen the transition for our users.<br>
<br>
</span>A problem with /etc/default/varnish is that it is a shell script<br>
fragment, with examples using interpolation, and not just key=value<br>
statements.  If someone has used "Alternative 3" for Varnish from that<br>
file, the "reload" script will still fail when using systemd.<br>
<br>
I think a fix for this issue may be:<br>
<br>
* remove the reload action from systemd.<br>
<br>
* Possibly patch the reload script to ensure it does not attempt to run<br>
  when using systemd, by checking for the presence of<br>
  "/run/systemd/system" and exit with a message if it is present.<br>
<br>
I wrote that reload-vcl script long ago, and it has developed other<br>
problems as varnish has developed, and probably needs to be rewritten<br>
from scratch.<br>
<br>
It needs to synchronize its varnishd command line option parser with<br>
what varnishd may possibly use, and that was last done a long time ago.<br>
<br>
"What should the varnish service actually reload when told to reload"<br>
has multiple options.  The VCL file used when starting up?  The compiled<br>
VCL from starting up? The VCL file last loaded, etc.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Stig Sandbeck Mathisen<br>
<a href="https://fnord.no/" rel="noreferrer" target="_blank">https://fnord.no/</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>