OVS plugin exception when retrieving vif ports

Bug #859864 reported by Brad Hall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Brad Hall
quantum (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Precise by Yolanda Robla

Bug Description

(From Salvatore)

However, I noticed something that could be a bug in the OVS plugin.
ovs_quantum_agent.py, line 166 (in OVSBridge.get_vif_ports):

p = xapi_get_port(name)

xapi_get_ports too is a method of the OVSBridge class. The line should therefore be:

p = self.xapi_get_port(name)

The effect of this apparently is that the OVS plugin agent on the hypervisor crashes, failing to set up VLAN tags on the integration bridge.

Revision history for this message
Brad Hall (bgh) wrote :

(From email thread)

On Mon, Sep 26, 2011 at 10:04 AM, Dan Wendlandt <email address hidden> wrote:
On Mon, Sep 26, 2011 at 9:47 AM, Salvatore Orlando <email address hidden> wrote:
> I’m letting quantum manager plug vifs, and I think I might have spotted the issue.

> Xapi_get_port retrieves xs-vm-uuid from the OVS DB ‘interface’ record, external-ids column, then retrieves the name-label
> for that particular vm, and sets the external id ‘iface-id’ in OVS DB to the name-label for the VM.

yeah, this is the out-of-date behavior that I incorrectly thought we had removed a while back.

> I think iface-id should contain the Quantum interface identifier (at least this is what I gather from daemon_loop). To this aim
> iface-Id should be set to the value of Nicira-iface-id which is stored in other-config for the VIF record in xenserver. Therefore
> xapi_get_port should use xs-vif-uuid in external_ids and retrieve other-config:Nicira-iface-id from the corresponding VIF record.
> Would that work in your opinion?

Actually, OVS takes care of syncing the other_config:nicira-iface-id with the 'iface-id' attribute in the OVSDB, so as I mentioned in my previous mail, I believe the correct behavior is just to get rid of the xenserver-specific branch of the if statement, letting the KVM and XenServer code-path be identical. This is what I thought I did a long while back, but apparently didn't :)

Instead it should just be:

    def get_vif_ports(self):
        edge_ports = []
        port_names = self.get_port_name_list()
        for name in port_names:
            external_ids = self.db_get_map("Interface", name, "external_ids")
            if "iface-id" in external_ids and "attached-mac" in external_ids:
                ofport = self.db_get_val("Interface", name, "ofport")
                p = VifPort(name, ofport, external_ids["iface-id"],
                            external_ids["attached-mac"], self)
                edge_ports.append(p)
        return edge_ports

Since this is the only place that calls xapi_get_ports, that entire function can be removed as well.

Dan

Changed in quantum:
assignee: nobody → Brad Hall (bgh)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : A change has been merged to openstack/quantum

Reviewed: https://review.openstack.org/664
Committed: http://github.com/openstack/quantum/commit/73feb9bf0144df15df4320746d280b36b3de1aaa
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 73feb9bf0144df15df4320746d280b36b3de1aaa
Author: Brad Hall <email address hidden>
Date: Fri Sep 23 21:44:05 2011 -0700

    Remove hack for figuring out the vif interface identifier (lp859864)

    Change-Id: I5a62d5663df28294f86c3935e18acb1d6163f37e

Changed in quantum:
status: In Progress → Fix Committed
dan wendlandt (danwent)
Changed in quantum:
status: Fix Committed → Fix Released
Changed in quantum (Ubuntu):
status: New → Fix Released
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.