Bug 187888 - squid doesn't handle changes in network interfaces gracefully
squid doesn't handle changes in network interfaces gracefully
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: squid (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Martin Stransky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-04 06:23 EDT by Nils Philippsen
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-20 06:40:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This patch adds reloading of /etc/resolv.conf (when it changes) (1.82 KB, patch)
2006-06-28 05:14 EDT, Daniel Kopeček
no flags Details | Diff
updated patch for 2.6 branch (1.58 KB, patch)
2006-07-19 09:09 EDT, Martin Stransky
no flags Details | Diff

  None (edit)
Description Nils Philippsen 2006-04-04 06:23:56 EDT
Description of problem:
When network interfaces go down and up, squid hangs and runs into timeouts when
pages are requested.

Version-Release number of selected component (if applicable):
squid-2.5.STABLE13-1.FC5

How reproducible:
Easy

Steps to Reproduce:
1. Start squid
2. Bring an interface down and up again (tested with (W)LAN/DHCP with and
without change of IP address, addition/removal of VPNC tun device)
3. Try to access a web page
  
Actual results:
squid doesn't fetch & deliver the web page

Expected results:
squid fetches & delivers the web page

Additional info:
Comment 1 Martin Stransky 2006-04-07 06:55:04 EDT
It works for me fine (IP changes, bringing an interface down and up). How can I
reproduce it? Do you use any special options in squid.conf, direct connections
or something else? 
Comment 2 Nils Philippsen 2006-04-07 07:40:54 EDT
Perhaps it's that I use Networkmanager/-vpnc which casually writes a new
/etc/resolv.conf whenever there is a status change? I'll try to provoke the
problem, the do an strace.
Comment 3 Nils Philippsen 2006-04-07 10:53:13 EDT
Hmm, I can't reproduce it in the RH office here, but it was repeatable at home.
I'll try it there.
Comment 4 Nils Philippsen 2006-04-07 16:48:27 EDT
I could reproduce it here. When I ran strace on the squid processes, I saw that
it tried to resolve web site names via the name server in the office, rather
than what NetworkManager put into /etc/resolv.conf when the interface came up.

Does squid somehow cache the contents of /etc/resolv.conf? I figure it doesn't
use normal glibc functions (gethostbyname() etc.) to resolve names, but has its
own code for that. Perhaps it should check whether /etc/resolv.conf has changed?
Comment 5 Daniel Kopeček 2006-06-28 05:14:55 EDT
Created attachment 131646 [details]
This patch adds reloading of /etc/resolv.conf (when it changes)
Comment 6 Martin Stransky 2006-07-19 09:09:00 EDT
Created attachment 132681 [details]
updated patch for 2.6 branch
Comment 7 Martin Stransky 2006-07-19 10:06:41 EDT
Unfortunately it doesn't work if you use ipcache....
Comment 8 Martin Stransky 2006-07-19 10:53:59 EDT
It should work when the current ip record expires and there aren't any cached
dns queries...
Comment 9 Martin Stransky 2006-07-20 06:40:14 EDT
closing as WONTFIX. I think this problem isn't so common and it's a bit overhead
for a production environment.

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