Bug 187888

Summary: squid doesn't handle changes in network interfaces gracefully
Product: [Fedora] Fedora Reporter: Nils Philippsen <nphilipp>
Component: squidAssignee: Martin Stransky <stransky>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-20 10:40:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
This patch adds reloading of /etc/resolv.conf (when it changes)
none
updated patch for 2.6 branch none

Description Nils Philippsen 2006-04-04 10:23:56 UTC
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 10:55:04 UTC
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 11:40:54 UTC
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 14:53:13 UTC
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 20:48:27 UTC
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 09:14:55 UTC
Created attachment 131646 [details]
This patch adds reloading of /etc/resolv.conf (when it changes)

Comment 6 Martin Stransky 2006-07-19 13:09:00 UTC
Created attachment 132681 [details]
updated patch for 2.6 branch

Comment 7 Martin Stransky 2006-07-19 14:06:41 UTC
Unfortunately it doesn't work if you use ipcache....

Comment 8 Martin Stransky 2006-07-19 14:53:59 UTC
It should work when the current ip record expires and there aren't any cached
dns queries...

Comment 9 Martin Stransky 2006-07-20 10:40:14 UTC
closing as WONTFIX. I think this problem isn't so common and it's a bit overhead
for a production environment.