Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293046 - sys-apps/openrc[oldnet]: bridge interfaces reject vlans as bridge members
Summary: sys-apps/openrc[oldnet]: bridge interfaces reject vlans as bridge members
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard: openrc:oldnet
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-13 15:45 UTC by Alexandru Dan
Modified: 2010-12-12 01:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Dan 2009-11-13 15:45:16 UTC
When interfaces are configured as "null", multiple/same vlan id's are added on both interfaces in order to create a bridged vlan network the secondary interface (eth0++) that starts uses description for eth0 to add vlan (or run vconfig) returning errors about missing eth0.X vlan and giving up.
This setup affects a normal startup procedure when vlan bridging enabled from the /etc/conf.d/net file.

Reproducible: Always

Steps to Reproduce:
1.Configure your /etc/conf.d/net like so:
config_eth0="null"
config_eth1="null"
vlans_eth0="7 10 201"
vlans_eth1="7 10 201"
depend_eth0_7() {
        need net.eth0
        }
config_eth0_7="null"
depend_eth1_7() {
        need net.eth1
        }
config_eth1_7="null"
depend_br7() {
        need net.eth0 net.eth1
        }
bridge_br7="eth0.7 eth1.7"
config_br7="null"
depend_eth0_10() {
        need net.eth0
        }
config_eth0_10="null"
depend_eth1_10() {
        need net.eth1
        }
config_eth1_10="null"
depend_br10() {
        need net.eth0 net.eth1
        }
bridge_br10="eth0.10 eth1.10"
config_br10="null"
depend_eth0_201() {
        need net.eth0
        }
config_eth0_201="null"
depend_eth1_201() {
        need net.eth1
        }
config_eth1_201="null"
depend_br201() {
        need net.eth0 net.eth1
        }
bridge_br201="eth0.201 eth1.201"
config_br201="null"
depend_br0() {
        need net.eth0 net.eth1
        }
bridge_br0="eth0 eth1"
config_br0="aa.bb.cc.dd/24"
routes_br0="default via ww.xx.yy.zz"

2. Start /etc/init.d/net.eth0, net.eth1, net.br0 or net.br7 (for example)

3. Or simply put, add 2 vlan interfaces on two physical interfaces and start them up into a bridge that includes at least two of the same vlans on each interface.
Actual Results:  
The secondary physical interface startup script (let's say net.eth1) uses eth0.X ass vlan interface expected at the end, it returns an error and exists. This behaviour voids the auto-startup of a linux bridge using vlans if restarted.

Expected Results:  
When configuring more interfaces with the same vlans and adding those vlans into a bridge configuration, the startup script (net.ethX) is supposed to start the vlans properly and AFTER these vlans are raised the net.brX should start adding the vlan interfaces into it.

emerge --info
Portage 2.1.7.4 (hardened/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r0, 2.6.29-hardened-SkY x86_64)
=================================================================
System uname: Linux-2.6.29-hardened-SkY-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 13 Nov 2009 12:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.4, 3.1.1-r1
dev-util/ccache:     2.4-r8
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.2-r2
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=nocona -march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-mtune=nocona -march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirrors.evolva.ro/gentoo/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="aac aalib acl acpi alsa amd64 amr apache2 apm async atmo automount bash-completion bcmath berkdb bgpclassless bidi big-tables bzip2 cairo caps cdda cgi cgraph chicken cjk cli cluster contentcache cracklib crypt ctype curl curlwrappers daap dbx dirac disableslit diskio djvu dri dts dvb dvd elf encode esd exif expat extra-tools extraengine fam fastcgi ffmpeg fftw filter flac flash fluidsynth flv fontconfig fortran fpx ftp gd gdbm geoip ggi gif gmp graphviz gs gsm guile hardened hash hdf hdri html httpd iconv idn imap imq inode javascript jbig jpeg jpeg2k justify kerberos kolab lame latex lcms libnotify live lm_sensors logrotate lua mailwrapper max-idx-128 mcve memcache mfd-rewrites mhash mmx modplug modules mp3 mp3rtp mpeg msn mudflap multilib multipath multiuser musepack mysql mysqli ncurses nethack network network-cron nls nptl nptlonly ocaml octave ogg openexr opengl openmp optimisememory oss pam pcre pdf pdo perl perlsuid php pic pike plotutils png posix pppd pulseaudio pvr python q32 qmail-spp quotas readline realms reflection rrdcgi rrdtool rtsp ruby samba sasl schroedinger sdl sdl-image seamonkey session shout simplexml skins slang smux sndfile snmp soap sockets sparse speex spell spl spoof-source sqlite sse sse2 ssl stream strong-optimization suexec svg swat sysfs syslog sysvipc taglib tcl tcp-zebra tcpd tcpmd5 theora threads tidy tiff tk tokenizer tools truetype truetype-fonts twolame unicode upnp urandom v4l v4l2 vcd vcdx verbose vhook vhosts vlm vorbis wddx winbind wmf x264 xinetd xml xmlreader xmlrpc xmlwriter xpm xsl xtended xulrunner xvid yahoo yaz zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack version vhost_alias authn_dbd cern_meta dbd" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Alexandru Dan 2009-11-13 15:48:20 UTC
When starting interfaces like so:
/etc/init.d/net.eth0 start
/etc/init.d/net.eth1 start
/etc/init.d/net.br0 start
/etc/init.d/net.br7 start
/etc/init.d/net.br10 start
/etc/init.d/net.br201 start
The output is this:
* Bringing up interface eth0
*   null... [ ok ]
*   Adding VLAN 7 to eth0
*   Bringing up interface eth0.7
*     null... [ ok ]
*   Adding VLAN 10 to eth0
*   Bringing up interface eth0.10
*     null... [ ok ]
*   Adding VLAN 201 to eth0
*   Bringing up interface eth0.201
*     null... [ ok ]
* Bringing up interface eth1
*   null... [ ok ]
*   Adding VLAN 7 to eth1
*   Bringing up interface eth0.7
eth1.7
*     No configuration specified; defaulting to DHCP
*     dhcp...
*       nothing provides `dhcp'
 [ !! ]
Cannot find device "eth0.7
eth1.7"
Device "eth0.7
eth1.7" does not exist.
Device "eth0.7
eth1.7" does not exist.
*   Adding VLAN 10 to eth1
*   Bringing up interface eth0.10
eth1.10
*     No configuration specified; defaulting to DHCP
*     dhcp...
*       nothing provides `dhcp'
 [ !! ]
Cannot find device "eth0.10
eth1.10"
Device "eth0.10
eth1.10" does not exist.
Device "eth0.10
eth1.10" does not exist.
*   Adding VLAN 201 to eth1
*   Bringing up interface eth0.201
eth1.201
*     No configuration specified; defaulting to DHCP
*     dhcp...
*       nothing provides `dhcp'
 [ !! ]
Cannot find device "eth0.201
eth1.201"
Device "eth0.201
eth1.201" does not exist.
Device "eth0.201
eth1.201" does not exist.
* Bringing up interface br0
*   Creating bridge br0...
*   Adding ports to br0
*     eth0... [ ok ]
*     eth1... [ ok ]
*   aa.bb.cc.dd/24... [ ok ]
*   Adding routes
*     default via ww.xx.yy.zz... [ ok ]
* Bringing up interface br7
*   Destroying bridge br7... [ ok ]
*   Creating bridge br7...
*   Adding ports to br7
*     eth0.7... [ ok ]
*     eth1.7... [ ok ]
*   null... [ ok ]
* Bringing up interface br10
*   Destroying bridge br10... [ ok ]
*   Creating bridge br10...
*   Adding ports to br10
*     eth0.10... [ ok ]
*     eth1.10... [ ok ]
*   null... [ ok ]
* Bringing up interface br201
*   Destroying bridge br201... [ ok ]
*   Creating bridge br201...
*   Adding ports to br201
*     eth0.201... [ ok ]
*     eth1.201... [ ok ]
*   null... [ ok ]


Comment 2 William Hubbs gentoo-dev 2009-12-06 21:15:11 UTC
All,

I'm not sure if this is a configuration issue or a bug since I do not use this type of configuration.  Any assistance would be appreciated.

Thanks,

William
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-11 00:00:21 UTC
I'm trying to understand your complex configuration here so that I can improve the vlan and bridge code. Can you please confirm the information below:

You have:
2 ethernet interfaces:
- eth0
- eth1
3 vlans on each ethernet interface: 7, 10, 201
4 bridges: 
- br0: eth0, eth1
- br7: eth0.7, eth1.7
- br10: eth0.10, eth1.10
- br201: eth0.201, eth1.201

Dependency tree for bringing interfaces online (in Makefile syntax)
br0: eth0 eth1
br7: eth0.7 eth1.7
br10: eth0.10 eth1.10
br201: eth0.201 eth1.201
eth%.7: eth%
eth%.10: eth%
eth%.201: eth%
Comment 4 Alexandru Dan 2010-12-11 08:13:09 UTC
That is indeed correct.


(In reply to comment #3)
> I'm trying to understand your complex configuration here so that I can improve
> the vlan and bridge code. Can you please confirm the information below:
> 
> You have:
> 2 ethernet interfaces:
> - eth0
> - eth1
> 3 vlans on each ethernet interface: 7, 10, 201
> 4 bridges: 
> - br0: eth0, eth1
> - br7: eth0.7, eth1.7
> - br10: eth0.10, eth1.10
> - br201: eth0.201, eth1.201
> 
> Dependency tree for bringing interfaces online (in Makefile syntax)
> br0: eth0 eth1
> br7: eth0.7 eth1.7
> br10: eth0.10 eth1.10
> br201: eth0.201 eth1.201
> eth%.7: eth%
> eth%.10: eth%
> eth%.201: eth%
> 
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-12 01:06:49 UTC
Please update to the latest 9999 git of openrc (at least rev 400b45d), where I
have revamped the bridging code, and test.

Here is what should be a correct configuration for you, if I've followed your
bug posting correctly (there was some whitespace damage and contradictory
information).
===
config_eth0="null"
config_eth1="null"
vlans_eth0="7 10 201"
vlans_eth1="7 10 201"

config_eth0_7="null"
config_eth1_7="null"
config_eth0_10="null"
config_eth1_10="null"
config_eth0_201="null"
config_eth1_201="null"

bridge_br0="eth0 eth1"
config_br0="aa.bb.cc.dd/24"
routes_br0="default via ww.xx.yy.zz"

bridge_br7="eth0.7 eth1.7"
config_br7="null"
bridge_br10="eth0.10 eth1.10"
config_br10="null"
bridge_br201="eth0.201 eth1.201"
config_br201="null"

rc_need_br0='net.eth0 net.eth1'
rc_need_br7='net.eth0 net.eth1'
rc_need_br10='net.eth0 net.eth1'
rc_need_br201='net.eth0 net.eth1'
====

For interfaces to start, just start the bridge interfaces you need.