Comment 3 for bug 1658802

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 3dddfa56db69b504408c6894a814a89ea63b05f0
Author: Kevin Benton <email address hidden>
Date: Thu Feb 16 14:53:31 2017 -0800

    Macvtap: Check for no original port in is_live_migration

    Change 6865f4d9f22d5daa2f07ff9651c2280aed489c8c mistakenly
    assumed that None would not be present for the 'original'
    property on a PortContext. However, this is the default value
    for the original field in PortContext, which is what is used
    in the construction as part of the _create_port_db process
    in ML2.

    This resulted in binding failures for the macvtap mech drivers
    due to an attribute error in cases like brand new ports.

    This patch simply checks for None before trying to determine
    if it's a live migration (which it isn't in the case of port creation).

    Part of the issue is likely that the FakePortContext in the unit tests
    was defaulting to an empty dict which is the not the same behavior as
    the real PortContext.

    Change-Id: I6659235a70aa4528fd21911c04e651194591e449
    Closes-Bug: #1658802