Univention Bugzilla – Bug 35909
Squid3 without cache, squid restart failed
Last modified: 2023-03-25 06:56:11 CET
Please check if a test case is possible. +++ This bug was initially created as a clone of Bug #33332 +++ Hallo zusammen Wir würden gerne Squid3 ohne Cache verwenden. Das funktioniert gemäss UCR Variable folgendermassen: ucr set squid/cache="false" Danach werden folgende Einträge gemacht in /etc/squid3/squid.conf: cache deny all cache_dir null /tmp Ein Reload funktioniert: /etc/init.d/squid3 reload Reloading Squid HTTP Proxy 3.x configuration files. done. Ein restart leider nicht: /etc/init.d/squid3 restart Restarting Squid HTTP Proxy 3.x: squid3FATAL: Bungled squid.conf line 40: cache_dir null /tmp Squid Cache (Version 3.1.6): Terminated abnormally. CPU Usage: 0.004 seconds = 0.000 user + 0.004 sys Maximum Resident Size: 20672 KB Page faults with physical i/o: 0 failed! Squid verweist ebenfalls auch auf diese Einstellung: http://wiki.squid-cache.org/SquidFaq/CompleteFaq#SquidFaq.2BAC8-ConfiguringSquid.Can_I_make_Squid_proxy_only.2C_without_caching_anything.3F Wenn man im die UCR Variable wieder korrigiert (ucr set squid/cache="yes") und danach die Datei /etc/squid3/local.conf mit folgendem Eintrag erweitert, dann geht es: # add local config here cache deny all Vielen Dank für Eure Hilfe. Grüsse, RolandB
A new script is created with the name "43_proxy/02_squid3_without_cache_restart" to test restarting squid3 after setting squid/cache="false". Tested on UCS-3.2 & UCS-4.0
FAILED i added if configRegistry.is_false('squid/cache'): print "cache deny all" print "cache_dir null /tmp" to /etc/univention/templates/files/etc/squid3/squid.conf which makes the restart fail -> /etc/init.d/squid3 restart [....] Restarting Squid HTTP Proxy 3.x: squid3FATAL: Bungled squid.conf line 35: cache_dir null /tmp Squid Cache (Version 3.1.20): Terminated abnormally. CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys Maximum Resident Size: 30320 KB Page faults with physical i/o: 0 failed! -> echo $? 0 But the test still passes. -> ucs-test -s proxy -i -E dangerous Maximum Resident Size: 30096 KB Page faults with physical i/o: 0 Restarting Squid HTTP Proxy 3.x: squid3 failed! Test passed
(In reply to Felix Botner from comment #2) > FAILED > > i added > > if configRegistry.is_false('squid/cache'): > print "cache deny all" > print "cache_dir null /tmp" > > to /etc/univention/templates/files/etc/squid3/squid.conf which makes the > restart fail > > -> /etc/init.d/squid3 restart > [....] Restarting Squid HTTP Proxy 3.x: squid3FATAL: Bungled squid.conf line > 35: cache_dir null /tmp > Squid Cache (Version 3.1.20): Terminated abnormally. > CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys > Maximum Resident Size: 30320 KB > Page faults with physical i/o: 0 > failed! > -> echo $? > 0 > looks like it returns exit status = 0 even when it fails. > But the test still passes. > > -> ucs-test -s proxy -i -E dangerous > Maximum Resident Size: 30096 KB > Page faults with physical i/o: 0 > Restarting Squid HTTP Proxy 3.x: squid3 failed! > Test passed New functions added to check if squid is running. changelog entry added; package rebuilt.
OK, works
Script modified to avoid repeating code in the future, shorter, and expandable.