revisit openvswitch agent's handling of GRE tunnels when not supported by the kernel

Bug #1045610 reported by Robert Kukura
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Robert Kukura

Bug Description

On operating systems where the kernel modules for OVS patch ports and GRE tunneling are not available, the openvswitch agent will log error messages from ovs-vsctl commands when creating the patch port linking the integration bridge and tunnel bridge at startup, and log error message from ovs-ofctl commands when creating flows that match on tun_id or have set_tunnel actions while attempting to bring up GRE networks. These errors occurring does not effect the flow of control in the agent. These resulting virtual networks will operate locally, but will not have external connectivity.

We need to revisit whether these errors being logged is sufficient, or if some other action needs to be taken when GRE tunnels are not supported by the OS.

Revision history for this message
dan wendlandt (danwent) wrote :

I would actually like to see the agent do a check upon start-up and fail completely if it is configured to use tunnels, but is running a version of OVS that does not support tunneling. Seems like this could be as simple as just trying to create a dummy gre port, and catching the error. Seems valuable to have for RC1, if you have a chance. Let me know.

Changed in quantum:
status: New → Confirmed
Revision history for this message
Robert Kukura (rkukura) wrote :

In a comment on patch set 1 of https://review.openstack.org/#/c/12362/, I had suggested setting the tunnel_bridge configuration variable to empty as a way to prevent the agent from trying to use tunnels when not supported on the host OS. A separate enable_tunnelling flag would serve the purpose just as well. If tunnelling is enabled and creating the patch port failed during startup, the agent would log an error and shut down. If tunnelling is disabled and a GRE network is supposed to be activated, an error would be logged, but the agent would not shut down.

Revision history for this message
dan wendlandt (danwent) wrote :

I just recently noticed your comment on the patch. I wish there was a slightly cleaner way to do it, but if you think that's the best trade-off to make, I'm OK with it.

Is the write-up above, are you suggesting changing from the approach of using tunnel_bridge as the indicator to having an explicit indicator, as that would make more sense in being able to have a check if tunnels are supported on agent startup?

In general I'm really trying to clamp down on "it would be nice" changes, however minor, at this point in the release. That said, I personally see a lot of value in a change like the one described in this bug, which helps people realize that what they are trying to do is unsupported. So if you think an enable_tunneling flag kills two birds with one stone, let's go for it.

Robert Kukura (rkukura)
Changed in quantum:
assignee: nobody → Robert Kukura (rkukura)
dan wendlandt (danwent)
Changed in quantum:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

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

Changed in quantum:
status: Confirmed → In Progress
dan wendlandt (danwent)
Changed in quantum:
milestone: none → folsom-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/12686
Committed: http://github.com/openstack/quantum/commit/00dd97c7e9a852f4abd6e8460a0d094c01d3d0ba
Submitter: Jenkins
Branch: master

commit 00dd97c7e9a852f4abd6e8460a0d094c01d3d0ba
Author: Bob Kukura <email address hidden>
Date: Sun Sep 9 11:49:25 2012 -0400

    Add enable_tunneling openvswitch configuration variable

    Not all systems that support Open vSwitch support its GRE tunneling
    feature that is not in the Linux kernel source tree. Therefore, a new
    configuration variable, enable_tunneling, applies to both the server
    and agent. Its default value is False, so it must be set to True to
    enable tunneling for tenant and/or provider networks. If
    enable_tunneling is False, the server will not allow creation of GRE
    networks, and the agent will not initialize the tunnel bridge and will
    log an error if there is an attempt to provision a GRE network. If it
    is True, the agent now logs an error and exits if it fails to
    initialize the patch ports used for the tunnel bridge. Fixes bug
    1045610.

    When there is an attempt to provision a flat or VLAN network and the
    agent has no bridge mapping configured for a the specified physical
    network, the agent will now log an error rather than crash.

    An undefined variable in a logging statement has been corrected.

    Logging levels for openvswitch have been checked and updated where
    necessary, and logging statements now avoid the % string substitution
    syntax. Fixes bug 1045592.

    The corresponding devstack update has already been merged.

    Change-Id: I149db182dd132cc05802dcb20c6b552e293664a5

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-rc1 → 2012.2
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.