Bug 169819

Summary: Trailing space in host name causes crash
Product: [Fedora] Fedora Reporter: Tom Morton <tealwarrior>
Component: system-config-networkAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-24 11:44:03 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:
Bug Depends On:    
Bug Blocks: 87718    

Description Tom Morton 2005-10-04 03:44:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
When entering a host in the hosts tab if a trailing space is placed on the
host name the network configuration to crashes

Version-Release number of selected component (if applicable):
1.3.26

How reproducible:
Always

Steps to Reproduce:
1. Enter an IP for a new host
2. Enter a name with a trailing space
3. Enter an alias
4. Save
  

Actual Results:  /etc/hosts file isn't updated and the following error message is displayed:

Component: system-config-network
Version: 1.3.26
Summary: TBd7ebbbe6 Conf.py:596:__delitem__:KeyError: 'machine.domain.com'

Traceback (most recent call last):
  File "/usr/src/build/556832-noarch/install/usr/share/system-config-network/netconfpkg/gui/maindialog.py", line 797, in on_applyButton_clicked
  File "/usr/src/build/556832-noarch/install/usr/share/system-config-network/netconfpkg/gui/maindialog.py", line 372, in save
  File "/usr/src/build/556832-noarch/install/usr/share/system-config-network/netconfpkg/gui/maindialog.py", line 404, in saveProfiles
  File "/usr/src/build/556832-noarch/install/usr/share/system-config-network/netconfpkg/NCProfileList.py", line 388, in save
  File "/usr/lib/python2.4/site-packages/rhpl/Conf.py", line 596, in __delitem__
    del self.vars[varname]
KeyError: 'machine.domain.com'

Local variables in innermost frame:
varname: machine.domain.com
self: <rhpl.Conf.ConfFHosts instance at 0xb79d856c>

Expected Results:  /etc/hosts file saved sans crash

Additional info: