Bug 5784
Summary: | linuxconf created ip aliases do not function | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | hannu.laurila |
Component: | linuxconf | Assignee: | Nalin Dahyabhai <nalin> |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 6.1 | CC: | alan, ameliabr.nnr, bgraw3, byrum, dcostello, jrimmer, mgb, mlewis, ppoudre, victor.tavares, webguy |
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: | 2000-02-23 17:59:47 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: |
Description
hannu.laurila
1999-10-09 18:48:08 UTC
*** Bug 5778 has been marked as a duplicate of this bug. *** Any ipalias values set in Linuxconf have no effect. ------- Additional Comments From jrimmer 10/09/99 12:29 ------- From syslog (note: number replaced with '#'): Oct 9 12:06:54 meany ifup-aliases: /etc/sysconfig/network-scripts/ifup-aliases: ###.##.##.#: command not found Oct 9 12:06:54 meany ifup-aliases: /etc/sysconfig/network-scripts/ifup-aliases: ipseen_###_##_##_##: command not found Oct 9 12:27:11 meany ifup-aliases: error in ifcfg-eth0:0: didn't specify device or ipaddr Oct 9 12:27:11 meany network: Briging up alias eth0 succeeded This patch makes aliases work provided that, in linuxconf, you: (a) specify only one IP address (not hostname) per line (b) include an explicit netmask for each alias on the next line Note that the broadcast address will be bogus if you are not classful but, for aliases, this seldom matters. This is obviously only intended as a quick workaround until RedHat can provide a comprehensive solution. --- /etc/sysconfig/network-scripts/ifup-aliases.SAFE +++ /etc/sysconfig/network-scripts/ifup-aliases @@ -159,7 +159,7 @@ eval `/bin/ipcalc --netmask ${IPADDR}` fi - if [ -z "$BROADCAST" ]; then + if false; then #[ -z "$BROADCAST" ]; then eval `/bin/ipcalc --broadcast ${IPADDR} ${NETMASK}` nma=$NETMASK; nmb=${nma#*.}; nmc=${nmb#*.}; NMGLOP="${nma%%.*}_${nmb%%.*}_${nmc%%.*}_${nmc#*.}"; @@ -293,6 +293,7 @@ ini_env; . $FILE; + DEVICE="${FILE##ifcfg-}" new_interface; done This is fixed in initscripts-4.53-1, which is in the current Raw Hide release. It currently is relying on the fact that linuxconf does *not* write a "DEVICE" field to parse the files properly. Please re-open if this doesn't work for you. *** Bug 5976 has been marked as a duplicate of this bug. *** [root@goliath /root]# /sbin/ifup eth0:0 SIOCSIFNETMASK: No such device SIOCSIFBRDADDR: No such device 192.168.2.252: unknown interface: No such device Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported usage: /etc/sysconfig/network-scripts/ifup-aliases <net-device> usage: /etc/sysconfig/network-scripts/ifup-routes <net-device> ------- Additional Comments From notting 10/15/99 11:38 ------- What does ifcfg-eth0:0 look like? ------- Additional Comments From alan 10/15/99 18:59 ------- Here is some script output indicative of the problem. If you scan through it you will notice that nowhere does the DEVICE variable ever get set. This, in turn, causes the DEVICETYPE and REALDEVICE variables to be null..... resulting chaos insues. Script started on Fri Oct 15 17:56:09 1999 [root@hudson network-scripts]# set -x [root@hudson network-scripts]# . /sbin/ifup eth0:0 + . /sbin/ifup eth0:0 ++ PATH=/sbin:/usr/sbin:/bin:/usr/bin ++ cd /etc/sysconfig/network-scripts ++ . network-functions ++ need_hostname +++ hostname +++ hostname +++ hostname ++ [ hudson.wild.prv = (none) -o hudson.wild.prv = localhost -o hudson.wild.prv = localhost.localdomain ] ++ unset NEEDHOSTNAME ++ CONFIG=eth0:0 ++ [ -z eth0:0 ] ++ [ -f eth0:0 ] ++ CONFIG=ifcfg-eth0:0 ++ [ -f ifcfg-eth0:0 ] ++ [ 0 != 0 ] ++ source_config +++ basename ifcfg-eth0:0 +++ sed s/^ifcfg-//g ++ DEVNAME=eth0:0 ++ basename ifcfg-eth0:0 ++ grep [^g]- ++ . ifcfg-eth0:0 +++ IPADDR=192.168.2.254 +++ NETMASK=255.255.0.0 ++ [ foo = fooboot -a = no ] ++ IPSETUP=no +++ echo +++ sed s/[0-9]*$// ++ DEVICETYPE= +++ echo +++ sed s/:.*//g ++ REALDEVICE= ++ echo ++ grep -q : ++ ISALIAS=no ++ [ = yes ] ++ [ = bootp -o = dhcp ] ++ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup- ++ [ -x /etc/sysconfig/network-scripts/ifup- ] ++ /sbin/ifconfig ++ grep -s not found ++ [ 1 = 0 ] ++ [ = yes -a no = no -a != -a -x /sbin/ifenslave ] ++ [ -n ] ++ [ -n ] ++ [ -z 255.255.0.0 ] ++ [ -z ] +++ /bin/ipcalc --broadcast 192.168.2.254 255.255.0.0 ++ eval BROADCAST=192.168.255.255 +++ BROADCAST=192.168.255.255 ++ [ -z ] +++ /bin/ipcalc --network 192.168.2.254 255.255.0.0 ++ eval NETWORK=192.168.0.0 +++ NETWORK=192.168.0.0 ++ ifconfig 192.168.2.254 netmask 255.255.0.0 broadcast 192.168.255.255 SIOCSIFNETMASK: No such device SIOCSIFBRDADDR: No such device 192.168.2.254: unknown interface: No such device ++ [ no = no ] +++ route -n +++ sed s/ .*// +++ grep 192.168.0.0 ++ [ -z 192.168.0.0 ] ++ route add -host 192.168.2.254 SIOCADDRT: No such device ++ [ != -a != none ] ++ . /etc/sysconfig/network +++ NETWORKING=yes +++ FORWARD_IPV4=no +++ HOSTNAME=hudson.wild.prv +++ GATEWAY=192.168.2.51 +++ GATEWAYDEV=eth0 ++ [ 192.168.2.51 != ] ++ [ eth0 = -o eth0 = ] ++ [ = yes ] ++ exec /etc/sysconfig/network-scripts/ifup-post ifcfg-eth0:0 usage: /etc/sysconfig/network-scripts/ifup-aliases <net-device> usage: /etc/sysconfig/network-scripts/ifup-routes <net-device> Script done on Fri Oct 15 17:56:20 1999 ------- Additional Comments From alan 10/15/99 19:46 ------- Here is some script output indicative of the problem. If you scan through it you will notice that nowhere does the DEVICE variable ever get set. This, in turn, causes the DEVICETYPE and REALDEVICE variables to be null..... resulting chaos insues. Script started on Fri Oct 15 17:56:09 1999 [root@hudson network-scripts]# set -x [root@hudson network-scripts]# . /sbin/ifup eth0:0 + . /sbin/ifup eth0:0 ++ PATH=/sbin:/usr/sbin:/bin:/usr/bin ++ cd /etc/sysconfig/network-scripts ++ . network-functions ++ need_hostname +++ hostname +++ hostname +++ hostname ++ [ hudson.wild.prv = (none) -o hudson.wild.prv = localhost -o hudson.wild.prv = localhost.localdomain ] ++ unset NEEDHOSTNAME ++ CONFIG=eth0:0 ++ [ -z eth0:0 ] ++ [ -f eth0:0 ] ++ CONFIG=ifcfg-eth0:0 ++ [ -f ifcfg-eth0:0 ] ++ [ 0 != 0 ] ++ source_config +++ basename ifcfg-eth0:0 +++ sed s/^ifcfg-//g ++ DEVNAME=eth0:0 ++ basename ifcfg-eth0:0 ++ grep [^g]- ++ . ifcfg-eth0:0 +++ IPADDR=192.168.2.254 +++ NETMASK=255.255.0.0 ++ [ foo = fooboot -a = no ] ++ IPSETUP=no +++ echo +++ sed s/[0-9]*$// ++ DEVICETYPE= +++ echo +++ sed s/:.*//g ++ REALDEVICE= ++ echo ++ grep -q : ++ ISALIAS=no ++ [ = yes ] ++ [ = bootp -o = dhcp ] ++ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup- ++ [ -x /etc/sysconfig/network-scripts/ifup- ] ++ /sbin/ifconfig ++ grep -s not found ++ [ 1 = 0 ] ++ [ = yes -a no = no -a != -a -x /sbin/ifenslave ] ++ [ -n ] ++ [ -n ] ++ [ -z 255.255.0.0 ] ++ [ -z ] +++ /bin/ipcalc --broadcast 192.168.2.254 255.255.0.0 ++ eval BROADCAST=192.168.255.255 +++ BROADCAST=192.168.255.255 ++ [ -z ] +++ /bin/ipcalc --network 192.168.2.254 255.255.0.0 ++ eval NETWORK=192.168.0.0 +++ NETWORK=192.168.0.0 ++ ifconfig 192.168.2.254 netmask 255.255.0.0 broadcast 192.168.255.255 SIOCSIFNETMASK: No such device SIOCSIFBRDADDR: No such device 192.168.2.254: unknown interface: No such device ++ [ no = no ] +++ route -n +++ sed s/ .*// +++ grep 192.168.0.0 ++ [ -z 192.168.0.0 ] ++ route add -host 192.168.2.254 SIOCADDRT: No such device ++ [ != -a != none ] ++ . /etc/sysconfig/network +++ NETWORKING=yes +++ FORWARD_IPV4=no +++ HOSTNAME=hudson.wild.prv +++ GATEWAY=192.168.2.51 +++ GATEWAYDEV=eth0 ++ [ 192.168.2.51 != ] ++ [ eth0 = -o eth0 = ] ++ [ = yes ] ++ exec /etc/sysconfig/network-scripts/ifup-post ifcfg-eth0:0 usage: /etc/sysconfig/network-scripts/ifup-aliases <net-device> usage: /etc/sysconfig/network-scripts/ifup-routes <net-device> Script done on Fri Oct 15 17:56:20 1999 ------- Additional Comments From webguy 10/15/99 21:57 ------- Had the same problem. ifcfg-eth0:0 says: IPADDR="10.200.7.44" NETMASK="255.255.0.0" *** Bug 6069 has been marked as a duplicate of this bug. *** If you use linuxconf/config/networking/server tasks/IP aliases for virutal hosts the virtual hosts do not work. linuxconf makes some files in /etc/sysconfig/network-scripts like ifcfg-eth0:? and if you try and run ifup-aliases you get errors like the following: ipseen_130_37_129_65-74=ifcfg-eth0:0: command not found ifup-aliases: error in ifcfg-eth0:0: already seen ipaddr\ 130.37.129.65-74 in -74 The ifup-aliases script has some documentation regarding IPADDR_START, IPADDR_END, but the files created by linuxconf don't seem to follow this and use IPADDR. If you undo some of the debugging comments in ifup-aliases, the device (in the script as $DEVICE) does not appear to be defined correctly. But, if you change it to $device, other parts seem not to work. *** Bug 6162 has been marked as a duplicate of this bug. *** The following is an error with the ifup-aliases script in /etc/sysconfig/network-scripts If I add an ip range in ifcfg-eth0:0 like x.x.x.90-100, the following happens error shows up in /var/log/messages: ifup-aliases: /etc/sysconfig/network-scripts/ifup-aliases: ipseen_x_x_x_90-100=ifcfg-eth0:0: command not found ifup-aliases: error in ifcfg-eth0:0: already seen ipaddr x.x.x.90-100 in -100 This worked in RedHat 6.0. I got around the problem by replacing the ifup-aliases script in 6.1 with the script in 6.0, and it worked... --vt *** Bug 6777 has been marked as a duplicate of this bug. *** After installing redhat 6.1 on one of our web servers we noticed that it was not responding to requests correctly, after checking, the ip aliases for our server had not been initialized. A clean install on another system produced the same effect (after configuring the aliases using linuxconf). The quick solution for us was to copy ifup-aliases from the package that came with 6.0 (this fixed both machines) I checked to see if this had been submitted as a bug, and it doesn't seem so... which is kind of surprising... hopefully I'm not bothering you all with something that has already been brought up. ------- Additional Comments From mlewis 11/06/99 11:20 ------- nevermind, after searching on initscripts instead of ipup-aliases I found the old bug report... sorry *** Bug 6825 has been marked as a duplicate of this bug. *** I noticed your name in the new 6.1 ifup-aliases script. I had problems bring up virtual interfaces and with a little bugging noticed that the following line seemed to be missing. DEVICE="`echo $FILE | sed -e 's/ifcfg\-//'`" I placed this line in the function new_interface(). Just below the assignment line that starts with IPGLOP and above line that starts wtih DEVNUM. Around line 133 in the file. I am not sure if this is where you intended the assignment to be made, but it seems to work correctly. I added the line because at line 156 with the compare of if [ -z "$DEVICE" -o -z "$IPADDR" ]; then echo "error in $FILE: didn't specify device or ipaddr" >&2 ; exit 0 fi $DEVICE is empty and causes script to fail. ------- Additional Comments From byrum 11/08/99 12:40 ------- Sorry about the strange context, I send this also in an email to Bill Nottingham who is in the header of the file as the last person to modify ifup-aliases. This is still not fixed in the latest tree. Or rather, eth0:0 is indeed brought up but linuxconf cannot edit its configuration. Then it's no longer an initscripts problem, but a linuxconf problem. Closing since we don't ship linuxconf anymore. This is still not fixed in the latest tree. https://www-subwaylistens.com/ |