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.
Reviewed: https:/ /review. openstack. org/435144 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=3dddfa56db6 9b504408c6894a8 14a89ea63b05f0
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3dddfa56db69b50 4408c6894a814a8 9ea63b05f0
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 6865f4d9f22d5da a2f07ff9651c228 0aed489c8c 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: I6659235a70aa45 28fd21911c04e65 1194591e449
Closes-Bug: #1658802