Bug 193133 - ifup does not like layered IPs on vlan interface
Summary: ifup does not like layered IPs on vlan interface
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts   
(Show other bugs)
Version: 4.0
Hardware: i386 Linux
medium
low
Target Milestone: ---
: ---
Assignee: Miloslav Trmač
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 176344
TreeView+ depends on / blocked
 
Reported: 2006-05-25 15:44 UTC by Jake Garver
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHBA-2007-0303
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-01 17:29:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch committed to rawhide (1.74 KB, patch)
2006-07-28 03:50 UTC, Miloslav Trmač
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0303 normal SHIPPED_LIVE initscripts bug fix update 2007-05-01 17:26:29 UTC

Description Jake Garver 2006-05-25 15:44:18 UTC
In /etc/sysconfig/network, VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD, so my interface
for vlan 120 is named "vlan120".  I had to do this to work around a SteelEye
LifeKeeper bug.

When I try to create "vlan120:0" and don't define PHYSDEV, I get: 
[root@dev1dba1 ~]# ifup vlan120:0
PHYSDEV should be set for device vlan120:0

[root@dev1dba1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-vlan120:0
DEVICE=vlan120:0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.37.22
NETWORK=10.42.37.0
NETMASK=255.255.255.224
BROADCAST=10.42.37.31

So, I put a PHYSDEV in (which is bond0 in my case) and now I get:
[root@dev1dba1 ~]# ifup vlan120:0
ERROR: trying to add VLAN #120 to IF -:bond0:-  error: Invalid argument
SIOCSIFFLAGS: Cannot assign requested address

But the interface comes up correctly, so I'm setting the severity of this issue
to "low" as I have a workaround that just whines a bit.

I don't think the PHYSDEV should be required and we don't need to build the vlan
interface.  So, I propose changing the regexp that looks for vlan* interfaces
before making sure we have a PHYSDEV:
71c71
<      if echo ${DEVICE} | LANG=C egrep -q 'vlan[0-9][0-9]?[0-9]?[0-9]?'; then
---
>      if echo ${DEVICE} | LANG=C egrep -q 'vlan[0-9][0-9]?[0-9]?[0-9]?[^:]*$'; then

This leaves me with the SIOCSIFFLAGS error:
[root@dev1dba1 network-scripts]# ifup vlan120:0
SIOCSIFFLAGS: Cannot assign requested address

I tracked this down to "/sbin/ip link set dev ${DEVICE} down" in the Bonding
initialization.  The interface under vlan120 is bond0.  Ethtool reports the
driver as bonding, so ifup bounces the interface.
[root@dev1dba1 ~]# ethtool -i vlan120:0
driver: bonding
version: 2.6.1
firmware-version: 2
bus-info:

I don't think we need to bounce layered IPs, so I skip it for bonding interfaces
with colons in the name:
231,237c231,239
<     /sbin/ip link set dev ${DEVICE} down
<     /sbin/ip link set dev ${DEVICE} up
<     for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}"
/etc/sysconfig/network-scripts/ifcfg-*` ; do
<         if [ "$BOOTPROTO" = "dhcp" ]; then
<               /sbin/ifup ${device##*/}
<       fi
<     done
---
>     if echo ${DEVICE} | LANG=C egrep -q '^[^:]*$'; then
>         /sbin/ip link set dev ${DEVICE} down
>         /sbin/ip link set dev ${DEVICE} up
>         for device in `LANG=C grep -l "^[[:space:]]*MASTER=${DEVICE}"
/etc/sysconfig/network-scripts/ifcfg-*` ; do
>             if [ "$BOOTPROTO" = "dhcp" ]; then
>                 /sbin/ifup ${device##*/}
>             fi
>         done
>     fi

Now ifup brings up the layed IP with no errors.


My complete config:
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.33.51
NETWORK=10.42.32.0
NETMASK=255.255.254.0
BROADCAST=10.42.33.255
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-vlan120
DEVICE=vlan120
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.37.1
NETWORK=10.42.37.0
NETMASK=255.255.255.224
BROADCAST=10.42.37.31
PHYSDEV=bond0
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-vlan120:0
DEVICE=vlan120:0
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.42.37.22
NETWORK=10.42.37.0
NETMASK=255.255.255.224
BROADCAST=10.42.37.31
[root@dev1dba1 network-scripts]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dev1dba1
NOZEROCONF=yes
VLAN=yes
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD

Comment 1 Bill Nottingham 2006-05-25 16:39:40 UTC
Aliases on top of vlan on top of bonding? Honestly, I'm not sure we tried that
before. Patch seems reasonable at first glance.

Comment 2 Miloslav Trmač 2006-05-29 01:48:45 UTC
Both huunks should probably use $ISALIAS, and move the checks to upper-level
conditions.

Comment 3 Miloslav Trmač 2006-07-28 03:50:08 UTC
Created attachment 133213 [details]
Patch committed to rawhide

Comment 4 RHEL Product and Program Management 2006-08-18 15:48:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Bill Nottingham 2006-11-20 21:26:21 UTC
Added in CVS, will be in 7.93.26.EL-1.

Comment 10 Red Hat Bugzilla 2007-05-01 17:29:33 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0303.html



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