openvswitch agent klm version detection fails on newer kernels

Bug #1319082 reported by Dustin Lundquist
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Unassigned

Bug Description

In neutron/agent/linux/ovs_lib.py get_installed_ovs_klm_version() uses modinfo to detect the version of Open vSwitch provided by the kernel module. The current code simply invokes 'modinfo openvswitch' and looks for the version: line. Now that Open vSwitch has been merged into the mainline kernel version it does not contain that line since the version is simply the version of the Linux kernel. Here is an example of the modprobe output:

    $ modinfo openvswitch
    filename: /lib/modules/3.14.0-031400-generic/kernel/net/openvswitch/openvswitch.ko
    license: GPL
    description: Open vSwitch switching datapath
    srcversion: B3028BC1DB4D9FCEA33EE9C
    depends: libcrc32c,vxlan,gre
    intree: Y
    vermagic: 3.14.0-031400-generic SMP mod_unload modversions
    signer: Magrathea: Glacier signing key
    sig_key: 81:29:87:03:9D:4A:1E:B1:AC:7B:5D:2B:4E:CD:B3:BA:9E:78:5C:D3
    sig_hashalgo: sha512

For our installations I patched around this limitation by simply returning the string 2.0 if the version line was not present:

    $ git diff
    diff --git a/neutron/agent/linux/ovs_lib.py b/neutron/agent/linux/ovs_lib.py
    index 2072183..b56fadc 100644
    --- a/neutron/agent/linux/ovs_lib.py
    +++ b/neutron/agent/linux/ovs_lib.py
    @@ -477,6 +477,7 @@ def get_installed_ovs_klm_version():
                 if 'version: ' in line and not 'srcversion' in line:
                     ver = re.findall("\d+\.\d+", line)
                     return ver[0]
    + return '2.0'
         except Exception:
             LOG.exception(_("Unable to retrieve OVS kernel module version."))

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.