Bug 477051

Summary: host command ignores SEARCH variable when network is turned on
Product: [Fedora] Fedora Reporter: Ed Friedman <edfriedmangvs>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: atkac, notting, pwouters, rvokal
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: 2009-01-12 21:06:42 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:

Description Ed Friedman 2008-12-18 20:52:30 UTC
Description of problem:
The "host" command ignores the SEARCH variable when "network" is turned on

Version-Release number of selected component (if applicable):
bind-utils-9.5.1-0.9.b3.fc10.i386

How reproducible:
Always

Steps to Reproduce:
1.Run computer with "network" instead of "NetworkManager" turned on
2.Type "host machinename", where you omit the domain name which is listed in the SEARCH variable
3.
  
Actual results:
You receive an error message indicating that the host was not found.

Expected results:
You should receive the IP information for the machinename

Additional info:
This problem can be fixed by adding a "search domainname" line at the end of /etc/resolv.conf.  However, whenever the computer is rebooted, this line is stripped out of the /etc/resolv.conf file.

This worked perfectly in Fedora 9.  Switching from network to NetworkManager fixes this problem, but it is not an option because NetworkManager breaks ypbind at boot time (see bug #477045).

Comment 1 Adam Tkac 2009-01-12 14:16:45 UTC
This is not host problem, initscripts handle addition of "search domainname" to resolv.conf. Reassigning to proper component.

Comment 2 Bill Nottingham 2009-01-12 20:31:47 UTC
'SEARCH' variable? That's not a valid ifcfg variable - where are you setting it?

Comment 3 Ed Friedman 2009-01-12 20:56:32 UTC
I don't set the SEARCH variable.  It is the domain name and it is automatically added to the end of ifcfg-eth0 at the completion of the installation process (in our case SEARCH="uchicago.edu").  At that point, host worked with NetworkManager running, finding hosts within our domain without requiring the domain name to be tacked to the end of the host, but did not find these hosts if network was running instead unless the domain name was added to the host name(everything worked fine under Fedora 9).  I then added the following to the end of /etc/resolv.conf:
search uchicago.edu
At this point, the host command worked fine when network was turned on.  However, whenever the computer was rebooted, that line was stripped out of the /etc/resolv.conf file.

What makes all of this even stranger is that when network is on and the host command will not find hosts in our local domain by their name alone, ssh does and works with no problem.

Comment 4 Bill Nottingham 2009-01-12 21:06:42 UTC
Ah, anaconda added it. This was later changed to not do that any more, as it wasn't consistently honored (and broke some things).

*** This bug has been marked as a duplicate of bug 474858 ***