[cc: Jesse]

Hi folks,

While playing with branch-2.6, I've noticed that something may not be cleaned 
in the kernel with openvswitch module; [only] when ovn was configured.

What I observe [below] is that as soon as I configure info used by 
ovn-controller to
connect to sb db, I am unable to unload the ovs kernel module.

Any ideas on what commands I could use to further determine what could be 
this? I did not try it on master, but suspect the issue exists there as well.


-- flaviof


$ lsb_release -sc

cd ~/ovs.git

./boot.sh && \
./configure --prefix=/usr --localstatedir=/var  --sysconfdir=/etc \
                  --enable-ssl --with-linux=/lib/modules/$(uname -r)/build && \
make -j$(nproc) && \
sudo make install ; echo $?

for x in libcrc32c nf_conntrack nf_nat nf_nat_ipv6 nf_nat_ipv4 nf_defrag_ipv4 
gre ; do \
   sudo modprobe $x ; \

sudo insmod ./datapath/linux/openvswitch.ko && \
sudo insmod ./datapath/linux/vport-geneve.ko && \
echo ok

sudo cp ./debian/openvswitch-switch.init /etc/init.d/openvswitch-switch

sudo /etc/init.d/openvswitch-switch start
sudo /usr/share/openvswitch/scripts/ovn-ctl restart_northd
sudo /usr/share/openvswitch/scripts/ovn-ctl restart_controller

#### insert commands that configure conf.db with OVN related commands
#### to make issue happen :/

sudo /usr/share/openvswitch/scripts/ovn-ctl stop_controller
sudo /usr/share/openvswitch/scripts/ovn-ctl stop_northd
sudo /etc/init.d/openvswitch-switch stop

# as you can see there is nothing related to ovs running...
$ ps aux | grep "ov[sn]"

$ sudo rmmod vport_geneve

# Happy case...
$ # this works fine if commands that configure conf.db with ovn are not used...
$ sudo rmmod openvswitch
$ sudo lsmod | grep openv


# However, not as nice if conf.db is configured with encaps info:
$ sudo rmmod openvswitch
rmmod: ERROR: Module openvswitch is in use

$ sudo lsmod | grep openv
openvswitch           253098  2
gre                    13796  1 openvswitch
nf_defrag_ipv4         12758  2 openvswitch,nf_conntrack_ipv4
nf_nat_ipv4            13263  1 openvswitch
nf_defrag_ipv6         34768  2 openvswitch,nf_conntrack_ipv6
nf_nat_ipv6            13279  1 openvswitch
nf_nat                 21841  3 openvswitch,nf_nat_ipv4,nf_nat_ipv6
nf_conntrack           97201  6 
libcrc32c              12644  1 openvswitch

$ sudo modprobe --show-depends openvswitch
insmod /lib/modules/3.13.0-95-generic/kernel/lib/libcrc32c.ko
insmod /lib/modules/3.13.0-95-generic/kernel/net/ipv4/gre.ko
insmod /lib/modules/3.13.0-95-generic/kernel/net/ipv4/ip_tunnel.ko
insmod /lib/modules/3.13.0-95-generic/kernel/drivers/net/vxlan.ko
insmod /lib/modules/3.13.0-95-generic/kernel/net/openvswitch/openvswitch.ko

#### commands that configure conf.db with OVN related commands to make rmmod 

HOST_IP=$(ip -4 addr show eth0 | grep -oP "(?<=inet ).*(?=/)")
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-bridge="br-int"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-encap-ip="$HOST_IP"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-encap-type="geneve"
sudo ovs-vsctl --no-wait set open_vswitch . 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

discuss mailing list

Reply via email to