[Bug 1738412] Re: Init script fails test on reload/restart because of faulty regex
Andreas Hasenack
andreas at canonical.com
Mon Nov 12 19:09:10 UTC 2018
xenial verification
confirming the bug:
root at 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 at xenia-squid-restart-1738412:~$ pidof squid
4280
ubuntu at xenia-squid-restart-1738412:~$ sudo service squid reload
ubuntu at xenia-squid-restart-1738412:~$ pidof squid
4280
# corrupting the config file and trying one more time
ubuntu at xenia-squid-restart-1738412:~$ echo "acl nonsense nonsense nonsense" | sudo tee -a /etc/squid/squid.conf
acl nonsense nonsense nonsense
ubuntu at xenia-squid-restart-1738412:~$ sudo service squid reload
ubuntu at xenia-squid-restart-1738412:~$
ubuntu at xenia-squid-restart-1738412:~$ pidof squid
4280
ubuntu at xenia-squid-restart-1738412:~$ pidof squid
ubuntu at xenia-squid-restart-1738412:~$
Indeed after a while squid isn't running anymore.
Status shows it failed:
ubuntu at 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 at 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 at xenia-squid-restart-1738412:~$ pidof squid
5457
ubuntu at 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 at 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 at xenia-squid-restart-1738412:~$ pidof squid
5457
xenial verification succeeded
** Tags removed: verification-needed-xenial
** Tags added: verification-done-xenial
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1738412
Title:
Init script fails test on reload/restart because of faulty regex
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid3/+bug/1738412/+subscriptions
More information about the Ubuntu-server-bugs
mailing list