Description of problem: Sometimes restarting squid leaves old processes running for a short while at the same times as new processes, and so the new processes won't start fine, forcing me to killall squid and start anew. Version-Release number of selected component (if applicable): 3.3.x/3.4.x How reproducible: You have to be (un)lucky. The time to stop squid varies a lot, and the problem only happens if it takes longer than SQUID_SHUTDOWN_TIMEOUT defined in /etc/sysconfig/squid Steps to Reproduce: 1. service squid restart Actual results: squid won't proxy http requests Expected results: squid working as usual Additional info: I tested this in CentOS 6.5 and using an unofficial RPM package from squid-cache.org. But I checked the squid RPM packates for Fedora and CentOS and the init.d script is the same, so the problem should affect at least RHEL6. I'm not sure this will affect Fedora 19/20 with systemd or RHEL7. I think it's better having service squid restart failling than leaving a broken squid, so I propose the following change to /etc/init.d/squid: ------------ restart() { stop RETVAL=$? if [ $RETVAL -eq 0 ] ; then rm -rf $SQUID_PIDFILE_DIR/* start else echo "Failure stopping squid or stopping squid took too long. Please check before restarting." return 1 fi } ------------- Now the restart() function, instead of blindly calling start() after stop(), it checks the return code from stop(). If stop() timeouts, it returns an error code and so restart() refuses to call start() aftewards. This little change makes squid more robust for sysadmins who still have to use init.d scripts. Increasing SQUID_SHUTDOWN_TIMEOUT reduces the frequence of restart failing, but doesn't guarantees success.
The bug report is filed for Fedora 20 and refers to the initscripts which are not even shipped by default. Shouldn't we just remove the squid-sysvinit package where the initscript resides?
Pavel, you are right about Fedora, but Fedora packages are upstream for CentOS 6 and RHEL 6 packages that do use the init files and would benefit from the proposed change. Maybe this bug should be moved to another product or release.
(In reply to Fernando Lozano from comment #2) > Pavel, you are right about Fedora, but Fedora packages are upstream for > CentOS 6 and RHEL 6 packages that do use the init files and would benefit > from the proposed change. This is not how things work. Released versions RHEL/CentOS aren't typically pulling in packages from later Fedora releases. > Maybe this bug should be moved to another product or release. Please start new bugs with the respective projects you are interested in. I would like to keep this bug open for the question of removing the initscript entirely as it has essentially no value for Fedora. Any ideas?
I think you're right. Initscripts should be removed from Fedora packages when they support systemd directly.
I have just removed sysvinit subpackage from rawhide.