commit 24fb21623eac04cf8abf8c04e0febb4c52e57540
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
(cherry picked from commit 3dddfa56db69b504408c6894a814a89ea63b05f0)
Reviewed: https:/ /review. openstack. org/470216 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=24fb21623ea c04cf8abf8c04e0 febb4c52e57540
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit 24fb21623eac04c f8abf8c04e0febb 4c52e57540
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 4408c6894a814a8 9ea63b05f0)
Closes-Bug: #1658802
(cherry picked from commit 3dddfa56db69b50