commit 70c1eb689ad174b61ad915ae5384778bd536c16c
Author: Steven Webster <email address hidden>
Date: Mon Mar 27 12:18:23 2017 -0400
Fix port update exception when unshelving an instance with PCI devices
It is possible that _update_port_binding_for_instance() is called
without a migration object, such as when a user unshelves an instance.
If the instance has a port(s) with a PCI device binding, the current
logic extracts a pci mapping from old to new devices from the migration
object and migration context. If a 'new' device is not found in the
PCI mapping, an exception is thrown.
In the case of an unshelve, there is no migration object (or migration
context), and as such we have an empty pci mapping.
This fix will only check for a new device if we have a migration object.
Reviewed: https:/ /review. openstack. org/460173 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=70c1eb689ad 174b61ad915ae53 84778bd536c16c
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 70c1eb689ad174b 61ad915ae538477 8bd536c16c
Author: Steven Webster <email address hidden>
Date: Mon Mar 27 12:18:23 2017 -0400
Fix port update exception when unshelving an instance with PCI devices
It is possible that _update_ port_binding_ for_instance( ) is called
without a migration object, such as when a user unshelves an instance.
If the instance has a port(s) with a PCI device binding, the current
logic extracts a pci mapping from old to new devices from the migration
object and migration context. If a 'new' device is not found in the
PCI mapping, an exception is thrown.
In the case of an unshelve, there is no migration object (or migration
context), and as such we have an empty pci mapping.
This fix will only check for a new device if we have a migration object.
Conflicts:
nova/ tests/unit/ network/ test_neutronv2. py
NOTE(mriedem): The conflict is due to not having change 398489be6303414 585840c151e4db7 in Newton.
I818d2232f3
Closes-Bug: 1677621 ef5b8041ee3853d 3c7b2e2be30 f147aab836a4bd0 99297fb46b) 2e8a36d5ae91a7a cc5324ac5e)
Change-Id: I578153ca862753
(cherry picked from commit c2ff276c841934f
(cherry picked from commit f281c18ba9aea1b