Bug 35909 - Squid3 without cache, squid restart failed
Squid3 without cache, squid restart failed
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: Squid
unspecified
Other Linux
: P5 normal (vote)
: ---
Assigned To: Ammar Najjar
Felix Botner
:
Depends on: 33332 35421
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-11 15:04 CEST by Stefan Gohmann
Modified: 2023-03-25 06:56 CET (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2014-09-11 15:04:32 CEST
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
Comment 1 Ammar Najjar univentionstaff 2014-10-07 12:45:09 CEST
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
Comment 2 Felix Botner univentionstaff 2015-02-02 17:18:01 CET
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
Comment 3 Ammar Najjar univentionstaff 2015-02-03 09:41:17 CET
(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.
Comment 4 Felix Botner univentionstaff 2015-02-03 13:33:17 CET
OK, works
Comment 5 Ammar Najjar univentionstaff 2015-02-04 10:35:37 CET
Script modified to avoid repeating code in the future, shorter, and expandable.
Comment 6 Felix Botner univentionstaff 2015-02-04 16:04:20 CET
OK, works