commit fe3a2139a872f432a5c4a509bc403ea5b6ac429e
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/470217 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=fe3a2139a87 2f432a5c4a509bc 403ea5b6ac429e
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit fe3a2139a872f43 2a5c4a509bc403e a5b6ac429e
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