Bug 10772 - Squid starts after 6 minutes after boot the system
Summary: Squid starts after 6 minutes after boot the system
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 3
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA3-64-OK MGA3-32-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2013-07-15 22:10 CEST by Giuseppe Stoduto
Modified: 2013-08-12 15:50 CEST (History)
5 users (show)

See Also:
Source RPM: c-icap-0.2.5-4.mga3
CVE:
Status comment:


Attachments

Description Giuseppe Stoduto 2013-07-15 22:10:33 CEST
Description of problem:

Booted the system squid starts after 6 minutes and prevents the use of the internet connection



Version-Release number of selected component (if applicable):
squid-3.2.10-1.mga3

How reproducible:

Activate the parental control drakguard with the new version drakguard-0.7.14-1.mga3 and restart the system

immediately booted give the following command
ps-AlF | grep squid

should appear only line that refers to grep

after 6 minutes repeat the command
you should see several lines that squid is witness to started



Reproducible: 

Steps to Reproduce:
Comment 1 Derek Jennings 2013-07-15 22:51:31 CEST
I see the same problem

# journalctl --since 16:19  _SYSTEMD_UNIT=squid.service
-- Logs begin at Thu, 2013-05-23 17:00:10 BST, end at Mon, 2013-07-15 16:33:47 BST. --
Jul 15 16:19:01 Derek.localdomain squid[7211]: Squid Parent: will start 1 kids
Jul 15 16:19:01 Derek.localdomain squid[7211]: Squid Parent: (squid-1) process 7216 started
Jul 15 16:19:01 Derek.localdomain squid[7218]: Squid Parent: will start 1 kids
Jul 15 16:19:01 Derek.localdomain squid[7218]: Squid Parent: (squid-1) process 7221 started
Jul 15 16:19:01 Derek.localdomain squid[7211]: Squid Parent: (squid-1) process 7216 exited with status 0
Jul 15 16:19:02 Derek.localdomain squid[7188]: init_cache_dir ... Starting squid: .[  OK  ]
Jul 15 16:21:04 Derek.localdomain squid[7218]: Squid Parent: (squid-1) process 7221 exited with status 0
Jul 15 16:21:05 Derek.localdomain squid[7847]: Stopping squid: ....[  OK  ]
-- Reboot --
Jul 15 16:27:11 Derek.localdomain squid[4527]: Squid Parent: will start 1 kids
Jul 15 16:27:11 Derek.localdomain squid[4527]: Squid Parent: (squid-1) process 4530 started
Jul 15 16:27:11 Derek.localdomain squid[4532]: Squid Parent: will start 1 kids
Jul 15 16:27:11 Derek.localdomain squid[4532]: Squid Parent: (squid-1) process 4535 started
Jul 15 16:27:11 Derek.localdomain squid[4527]: Squid Parent: (squid-1) process 4530 exited with status 0
Jul 15 16:27:12 Derek.localdomain squid[4516]: init_cache_dir ... Starting squid: .[  OK  ]

CC: (none) => derekjenn

Comment 2 Derek Jennings 2013-07-22 19:02:19 CEST
The problem is caused because /etc/rc.d/initd.d/squid contains "Should-Start named icapd"

c-icap-server is installed as a 'Suggests' of a 'Suggests' of dansguardian but is not configured. On booting squid delays starting until the icapd service has given up trying to start which takes 6 minutes.

The workaround is to remove the package c-icap-server.

The fix is remove the unnecessary Suggests and Requires from dansguardian. This has already been done in Cauldron. I will bring out an update to Mageia 3 as well.

Hardware: x86_64 => All
Assignee: bugsquad => derekjenn

Derek Jennings 2013-07-22 19:05:40 CEST

Source RPM: squid-3.2.10-1.mga3 => dansguardian-2.10.1.1-9.mga3

Comment 3 Giuseppe Stoduto 2013-07-22 23:32:03 CEST
works well

I also modified the file /etc/rc.d/initd.d/ squid with
"Should-Start $named" only, but I do not know if in the future may be the best solution


thank you.
Comment 4 Derek Jennings 2013-07-24 20:46:17 CEST
Thanks Giuseppe I will leave the "Should-Start" line as it is because it is legitimate that c-icap-server should start before squid when it is installed and configured.


update now in mageia 3 updates_testing

SRPM
dansguardian-2.10.1.1-9.1.mga3.src.rpm

RPM
dansguardian-2.10.1.1-9.1.mga3.rpm

Advisory
-------
This is a bugfix update for dansguardian to prevent unnecessary packages being installed along with dansguardian (mga#10772)


Test procedure
--------------
Uninstall (if already installed)
dansguardian, squid, postfix, apache, cherokee, lighttpd, c-icap-server, c-icap-modules, drakguard

Install dansguardian-2.10.1.1-9.1.mga3 when prompted select squid to satisfy the webproxy requirement.

Observe that dansguardian and squid is installed, but not any of the other packages listed in the first step.

Confirm parental controls work normally by installing and enabling drakguard-0.7.14-1.mga3.noarch.rpm (the latest version)

Reboot and observe that parental controls work immediately after the user logs in.

Status: NEW => ASSIGNED
Assignee: derekjenn => qa-bugs

Comment 5 David Walser 2013-07-25 14:05:21 CEST
I would suggest being more specific in the advisory and advising administrators that they should uninstall c-icap-server if they are seeing this problem.
Comment 6 Daniel Lucio 2013-07-25 18:35:24 CEST
please revert dansguardian changes, i have fixed in c-icap

easy work arround for the impatients is to add
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6

in the /etc/init.d/icapd file

CC: (none) => luis.daniel.lucio

Comment 7 Daniel Lucio 2013-07-25 18:44:28 CEST
changes submited to core/testing and cauldron
Comment 8 Daniel Lucio 2013-07-25 18:45:22 CEST
 c-icap-0.2.5-4.1.mga3 is submited

Source RPM: dansguardian-2.10.1.1-9.mga3 => c-icap-0.2.5-4.mga3

Comment 9 claire robinson 2013-07-25 19:53:13 CEST
Adding feedback tag until this is ready for QA.

When ready, whichever package is no longer required will need to be removed from Testing.

Could you also provide an updated advisory.

Thanks

Whiteboard: (none) => feedback

Comment 10 Giuseppe Stoduto 2013-07-25 20:27:44 CEST
I modified as you have requested but not good
Squid start after 6 miniti
Comment 11 Daniel Lucio 2013-07-25 21:36:59 CEST
i didnt requested anything :P

try the RPM at updates_testings, i was able to reproduce problem, and after i did the changes it fixed.  try RPM maybe i forgot to place more modifiations, see the SPEC changelog
Comment 12 Giuseppe Stoduto 2013-07-25 22:13:46 CEST
I did the update

I have a question.

in the file /etc/init.d/icapd the line

# chkconfig: 345 56 44

does not have the same meaning as

# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6

?
Comment 13 Derek Jennings 2013-07-26 11:29:04 CEST
(In reply to Daniel Lucio from comment #6)
> please revert dansguardian changes, i have fixed in c-icap
> 
> easy work arround for the impatients is to add
> # Default-Start:     2 3 4 5
> # Default-Stop:      0 1 6
> 
> in the /etc/init.d/icapd file

Good news about an update to c-icap-server, but there is no need to revert dansguardian. It is still inappropriate for installing dansguardian to cause postfix, a web server and c-icap-server to be installed as well.


(In reply to David Walser from comment #5)
>I would suggest being more specific in the advisory and advising administrators >that they should uninstall c-icap-server if they are seeing this problem.

New Advisory

Advisory
--------
This is a bugfix update for dansguardian to prevent unnecessary packages being installed along with dansguardian (mga#10772). One effect of installing these extra packages is that dansguardian may take several minutes to start working after a reboot.

Users upgrading dansguardian are recommended to uninstall the c-icap-server package unless it is specifically required.

Other services which may have been installed are postfix, apache,cherokee, and lighttp.
Comment 14 claire robinson 2013-07-29 10:06:26 CEST
Is this ready for QA?

Are both dansguardian and c-icap being updated, was it agreed?
Comment 15 Derek Jennings 2013-07-30 13:06:02 CEST
I have tested c-icap-0.2.5-4.1.mga3 and it seems to work OK. i.e. It does not prevent squid from starting at boot, but since the purpose of the change to dansguardian is to stop c-icap-server from being installed at all, then I think it would be best if they were tested separately.

Since the title of this bug report is about squid delaying starting, then I will open a new bug report for dansguardian installing too many Suggests.



Done Bug 10884
Comment 16 claire robinson 2013-07-30 17:42:21 CEST
Thanks Derek, that's probably the best solution, so this bug is now for c-icap-server.

Daniel could you give a suitable advisory for this please.

Whiteboard: feedback => (none)

Comment 18 David Walser 2013-08-01 20:44:05 CEST
I think it's something like:

If the squid and c-icap services are installed, c-icap is supposed to be
started before squid.  The init script for the c-icap service did not provide
sufficient information to systemd about when it should be started, which
caused significant delays in starting the squid service if squid was enabled.
The required information is now provided in the c-icap init script.
Comment 19 Dave Hodgins 2013-08-11 07:32:37 CEST
There is still a problem.
 7708 root       20   0  3940   960   820 S  0.0  0.0  0:00.00 â  â        ââ systemctl start icapd.service
 7709 root       20   0  2352   580   492 S  0.0  0.0  0:00.00 â  â           ââ /usr/bin/systemd-tty-ask-password-agent --watch

The password prompt does not open, so it's waiting for the password request
to timeout.

CC: (none) => davidwhodgins

Dave Hodgins 2013-08-11 07:32:53 CEST

Whiteboard: (none) => feedback

Comment 20 Dave Hodgins 2013-08-11 07:38:44 CEST
systemd[1]: PID file /run/icapd/icap.pid not readable (yet?) after start.

# ll /run/icapd/
total 4
prwxr--r-- 1 icapd icapd 0 Aug 11 01:26 icapd.ctl|
-rw-r--r-- 1 icapd icapd 4 Aug 11 01:26 icapd.pid

Note that the pid file is icapd.pid, not icap.pid.
Comment 21 David Walser 2013-08-11 16:54:49 CEST
(In reply to Dave Hodgins from comment #20)
> systemd[1]: PID file /run/icapd/icap.pid not readable (yet?) after start.
> 
> # ll /run/icapd/
> total 4
> prwxr--r-- 1 icapd icapd 0 Aug 11 01:26 icapd.ctl|
> -rw-r--r-- 1 icapd icapd 4 Aug 11 01:26 icapd.pid
> 
> Note that the pid file is icapd.pid, not icap.pid.

Fixed in c-icap-0.2.5-4.2.mga3 (and c-icap-0.2.5-6.mga4).

Whiteboard: feedback => (none)

Comment 22 Dave Hodgins 2013-08-12 04:58:59 CEST
Just testing that the service starts, and the command
c-icap-client -i localhost -s "info?view=text" -req "a_url"
produces output.

Testing complete on Mageia 3 i586 and x86_64.

Would someone from the sysadmin team push 10772.adv to updates.

Keywords: (none) => validated_update
Whiteboard: (none) => MGA3-64-OK MGA3-32-OK
CC: (none) => sysadmin-bugs

Comment 23 Thomas Backlund 2013-08-12 15:50:45 CEST
Update pushed:
http://advisories.mageia.org/MGAA-2013-0083.html

Status: ASSIGNED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.