Comment 12 for bug 1738412

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

xenial verification

confirming the bug:
root@xenia-squid-restart-1738412:~# apt-cache policy squid
squid:
  Installed: 3.5.12-1ubuntu7.5
  Candidate: 3.5.12-1ubuntu7.5
  Version table:
 *** 3.5.12-1ubuntu7.5 500
        500 http://br.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages

# confirming reload doesn't restart or kill the service
ubuntu@xenia-squid-restart-1738412:~$ pidof squid
4280
ubuntu@xenia-squid-restart-1738412:~$ sudo service squid reload
ubuntu@xenia-squid-restart-1738412:~$ pidof squid
4280

# corrupting the config file and trying one more time
ubuntu@xenia-squid-restart-1738412:~$ echo "acl nonsense nonsense nonsense" | sudo tee -a /etc/squid/squid.conf
acl nonsense nonsense nonsense
ubuntu@xenia-squid-restart-1738412:~$ sudo service squid reload
ubuntu@xenia-squid-restart-1738412:~$
ubuntu@xenia-squid-restart-1738412:~$ pidof squid
4280
ubuntu@xenia-squid-restart-1738412:~$ pidof squid
ubuntu@xenia-squid-restart-1738412:~$

Indeed after a while squid isn't running anymore.

Status shows it failed:
ubuntu@xenia-squid-restart-1738412:~$ sudo service squid status
● squid.service - LSB: Squid HTTP Proxy version 3.x
   Loaded: loaded (/etc/init.d/squid; bad; vendor preset: enabled)
   Active: active (exited) since Mon 2018-11-12 18:49:18 UTC; 13min ago
...
Nov 12 18:51:56 xenia-squid-restart-1738412 squid[4280]: Squid Parent: (squid-1) process 4505 will not be restarted due to repeated, frequent failures
Nov 12 18:51:56 xenia-squid-restart-1738412 squid[4280]: Exiting due to repeated, frequent failures

Now retrying with the new package from proposed:
ubuntu@xenia-squid-restart-1738412:~$ apt-cache policy squid
squid:
  Installed: 3.5.12-1ubuntu7.6
  Candidate: 3.5.12-1ubuntu7.6
  Version table:
 *** 3.5.12-1ubuntu7.6 500
        500 http://br.archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages

The upgrade failed as expected, because the config file is corrupted and now it's properly detected and it shows in the output:
Setting up squid-common (3.5.12-1ubuntu7.6) ...
Setting up squid (3.5.12-1ubuntu7.6) ...
Installing new version of config file /etc/init.d/squid ...
Job for squid.service failed because the control process exited with error code. See "systemctl status squid.service" and "journalctl -xe" for details.
invoke-rc.d: initscript squid, action "restart" failed.
● squid.service - LSB: Squid HTTP Proxy version 3.x
   Loaded: loaded (/etc/init.d/squid; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2018-11-12 19:04:20 UTC; 4ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5293 ExecStop=/etc/init.d/squid stop (code=exited, status=0/SUCCESS)
  Process: 5306 ExecStart=/etc/init.d/squid start (code=exited, status=3)

Nov 12 19:04:20 xenia-squid-restart-1738412 systemd[1]: Starting LSB: Squid HTTP Proxy version 3.x...
Nov 12 19:04:20 xenia-squid-restart-1738412 squid[5306]: * FATAL: Invalid ACL type 'nonsense'
Nov 12 19:04:20 xenia-squid-restart-1738412 squid[5306]: FATAL: Bungled /etc/squid/squid.conf line 7897: acl nonsense nonsense nonsense
(...)

Retrying the original test steps, starting with a fixed config file and then mangling it:
ubuntu@xenia-squid-restart-1738412:~$ pidof squid
5457

ubuntu@xenia-squid-restart-1738412:~$ echo "acl nonsense nonsense nonsense" | sudo tee -a /etc/squid/squid.conf
acl nonsense nonsense nonsense

# now the error is detected at reload time, immediately:
ubuntu@xenia-squid-restart-1738412:~$ sudo service squid reload
Job for squid.service failed because the control process exited with error code. See "systemctl status squid.service" and "journalctl -xe" for details.

# and the service remains running:
ubuntu@xenia-squid-restart-1738412:~$ pidof squid
5457

xenial verification succeeded