Bug 350361 (TB8f9e04b7)

Summary: s-c-n save exception TB8f9e04b7 multiple repeat /etc/hosts with ** line
Product: [Fedora] Fedora Reporter: David Timms <dtimms>
Component: system-config-networkAssignee: Harald Hoyer <harald>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: jmoskovc
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 1.5.10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-29 09:36:45 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
exception backtrace none

Description David Timms 2007-10-24 12:26:34 UTC
Description of problem:
Attempting to delete an old removed pccard network interface entry, then save
the changes generates an exception

Version-Release number of selected component (if applicable):
system-config-network-1.4.3-1.fc8

How reproducible:
Yes. Even after hand removing the old /etc/sysconfig/networking/devices/
ifcfg-eth1.bak.

Steps to Reproduce: {simplest}
1. start system-config-network
2. close
3. do you want to save changes {I am yet to make any}
4. Yes
  
Actual results:
exception traceback, attached

Expected results:
1. should not be indicating there was a change made.
2. if change was made, eg trying to remove the old interface, the change should
be saved.

Additional info:
Original installation was F7, upgraded to f8t1, then f8t3, then yum updated
approx: 2007-10-20.
The interface I am trying to get rid of was created previously when a different
pccard interface was inserted, but that card is no longer present. The system
seems to have renamed the old interface to {.bak}. Removing that file doesn't
solve the problem.

Very similar to old bug 163040. The module is now re.py {sre.py}. The cachekey,
pattern and key differ.

Comment 1 David Timms 2007-10-24 12:26:34 UTC
Created attachment 236151 [details]
exception backtrace

Comment 2 Harald Hoyer 2007-10-24 12:47:32 UTC
look like you have an invalid hostname in /etc/hosts

Comment 3 David Timms 2007-10-24 15:05:17 UTC
It seems the system has changed my commented line in /etc/hosts from:
===
##isp's etc
61.9.128.13 login-server.vic.mynet.net.au login-server sm-server sm-server.vic
.bigpond.net.au
61.9.192.13 login-server.nsw.mynet.net.au sm-server.nsw.bigpond.net.au
===
to:
===
**isp's etc
61.9.128.13 login-server.vic.mynet.net.au login-server sm-server sm-server.vic
.mynet.net.au
61.9.192.13 login-server.nsw.mynet.net.au sm-server.nsw.mynet.net.au
===
which seems to trick system-config-network.

Changing those asterix back to ## allows s-c-n to run and save without exception.

1. I would still consider the parsing issue to need resolving, because
  a. should be resilient to garbage in - at least a refusal to run with an
illegal formatted file {eg You have an invalid /etc/hosts file on line 67}
pointed out.
  b. system-config-network {or some of the other network code ?} has originally
corrupted the file by modifying ## to **.
  c. it might also be the single quote further along the line ? No doesn't seem
to change the behaviour, at least for a small test case /etc/hosts

2. I reloaded my original /etc/hosts {good one}. 
- s-c-n started OK
- close
- no changes
- save query
- save
- no error, closes {after a few moments}.

However, hosts file has been modified from:
# cat hosts.2007 |wc
    910    3951   47161
to:
# cat /etc/hosts |wc
   1052  176044 2303471
==========================
    142    x44      x48

It appears that many of the lines have been concatenated with one or all other
lines, and then reinserted into /etc/hosts

Rerunning s-c-n now causes high CPU usage {for more than thirty minutes, and the
gui is yet to appear.}; in this case goodness in, bloated crapola out.

Should I create a separate bug for corrupting the hosts file, or should we just
point to bug 143247 {perhaps updating to F8, which I don't think I can do}
release or bug 103458 as potential more infos ?

Comment 4 Bug Zapper 2008-05-14 03:43:12 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Jiri Moskovcak 2008-07-29 09:36:45 UTC
This bug has been fixed in 1.5.? version.