This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 350361 - (TB8f9e04b7) s-c-n save exception TB8f9e04b7 multiple repeat /etc/hosts with ** line
s-c-n save exception TB8f9e04b7 multiple repeat /etc/hosts with ** line
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: system-config-network (Show other bugs)
9
i686 Linux
low Severity low
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-24 08:26 EDT by David Timms
Modified: 2008-07-29 05:36 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.5.10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-29 05:36:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
exception backtrace (1.29 KB, text/plain)
2007-10-24 08:26 EDT, David Timms
no flags Details

  None (edit)
Description David Timms 2007-10-24 08:26:34 EDT
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 08:26:34 EDT
Created attachment 236151 [details]
exception backtrace
Comment 2 Harald Hoyer 2007-10-24 08:47:32 EDT
look like you have an invalid hostname in /etc/hosts
Comment 3 David Timms 2007-10-24 11:05:17 EDT
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-13 23:43:12 EDT
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 05:36:45 EDT
This bug has been fixed in 1.5.? version.

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