Bug 621910 - NetworkManager misses to add shortname to /etc/hosts.
Summary: NetworkManager misses to add shortname to /etc/hosts.
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: NetworkManager   
(Show other bugs)
Version: 6.0
Hardware: All Linux
low
medium
Target Milestone: rc
: ---
Assignee: Dan Williams
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Keywords: RHELNAK
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-06 13:25 UTC by Patrik Martinsson
Modified: 2010-11-10 19:32 UTC (History)
3 users (show)

Fixed In Version: NetworkManager-0.8.1-5.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 19:32:14 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Patrik Martinsson 2010-08-06 13:25:18 UTC
Description of problem:

When NetworkManager changes the /etc/hosts file it simply forgets to add the short name. 

Version-Release number of selected component (if applicable):
NetworkManager-0.8.1-2.el6.x86_64


How reproducible:
Always ? 

Steps to Reproduce:
1. Set the HOSTNAME=foo.bar.baz under /etc/sysconfig/network 
2. Restart NetworkManager 
3.
  
Actual results:

cat /etc/hosts
# Do not remove the following lines, or various programs
# that require network functionality will fail.
xx.xx.x.xx	foo.bar.baz	# Added by NetworkManager
127.0.0.1	localhost.localdomain	localhost
::1	xxx.xxx.xxx	localhost6.localdomain6	localhost6

Expected results:
cat /etc/hosts
# Do not remove the following lines, or various programs
# that require network functionality will fail.
xx.xx.x.xx	foo.bar.baz foo	# Added by NetworkManager
127.0.0.1	localhost.localdomain	localhost
::1	foo.bar.baz	localhost6.localdomain6	localhost6



Additional info:
At least this is how I expected it to work, I want be able to from the same machine run 'ping shortname' and get answer from it. Now it fails. This is important to samba for example, samba is not able to perform a 'net ads dns register' if it cant get the short name from /etc/hosts file. 

You will get this message if client's shortname isn't in the hosts-file. 
"No DNS domain configured for client. Unable to perform DNS Update."

If you add the shortname after fqdn the update will succeed. 

But maybe I'm missing something ? 

Best regards, 
Patrik Martinsson, Sweden.

Comment 2 RHEL Product and Program Management 2010-08-06 13:47:43 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Dan Williams 2010-08-09 19:09:03 UTC
Can you attach your /etc/resolv.conf file in this case?

Does your DNS server actually respond to requests for .bar.baz ?

Comment 4 Dan Williams 2010-08-09 19:36:56 UTC
Upstream fixes:

c72fbd6b87fde2d55c0edab66a190efcb3f9083d (master)
b16d89a340af27a3a9d4538c63e463f806b03fc4 (0.8.x)

Comment 7 Patrik Martinsson 2010-08-10 07:14:35 UTC
Hello Dan, 

Thanks for quick reply, yes the DNS server responds to .bar.baz requests.

This is the resolv.conf

# Generated by NetworkManager
domain bar.baz
search bar.baz
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

Best Regards, 
Patrik Martinsson, Sweden.

Comment 10 releng-rhel@redhat.com 2010-11-10 19:32:14 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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