Skip to content

Instantly share code, notes, and snippets.

@samgaw
Created May 6, 2011 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samgaw/958808 to your computer and use it in GitHub Desktop.
Save samgaw/958808 to your computer and use it in GitHub Desktop.
Recreate OVZ panic with OVS-trunk on Debian 6 (Squeeze) 2.6.32-5-openvz-amd64
## System Config
uname -a
Linux ovz04 2.6.32-5-openvz-amd64 #1 SMP Mon Mar 7 22:25:57 UTC 2011 x86_64 GNU/Linux
cat /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 10.210.4.20
netmask 255.255.255.0
gateway 10.210.4.254
allow-hotplug eth1
iface eth1 inet manual
cat /etc/sysctl.conf
kernel.sysrq = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.proxy_arp = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 2
## Build kernel modules from trunk
./boot.sh
./configure --with-l26=/lib/modules/`uname -r`/build
make
make install
## Start OVS
lsmod | grep bridge # rmmod bridge if enabled
insmod datapath/linux-2.6/openvswitch_mod.ko
mkdir -p /usr/local/etc/openvswitch
ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
ovsdb-server /usr/local/etc/openvswitch/conf.db --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,manager_options --pidfile --detach
ovs-vsctl --no-wait init
ovs-vswitchd unix:/usr/local/var/run/openvswitch/db.sock --pidfile --detach
ps aux | grep ovs
root 9976 0.0 0.0 21428 1768 ? Ss 12:18 0:00 ovsdb-server /usr/local/etc/openvswitch/conf.db --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,manager_options --pidfile --detach
root 9979 0.0 0.0 21864 1340 ? Ss 12:18 0:00 ovs-vswitchd unix:/usr/local/var/run/openvswitch/db.sock --pidfile --detach
root 9981 0.0 0.0 7544 820 pts/0 S+ 12:18 0:00 grep ovs
## Start brcompatd
insmod datapath/linux-2.6/brcompat_mod.ko
ovs-brcompatd --pidfile --detach -vANY:console:EMER unix:/usr/local/var/run/openvswitch/db.sock
ps aux | grep brcompatd
root 9985 0.0 0.0 21664 1064 ? Ss 12:19 0:00 ovs-brcompatd --pidfile --detach -vANY:console:EMER unix:/usr/local/var/run/openvswitch/db.sock
root 9987 0.0 0.0 7544 824 pts/0 S+ 12:20 0:00 grep brcompatd
## Create bridge:
brctl addbr vbr0
brctl addif vbr0 eth1
brctl show
bridge name bridge id STP enabled interfaces
vbr0 0000.00188b3ed188 no eth1
## Join container to bridge vbr0
vzctl set 100 --netif_add eth0,,,,vbr0 --save
brctl addif vbr0 veth100.0
brctl show
bridge name bridge id STP enabled interfaces
vbr0 0000.001851241854 no eth1
veth100.0
vzctl exec 100 'cat /etc/network/interfaces'
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 10.210.4.22
netmask 255.255.255.0
ping 10.210.4.22
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
^C
## Remove container from bridge vbr0
brctl delif vbr0 veth100.0
brctl show
bridge name bridge id STP enabled interfaces
vbr0 0000.001851241854 no eth1
## Add vbr0 config to /etc/network/interfaces
cat /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 10.210.4.20
netmask 255.255.255.0
gateway 10.210.4.254
allow-hotplug eth1
iface eth1 inet manual
auto vbr0
iface vbr0 inet static
address 10.210.4.21
netmask 255.255.255.0
bridge_ports eth1
bridge_stp off
bridge_fd 0
ifup vbr0
ping 10.210.4.21
PING 10.210.4.253 (10.210.4.253): 56 data bytes
64 bytes from 10.210.4.21: icmp_seq=0 ttl=254 time=1.627 ms
64 bytes from 10.210.4.21: icmp_seq=1 ttl=254 time=1.571 ms
64 bytes from 10.210.4.21: icmp_seq=2 ttl=254 time=1.548 ms
## Add container to bridge vbr0
ifdown vbr0
brctl addif vbr0 veth100.0
brctl show
bridge name bridge id STP enabled interfaces
vbr0 0000.001851241854 no eth1
veth100.0
ifup vbr0
Waiting for vbr0 to get ready (MAXWAIT is 2 seconds).
Message from syslogd@ovz04 at May 6 12:32:30 ...
kernel:[ 2231.505024] Oops: 0010 [#1] SMP
Message from syslogd@ovz04 at May 6 12:32:30 ...
kernel:[ 2231.533288] last sysfs file: /sys/devices/virtual/net/veth100.0/brport/hold_timer
Message from syslogd@ovz04 at May 6 12:32:30 ...
kernel:[ 2231.533288] Stack:
Message from syslogd@ovz04 at May 6 12:32:30 ...
kernel:[ 2231.533288] Call Trace:
Message from syslogd@ovz04 at May 6 12:32:30 ...
kernel:[ 2231.533288] Code: Bad RIP value.
Message from syslogd@ovz04 at May 6 12:32:30 ...
kernel:[ 2231.533288] CR2: 0000000000000000
Message from syslogd@ovz04 at May 6 12:32:30 ...
kernel:[ 2232.291689] Kernel panic - not syncing: Fatal exception in interrupt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment