/etc/default/varnish is ignored (fixed values in systemd service)

Bug #1573561 reported by Claudio Kuenzler on 2016-04-22
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Medium
Unassigned
varnish (Ubuntu)
Medium
Unassigned

Bug Description

This is on a new installation of Ubuntu 16.04 xenial with Varnish 4.1.1-1.

Any modification of /etc/default/varnish is being ignored by the daemon. Turns out that all the values are fixed in the systemd service of varnish (/lib/systemd/system/varnish.service):

--------------------------------------------
[Unit]
Description=Varnish HTTP accelerator
Documentation=https://www.varnish-cache.org/docs/4.1/ man:varnishd

[Service]
Type=simple
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
ExecReload=/usr/share/varnish/reload-vcl
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true

[Install]
WantedBy=multi-user.target
--------------------------------------------

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: varnish 4.1.1-1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Fri Apr 22 14:07:10 2016
InstallationDate: Installed on 2016-04-18 (4 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Beta amd64 (20160325)
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: varnish
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.default.varnish: 2016-04-22T14:01:03.786366

Claudio Kuenzler (napsty) wrote :
summary: - /etc/default/varnish is ignored (fixed in systemd service)
+ /etc/default/varnish is ignored (fixed values in systemd service)
Knut Ingvald Dietzel (kid) wrote :

Hi,

Use a systemd drop-in config snippet. This will override only the relevant lines.

Ref. https://github.com/varnish/Varnish-Cache/pull/92#

--
Best regards,
Knut

Claudio Kuenzler (napsty) wrote :

Thats a good hint, Knut. However on Ubuntu's side, the /etc/default/varnish file should disappear as it only creates confusion.

Knut Ingvald Dietzel (kid) wrote :

Yes, /etc/default/varnish is obsolete and should be discarded.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in varnish (Ubuntu):
status: New → Confirmed
Changed in varnish (Ubuntu):
importance: Undecided → Medium
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers