Bug 68218 - RH7.3 format of ifcfg-ethX:X files is not compatible with older releases
RH7.3 format of ifcfg-ethX:X files is not compatible with older releases
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 2002-07-08 05:23 EDT by Need Real Name
Modified: 2014-03-16 22:28 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-07-09 10:51:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-07-08 05:23:09 EDT
Description of Problem:
The ifcfg-ethX:X files are used for aliased IP addresses.  As of RH7.3, these files are not fully backwards compatible
with older releases.  Both ifup and the GUI network tool fail.  The GUI tool crashes with a debug window which
complains about the format of the file.

In the old format, multiple IP addresses could be put into one file, namely, ifcfg-eth0:0.  In the new format, only one
IP address per file is allowed.  Instead of being able to automate this process, it must now be set up in a much
more tedious manner AND all administration scripts from before have to be rewritten.

OLD VERSION OF /etc/sysconfig/network-scripts/ifcfg-eth0:0
(IP Addresses have been changed from their original)
# is www.domain1.com
# is www.domain2.com

Migrating to RH7.3 causes the system to abort network configuration of these aliases.  Manually running ifup
results in the following error: 
/etc/sysconfig/network-scripts/ifup-aliases: command not found
/etc/sysconfig/network-scripts/ifup-aliases: ipseen_200.100.0.1: command not found

Using the GUI network configuration tool results in a debug crash window with the following:
Traceback (innermost last):
... (miscellaneous stuff skipped)
  File "/usr/sbin/../share/redhat-config-network/netconfpkg/Conf.py", line 316, in initvars
    raise IndexError, 'end quote not found in '+self.filename+":"+var[0]
Conf.IndexError: end quote not found in /etc/sysconfig/networking/devices/ifconfig-eth0:0:IPADDR

Changing the file so that all the IP addresses are on the same line (which also used to work), that is
still does not work.  ifup still gives the same error, although the GUI network tool will now run.  However, the
aliases do not configure properly, unless all IP addresses are removed except one.

The "new" network configuration system may be a fine way to setup a machine for a home user, but it is simply
non-functional for a large scale operation like an ISP that can assign dozens or hundreds of aliased addresses
to a particular machine and those addresses switch around between machines as clients come and go.  An
automated tool is needed in this circumstance, but now the tools no longer work because of the changes in RH7.3.
Comment 1 Harald Hoyer 2002-07-08 11:57:53 EDT
huh? two ip adresses for one network device?? never saw this... I think, this is
not valid.
Comment 2 Harald Hoyer 2002-07-08 11:59:08 EDT
Should be:
Comment 3 Trond Eivind Glomsrxd 2002-07-08 12:02:31 EDT
This would be a shared redhat-config-network/initscripts issue if the given file
was correct... Bill, was this a supported way of doing aliases?
Comment 4 Bill Nottingham 2002-07-08 12:36:40 EDT
I think that's part of the old linuxconf support; it certainly didn't work
otherwise. You can set up range files, though, for supporting a range of
addresses. See ifup-aliases for examples.
Comment 5 Need Real Name 2002-07-08 14:39:55 EDT
Further investigation:

When putting multiple IP addresses into the IPADDR line of ifcfg-eth0:0 the ifup command would create eth0:0, eth0:1, eth0:2, automatically.  This 
could be done all on one line (IPADDR="") or on multiple lines using line continuation ( \ ).

It appears that support for this style was via linuxconf in ifup-aliases.  This support existed in RH7.2 and prior.  It also appears that there is 
currently no support for arbitrary aliased IP addresses in a single alias file (ifcfg-eth0:0) anymore - only complete ranges.  This makes supporting 
this type of aliasing much more complex via scripts.  Instead of reading one file and updating the IPADDR line then calling ifdown and ifup, now the 
script has to be rewritten to call ifdown, scan the directory, read in all files that match the criteria (ifcfg-eth0:*), store all this info into an internal 
database, delete all those files (ifcfg-eth0:*) and regenerate them, then call ifup (with increased time while the interface is in a down state).

Basically, in RH7.2 and earlier the "linuxconf" format was supported, but in RH7,3 it was removed, thus breaking existing configurations.

Deleted code from ifup-aliases
# Is there any linuxconf-style alias files
for FILE in ifcfg-${parent-device}:* ; do

    . $FILE;
    if [ -z "$DEVICE" ]; then
        # it's a linuxconf file.
        # I don't think this script will handle both style correctly
        # though. Well, those who knows about the other style don't know
        # the other style and vice versa

if [ "$linuxconfstyle" = "1" ] ; then
    linuxconf --hint ipaliases $device \
        | while read command ali ip mask bcast
        if [ "$command" = "del" ] ; then
            /sbin/ifconfig $ali down
        elif [ "$command" = "add" ] ; then
            /sbin/ifconfig $ali $ip netmask $mask broadcast $bcast
            echo Incomatible hinting: #command $rest >&2

Comment 6 Harald Hoyer 2002-07-09 10:51:04 EDT
then this should be fixed in initscripts... redhat-config-network does not
support this style of config file :(
Comment 7 Bill Nottingham 2002-08-20 23:44:20 EDT
Unfortuantely, only linuxconf can really handle all the complexities of what
linuxconf supported for the initscripts (as noted in this bug). As linuxconf is
not being readded to the distro, this probably won't be fixed.

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