[Bug 802635] New: systemctl start squid fails to create squid swap directories
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c0 Summary: systemctl start squid fails to create squid swap directories Classification: openSUSE Product: openSUSE 12.3 Version: RC 1 Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: mpluskal@suse.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- When starting squid for the first time (systemctl start squid), squid swap directory is not created, therefore squid fails to start. It is necessary to manually issue "squid -z" and than everything works. /usr/lib/systemd/system/squid.service seems to be correct: [Service] EnvironmentFile=/etc/sysconfig/squid ExecStartPre=/usr/sbin/squid_cache_swap.sh ... executing /usr/sbin/squid_cache_swap.sh leads to creation of swap cache in proper place - it however seems that for some reason it is not executed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse-beta@cboltz.de AssignedTo|bnc-team-screening@forge.pr |chris@computersalat.de |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c1 Bruno Friedmann <bruno@ioda-net.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bruno@ioda-net.ch Version|RC 1 |Final --- Comment #1 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-11 17:52:48 UTC --- Confirmed in 12.3 final same thing here, look like the .sh is not executed if run manually the cache is created. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c2 --- Comment #2 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-11 19:29:49 UTC --- systemctl status squid.service squid.service - Squid caching proxy Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled) Active: failed (Result: exit-code) since Mon, 2013-03-11 18:49:08 CET; 5min ago Process: 5923 ExecStop=/usr/sbin/squid -F -N -k shutdown -f /etc/squid/squid.conf (code=exited, status=0/SUCCESS) Process: 5917 ExecStart=/usr/sbin/squid -F -N $SQUID_START_OPTIONS -f /etc/squid/squid.conf (code=exited, status=1/FAILURE) Process: 5909 ExecStartPre=/usr/sbin/squid_cache_swap.sh (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/squid.service Mar 11 18:49:08 thewall.lua.local squid[5917]: Swap maxSize 8388608 + 262144 KB, estimated 665442 objects Mar 11 18:49:08 thewall.lua.local squid[5917]: Target number of buckets: 33272 Mar 11 18:49:08 thewall.lua.local squid[5917]: Using 65536 Store buckets Mar 11 18:49:08 thewall.lua.local squid[5917]: Max Mem size: 262144 KB Mar 11 18:49:08 thewall.lua.local squid[5917]: Max Swap size: 8388608 KB Mar 11 18:49:08 thewall.lua.local squid[5917]: /var/cache/squid/00: (2) No such file or directory Mar 11 18:49:08 thewall.lua.local systemd[1]: squid.service: main process exited, code=exited, status=1/FAILURE Mar 11 18:49:08 thewall.lua.local squid[5923]: 2013/03/11 18:49:08| ERROR: Directive 'emulate_httpd_log' is obsolete. Mar 11 18:49:08 thewall.lua.local squid[5923]: squid: No running copy Mar 11 18:49:08 thewall.lua.local systemd[1]: Unit squid.service entered failed state /usr/sbin/squid_cache_swap.sh init_cache_dir /var/cache/squid... thewall:/etc/squid # systemctl restart squid.service thewall:/etc/squid # systemctl status squid.service squid.service - Squid caching proxy Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled) Active: active (running) since Mon, 2013-03-11 18:54:33 CET; 1s ago Process: 5923 ExecStop=/usr/sbin/squid -F -N -k shutdown -f /etc/squid/squid.conf (code=exited, status=0/SUCCESS) Process: 5969 ExecStartPre=/usr/sbin/squid_cache_swap.sh (code=exited, status=0/SUCCESS) Main PID: 5976 (squid) CGroup: name=systemd:/system/squid.service ├ 5976 /usr/sbin/squid -F -N -sY -f /etc/squid/squid.conf ├ 5978 (logfile-daemon) /var/log/squid/access.log └ 5979 (unlinkd) Mar 11 18:54:34 thewall.lua.local squid[5976]: 0 Objects expired. Mar 11 18:54:34 thewall.lua.local squid[5976]: 0 Objects cancelled. Mar 11 18:54:34 thewall.lua.local squid[5976]: 0 Duplicate URLs purged. Mar 11 18:54:34 thewall.lua.local squid[5976]: 0 Swapfile clashes avoided. Mar 11 18:54:34 thewall.lua.local squid[5976]: Took 0.40 seconds ( 0.00 objects/sec). Mar 11 18:54:34 thewall.lua.local squid[5976]: Beginning Validation Procedure Mar 11 18:54:34 thewall.lua.local squid[5976]: Completed Validation Procedure Mar 11 18:54:34 thewall.lua.local squid[5976]: Validated 0 Entries Mar 11 18:54:34 thewall.lua.local squid[5976]: store_swap_size = 0.00 KB Mar 11 18:54:34 thewall.lua.local squid[5976]: storeLateRelease: released 0 objects -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c3 Christian Wittmer <chris@computersalat.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Christian Wittmer <chris@computersalat.de> 2013-03-12 10:39:54 UTC --- how should I fix it ? Could need some help. I am not familiar with systemd. Bruno, can you provide fix, please ? Thanks -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c4 --- Comment #4 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-14 13:20:57 UTC --- @Christian Wittmer, okay I finally found what's going wrong from the beginning. I've now a patched version of the systemd service file cat squid.service [Unit] Description=Squid caching proxy After=network.target named.service nss-lookup.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/squid ExecStartPre=/bin/sh -c "test ! -d `sed -e 's/#.*//g' /etc/squid/squid.conf | grep cache_dir | awk '{ print $3 }'`/00 && /usr/sbin/squid -z -F -N -S -f /etc/squid/squid.conf || exit 0" ExecStart=/usr/sbin/squid -F $SQUID_START_OPTIONS -f /etc/squid/squid.conf ExecReload=/usr/sbin/squid -F $SQUID_START_OPTIONS -f /etc/squid/squid.conf -k reconfigure ExecStop=/usr/sbin/squid -F -f /etc/squid/squid.conf -k shutdown LimitNOFILE=4096 PIDFile=/var/run/squid.pid [Install] WantedBy=multi-user.target I've tested that one, and Frédéric Crozat has review it, and give is green light. Now I'm also patching the new bugfix release, in my home on obs, and will submit a sr very soon (before end of afternoon). Would be cool if you can review it (carefully first time I'm digging on squid.spec :-) If okay and forwarded to server:proxy, then I propose to push a patchinfo path for getting it as update for 12.3 at least @Martin you could try it by just replacing /usr/lib/systemd/system/squid.service by this one. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c5 --- Comment #5 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-14 17:19:03 UTC --- SR Created https://build.opensuse.org/request/show/159436 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c6 --- Comment #6 from Christian Boltz <suse-beta@cboltz.de> 2013-03-14 18:50:26 CET --- (In reply to comment #4)
ExecStartPre=/bin/sh -c "test ! -d `sed -e 's/#.*//g' /etc/squid/squid.conf | grep cache_dir | awk '{ print $3 }'`/00 && /usr/sbin/squid -z -F -N -S -f /etc/squid/squid.conf || exit 0"
Impressive command line ;-) If I understand it correct, it gets the cache_dir from squid.conf and, if the directory doesn't exist, it starts squid with some params (I guess to create the cache dir - but I know nothing about squid ;-) May I propose to make the commandline a bit less expressive? ;-) - sed can grep itsself - the || exit 0 is probably not needed if you use "test -d" instead of "test ! -d" and then "|| /usr/sbin/squid" instead of "&& ..." (difference: if the squid call fails, you'll get a different exitcode) The following line contains these two changes (warning: untested!) ExecStartPre=/bin/sh -c "test -d `sed -en '/cache_dir/ s/#.*//g' /etc/squid/squid.conf | awk '{ print $3 }'`/00 || /usr/sbin/squid -z -F -N -S -f /etc/squid/squid.conf" In theory you can also get rid of awk, but that makes sed more interesting[tm]. Maybe you can use "cut" instead of awk? (depends on the config file format) You might also want to make /cache_dir/ more specific to avoid that it matches for example "foo_cache_dir_bar". Maybe something like /^cache_dir / - but again this depends on the config file format and how strict it is parsed by squid. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c7 --- Comment #7 from Christian Boltz <suse-beta@cboltz.de> 2013-03-14 18:52:40 CET --- (In reply to comment #6)
(In reply to comment #4) The following line contains these two changes (warning: untested!)
ExecStartPre=/bin/sh -c "test -d `sed -en '/cache_dir/ s/#.*//g' /etc/squid/squid.conf | awk '{ print $3 }'`/00 || /usr/sbin/squid -z -F -N -S -f /etc/squid/squid.conf"
Oops, I forgot a "p" for sed :-( Try this one: ExecStartPre=/bin/sh -c "test -d `sed -en '/cache_dir/ s/#.*//gp' /etc/squid/squid.conf | awk '{ print $3 }'`/00 || /usr/sbin/squid -z -F -N -S -f /etc/squid/squid.conf" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c8 --- Comment #8 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-15 10:37:14 UTC --- Created an attachment (id=529891) --> (http://bugzilla.novell.com/attachment.cgi?id=529891) New systemd squid.service This version now use only sed for parsing squid.conf It's also able to able several cache_dir in conf file Request 159436 has been removed for the moment. I'm waiting feedback about the .service If green light on, I will recreate a new sr with the last changes Result & review could be done here https://build.opensuse.org/package/show?package=squid&project=home%3Abruno_friedmann%3Abranches%3Aserver%3Aproxy -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c9 --- Comment #9 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-15 10:38:07 UTC --- Thx to Christian idea, Dimstar & Bmanjolovic for helping -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c10 Bruno Friedmann <bruno@ioda-net.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #529891|0 |1 is obsolete| | --- Comment #10 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-15 15:05:09 UTC --- Created an attachment (id=529958) --> (http://bugzilla.novell.com/attachment.cgi?id=529958) New systemd squid.service Any feedback would be great we use only one sed expression now :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c Bruno Friedmann <bruno@ioda-net.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |mpluskal@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c11 Martin Pluskal <mpluskal@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|mpluskal@suse.com | --- Comment #11 from Martin Pluskal <mpluskal@suse.com> 2013-03-15 15:10:08 UTC --- Works for me. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c12 Bruno Friedmann <bruno@ioda-net.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #529958|0 |1 is obsolete| | --- Comment #12 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-15 17:43:17 UTC --- Created an attachment (id=530000) --> (http://bugzilla.novell.com/attachment.cgi?id=530000) New systemd squid.service okay only a double sed fix all cases. so keep it -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c13 --- Comment #13 from Bruno Friedmann <bruno@ioda-net.ch> 2013-03-17 08:06:15 UTC --- New SR created https://build.opensuse.org/request/show/159652 Someone will be able to create a patchinfo for fixing 12.3 ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c14 --- Comment #14 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-03-24 15:00:09 CET --- This is an autogenerated message for OBS integration: This bug (802635) was mentioned in https://build.opensuse.org/request/show/160758 Factory / squid -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c15 Martin Pluskal <mpluskal@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution| |FIXED --- Comment #15 from Martin Pluskal <mpluskal@suse.com> 2013-04-24 14:39:14 UTC --- Issue is apparently fixed, closing. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c16 Bruno Friedmann <bruno@ioda-net.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|FIXED | --- Comment #16 from Bruno Friedmann <bruno@ioda-net.ch> 2013-04-25 07:18:29 UTC --- @Martin has there's no maintenance request for 12.3 the issue still remain. Reopened + ask maintenance team if SR159652 could be accepted. If yes then I can eventually create one. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c17 Bruno Friedmann <bruno@ioda-net.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |maintenance@opensuse.org --- Comment #17 from Bruno Friedmann <bruno@ioda-net.ch> 2013-04-25 07:19:52 UTC --- Dear Maitenance team is it possible to have https://build.opensuse.org/request/show/159652 acceptable as maintenance for 12.3 ? If yes, then a maintenance request will be created -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c18 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |REOPENED InfoProvider|maintenance@opensuse.org | --- Comment #18 from Benjamin Brunner <bbrunner@suse.com> 2013-04-25 11:20:34 CEST --- Hi Bruno, the fixes are looking good for an update so far. Could you create a maintenancerequest with the fixed package, please? I'll let it review by one of our maintainers for the final go. Thanks for your efforts! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c19 --- Comment #19 from Christian Boltz <suse-beta@cboltz.de> 2013-04-26 18:32:21 CEST --- (In reply to comment #17)
Can you please check the squid.service file? The SR contains +ExecStart=/usr/sbin/squi etF $SQUID_START_OPTIONS -f /etc/squid/squid.conf and I'd expect /usr/sbin/squi_d_ there ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c20 --- Comment #20 from Christian Boltz <suse-beta@cboltz.de> 2013-04-26 18:33:30 CEST --- (seems to be fixed in server:proxy squid) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c21 --- Comment #21 from Bruno Friedmann <bruno@ioda-net.ch> 2013-05-02 14:15:15 UTC --- Maintenance request 174318 pushed. There's also a new sr for server:proxy but not yet picked by maintainers. sr 173973 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c22 --- Comment #22 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-05-02 17:00:08 CEST --- This is an autogenerated message for OBS integration: This bug (802635) was mentioned in https://build.opensuse.org/request/show/174318 Maintenance / -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c23 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #23 from Benjamin Brunner <bbrunner@suse.com> 2013-05-14 17:04:46 CEST --- Update released for openSUSE 12.3. Resolved fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c Martin Pluskal <mpluskal@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=802635 https://bugzilla.novell.com/show_bug.cgi?id=802635#c24 --- Comment #24 from Swamp Workflow Management <swamp@suse.de> 2013-06-10 09:05:09 UTC --- openSUSE-RU-2013:0872-1: An update that has one recommended fix can now be installed. Category: recommended (low) Bug References: 802635 CVE References: Sources used: openSUSE 12.3 (src): squid-3.2.11-3.4.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com