squid3: systemctl reports squid is running when there is a bungled squid.conf and it has exited.

Bug #1544400 reported by Stuart Humphries
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
squid3 (Debian)
Fix Released
Unknown
squid3 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

found this is fixed in debian:

squid3: systemctl reports squid is running when there is a bungled squid.conf and it has exited.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800341

applying
sudo mkdir /etc/systemd/system/squid3.service.d
cat <<EOF | sudo tee /etc/systemd/system/squid3.service.d/pid.conf
[Service]
RemainAfterExit=no
PIDFile=/var/run/squid3.pid
EOF

fixes issue

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: squid3 3.3.8-1ubuntu16
ProcVersionSignature: Ubuntu 4.2.0-27.32-generic 4.2.8-ckt1
Uname: Linux 4.2.0-27-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
Date: Thu Feb 11 11:23:48 2016
InstallationDate: Installed on 2016-02-05 (5 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: squid3
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stuart Humphries (stuartabramshumphries) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in squid3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Amos Jeffries (yadi) wrote :

The squid3.service file is auto-generated. The actual upstream fix was:

commit 6ac65f75a971a4a87c18766f3fe9969e91cef591
Author: Mathieu Parent <<email address hidden> for git.debian.org>
Date: Thu Oct 8 09:40:50 2015 +0200

    Set pidfile for systemd's sysv-generator

    This actually changes the followind settings (from systemctl cat squid.service):
    from:
      [Service]
      RemainAfterExit=yes
    to:
      [Service]
      RemainAfterExit=no
      PIDFile=/var/run/squid.pid

diff --git a/debian/squid.rc b/debian/squid.rc
index 204b676..a27fd88 100644
--- a/debian/squid.rc
+++ b/debian/squid.rc
@@ -4,6 +4,8 @@
 #
 # Version: @(#)squid.rc 1.0 07-Jul-2006 <email address hidden>
 #
+# pidfile: /var/run/squid.pid
+#
 ### BEGIN INIT INFO
 # Provides: squid
 # Required-Start: $network $remote_fs $syslog

Changed in squid3 (Debian):
status: Unknown → Fix Released
Revision history for this message
Alexander List (alexlist) wrote :

Steps to reproduce:

1) install squid3 (wily)
2) systemd is able to start/stop squid3
3) break the config (add a syntax error that prevents squid3 from starting)
4) neither manual nor systemd startup of squid3 work (expected)
5) fix the config
6) manual startup works again (expected), systemctl start squid3 does not (unexpected)

Changed in squid3 (Ubuntu):
importance: Undecided → High
Revision history for this message
Robie Basak (racb) wrote :

I think this may be fixed in xenial-proposed.

Changed in squid3 (Ubuntu):
milestone: none → ubuntu-16.04
Revision history for this message
Joshua Powers (powersj) wrote :

Agreed fixed in Xenial and newer, marking fix released

Changed in squid3 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.