Precise: Squid3 does not start if ACL's require DNS lookups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bind9 (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned | ||
squid3 (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
On Precise, squid3 is started by a upstart job, while bind9 is not.
This causes problem if squid3 needs to do DNS lookups when parsing its configuration file.
Example: the same machine is a DNS server and a proxy.
The file /etc/squid3/
acl myacl src host.name
The bind9 service would be able to resolve host.name, but it may not be started before squid3. If this happens, squids logs the following error messages:
[...]
squid3: Bungled squid.conf line 727: acl myacl src host.name
[ 7167.978333] init: squid3 main process (4637) terminated with status 1
[ 7167.978363] init: squid3 main process ended, respawning
squid3: Bungled squid.conf line 727: acl myacl src host.name
[ 7167.995068] init: squid3 main process (4643) terminated with status 1
[ 7167.995098] init: squid3 main process ended, respawning
squid3: Bungled squid.conf line 727: acl myacl src host.name
[ 7168.012017] init: squid3 main process (4649) terminated with status 1
[ 7168.012047] init: squid3 respawning too fast, stopped
This problem consistently appears on my system.
# dpkg-query -l | grep squid
ii squid 3.1.19-
ii squid-langpack 20111114-1 Localized error pages for Squid
ii squid3 3.1.19-
ii squid3-common 3.1.19-
# dpkg-query -l | grep bind9
ii bind9 1:9.8.1.
ii bind9-host 1:9.8.1.
ii bind9utils 1:9.8.1.
ii libbind9-80 1:9.8.1.
IMHO the solution to this bug should consist of:
1- writing an upstart job for running bind9;
2- letting the squid3 upstart job depend on bind9.
Thank you for taking the time to report this bug and helping to make Ubuntu better.
I think it's reasonable to request that bind9 have an upstart job, in order to permit better dependency management for services that depend on bind9.
But I'm not sure about making the squid3 depend on bind9. I understand why this is required in your case, but your configuration strikes me as quite unusual so I'm not sure if it is applicable to all users. And we would also need to handle the case when bind9 is not installed.
If we end up not doing this in the general case, then is the kind of case where I'd expect you to override your squid3 upstart job dependencies by hand, using the mechanisms already provided by upstart to do this (eg. http:// web.archive. org/web/ 20110811021301/ http:// upstart. at/2011/ 03/11/override- files-in- ubuntu- natty/)
Marking this as Triaged, since what you are requesting is clear to developers. And adding a bind9 task for the upstart job. But I'd prefer to consult with others about a job start dependency from squid3 to bind9, since I think this is a more general issue that applies wider than just squid3.