FS#63930 - Squid systemd invalid PID id

Attached to Project: Community Packages
Opened by Joan (grosjo) - Friday, 27 September 2019, 07:59 GMT
Last edited by Sergej Pupykin (sergej) - Saturday, 19 September 2020, 16:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

In the file /etc/systemd/system/multi-user.target.wants/squid.service, the PIDfile shall be

PIDFile=/run/squid/squid.pid

Otherwise the systemd does not find it and systemd stops the service
This task depends upon

Closed by  Sergej Pupykin (sergej)
Saturday, 19 September 2020, 16:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  in svn/trunk only, will come on next package update.
Comment by Fabian Walther (Namru) - Friday, 06 December 2019, 19:32 GMT
On my server stop is possible but systemd / squid reports an error:
systemd[1]: /usr/lib/systemd/system/squid.service:9: PIDFile= references a path below legacy directory /var/run/, updating /var/run/squid.pid → /run/squid.pid; please update the unit file accordingly.

PKGBUILD told: --with-pidfile=/run/squid.pid \
but the source squid.service file from www.squid-cache.org contains: PIDFile=/var/run/squid.pid
Comment by Sergej Pupykin (sergej) - Monday, 27 January 2020, 13:41 GMT
.service file provided by upstream. (tools/systemd/squid.service)
Comment by Fabian Walther (Namru) - Monday, 27 January 2020, 18:15 GMT
I think this come from the legacy point of view from distributions like debian.
Fedora comes with a enhanced squid.service file including the switch to /run.
Just as an example I attched the FC32 squid 4.9-2 version of squid.service.
Maybe within the next days the 4.10 version of Fedora is also available http://rpmfind.net/linux/rpm2html/search.php?query=squid
But I think we shouldn't wait for a upstream fix, squid-5.0.1 (beta) has the same bug within there squid.service file.
Comment by Joan (grosjo) - Friday, 08 May 2020, 14:45 GMT
Hi
Recent upgrade of squid package still contains the same bug (invalid path of PID file)
How can I help to resolv this ?
Comment by Fabian Walther (Namru) - Tuesday, 19 May 2020, 16:41 GMT
Hi,
I run a short test with changed PIDFile Paramter:
PIDFile=/var/run/squid.pid
to:
PIDFile=/run/squid.pid
And there is no log message (/usr/lib/systemd/system/squid.service:15: PIDFile= references a path below legacy directory /var/run/, updating /var/run/squid.pid → /run/squid.pid; please update the unit file accordingly.) anymore.
Maybe Sergej can include this small patch into PKGBUILD.
But its strange that squid remarks the old-style directory and ships the old-style paramter with upstream package.

Loading...