'Unable to retrieve OVS kernel module version' when _not_ using DKMS openvswitch module

Bug #1291535 reported by Chris J Arges
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Critical
Kyle Mestery
neutron (Ubuntu)
Fix Released
High
James Page
Trusty
Fix Released
High
James Page

Bug Description

If we are using openvswitch in a system with a newer kernel (3.13/trusty) it should have the features required for neutron and not require an openvswitch dkms package. Therefore we should be able to use the native module.

In neutron/agent/linux/ovs_lib.py:

def get_installed_ovs_klm_version():
    args = ["modinfo", "openvswitch"]
    try:
        cmd = utils.execute(args)
        for line in cmd.split('\n'):
            if 'version: ' in line and not 'srcversion' in line:
                ver = re.findall("\d+\.\d+", line)
                return ver[0]
    except Exception:
        LOG.exception(_("Unable to retrieve OVS kernel module version."))

So if we run modinfo on a system without a DKMS package we get:
$ modinfo openvswitch
filename: /lib/modules/3.13.0-16-generic/kernel/net/openvswitch/openvswitch.ko
license: GPL
description: Open vSwitch switching datapath
srcversion: 1CEE031973F0E4024ACC848
depends: libcrc32c,vxlan,gre
intree: Y
vermagic: 3.13.0-16-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 1A:EE:D8:17:C4:D5:29:55:C4:FA:C3:3A:02:37:FE:0A:93:44:6D:69
sig_hashalgo: sha512

Because 'version' isn't provided we need an alternative way of checking if the openvswitch module has the required features.

Revision history for this message
Chris J Arges (arges) wrote :

I see that this commit a98884efd966fdd69ba88585b7a154ba87d1d061 introduces VXLAN support which adds these version checking constraints. As a person new to this code, should these version checks be done by the code, or using dependency checking in distribution packaging?

James Page (james-page)
Changed in neutron (Ubuntu Trusty):
importance: Undecided → High
status: New → Triaged
Changed in neutron:
importance: Undecided → Critical
milestone: none → icehouse-rc1
tags: added: ovs
Revision history for this message
Kyle Mestery (mestery) wrote :

I'll try this out once commit a98884efd966fdd69ba88585b7a154ba87d1d061 merges.

Changed in neutron:
assignee: nobody → Kyle Mestery (mestery)
Revision history for this message
Francois Eleouet (fanchon) wrote :

Commit f8e49358daee625da435cd5dc4836d20792368e4 [1] seems to responsible for this bug, as it changed kernel module version check: It used to only warn the user if it wasn't able to retrieve module version, whereas it now forces the agent to exit.

[1] https://github.com/openstack/neutron/commit/f8e49358daee625da435cd5dc4836d20792368e4

Revision history for this message
Francois Eleouet (fanchon) wrote :

This patch restores the previous beaviour. It may not be the best approach, but enables agent to start if it isn't able to retrieve module version.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/82931

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/82931
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b2f65d9d447ddf2caf3b9c754bd00a5148bdf12c
Submitter: Jenkins
Branch: master

commit b2f65d9d447ddf2caf3b9c754bd00a5148bdf12c
Author: Kyle Mestery <email address hidden>
Date: Mon Mar 24 03:31:30 2014 +0000

    Correct OVS VXLAN version check

    Update the version checking logic used to determine if the combination of
    Linux kernel, OVS userspace, and OVS kernel module can properly support
    VXLAN.

    Tested on Ubuntu 14.04 without the OVS DKMS module.

    Closes-Bug: #1291535

    Change-Id: If034164b775989d52c3c449caba6baadb970afd9

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
James Page (james-page)
Changed in neutron (Ubuntu Trusty):
status: Triaged → In Progress
assignee: nobody → James Page (james-page)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/84462

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron - 1:2014.1~rc1-0ubuntu1

---------------
neutron (1:2014.1~rc1-0ubuntu1) trusty; urgency=medium

  [ Chuck Short ]
  * debian/rules: Run testr init before tests.
  * debian/patches/disable-udev-tests.patch: Refresh.
  * d/control,neutron-plugin-oneconvergence*: Add One Convergence plugin
    and agent (LP: #1293632).

  [ James Page ]
  * New upstream release candidate (LP: #1288696, #1291535).
  * d/control,neutron-mlnx-plugin{-agent}.install: Split out Mellanox
    plugin configuration from agent package (LP: #1255420).
  * d/control,neutron-{plugin-}{vpn|metering}-agent.*: Drop -plugin from
    metering and vpn agents (they are not plugins) and deal with associated
    change in name of upstart configurations.
  * d/neutron-l3-agent.{install,upstart}: Install fwaas_driver.ini with
    l3-agent and add to config-file path in upstart configuration
    (LP: #1298676).
  * d/neutron-vpn-agent.upstart,control: Include l3_agent.ini on upstart
    config-file path, add dependency on neutron-l3-agent (LP: #1298675).
 -- James Page <email address hidden> Tue, 01 Apr 2014 16:22:54 +0100

Changed in neutron (Ubuntu Trusty):
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.openstack.org/84462
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=22a0692c2e9b0276c6b4dd2f66cedc70f7f835a5
Submitter: Jenkins
Branch: master

commit 22a0692c2e9b0276c6b4dd2f66cedc70f7f835a5
Author: Jakub Libosvar <email address hidden>
Date: Tue Apr 1 16:41:38 2014 +0200

    Use os.uname() instead of calling uname in subprocess

    Related-Bug: #1291535

    Change-Id: I57e18c0b95904f318e3fff08cd18b32e28f48834

Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-rc1 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/icehouse)

Related fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/95590

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/icehouse)

Reviewed: https://review.openstack.org/95590
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5bdea2da970c0abf5b71a2dd5c0621048f363940
Submitter: Jenkins
Branch: stable/icehouse

commit 5bdea2da970c0abf5b71a2dd5c0621048f363940
Author: Jakub Libosvar <email address hidden>
Date: Tue Apr 1 16:41:38 2014 +0200

    Use os.uname() instead of calling uname in subprocess

    Related-Bug: #1291535

    Change-Id: I57e18c0b95904f318e3fff08cd18b32e28f48834
    (cherry picked from commit 22a0692c2e9b0276c6b4dd2f66cedc70f7f835a5)

tags: added: in-stable-icehouse
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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