> On Sep 22, 2016, at 10:59 AM, Guru Shetty <g...@ovn.org> wrote: > > I think it usually happens because the geneve tunnel exists in the kernel > datapath. The right way to do this is via '/etc/init.d/openvswitch-switch > force-reload-kmod' >
Oh cool. Thanks for showing me 'force-reload-kmod', Guru! I can see that using this method requires the .ko file to be at the proper place (i.e. /lib/modules/$(uname -r)/kernel//net/openvswitch/openvswitch.ko), which is a bit of a shame, since insmod way would have give us a bit more control. Still good, tho! -- flaviof > On 22 September 2016 at 01:46, Flavio Fernandes <fla...@flaviof.com> wrote: > [cc: Jesse] > > Hi folks, > > While playing with branch-2.6, I've noticed that something may not be cleaned > properly > 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 > causing > this? I did not try it on master, but suspect the issue exists there as well. > > Thanks, > > -- flaviof > > == > > $ lsb_release -sc > trusty > > 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 ; \ > done > > 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 > openvswitch,nf_nat,nf_nat_ipv4,nf_nat_ipv6,nf_conntrack_ipv4,nf_conntrack_ipv6 > 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 > fail > > HOST_IP=$(ip -4 addr show eth0 | grep -oP "(?<=inet ).*(?=/)") > OVN_DB_IP=$HOST_IP > OVN_SB_DB_PORT=${2-6642} > OVN_SB_REMOTE="tcp:${OVN_DB_IP}:${OVN_SB_DB_PORT}" > 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 . > external-ids:ovn-remote="$OVN_SB_REMOTE" > > > > _______________________________________________ > discuss mailing list > discuss@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss > >
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss