nova/nova
Steven Webster 70c1eb689a 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
I818d2232f3398489be6303414585840c151e4db7 in Newton.

Closes-Bug: 1677621
Change-Id: I578153ca862753ef5b8041ee3853d3c7b2e2be30
(cherry picked from commit c2ff276c84)
(cherry picked from commit f281c18ba9)
2017-04-26 11:34:56 -04:00
..
CA
api Merge "Pre-load info_cache when handling external events and handle NotFound" into stable/newton 2017-03-01 09:22:13 +00:00
cells Remove straggling use of main db flavors in cellsv1 code 2017-02-14 15:44:14 -05:00
cert
cloudpipe conf: Move cloudpipe options to a group 2016-08-22 09:31:03 +01:00
cmd Merge "Make simple_cell_setup fully idempotent" into stable/newton 2017-02-15 22:12:11 +00:00
common
compute Merge "libvirt: Remove redundant bdm serial mangling and saving during swap_volume" into stable/newton 2017-03-15 04:34:05 +00:00
conductor Do not try to backport when db has older object version 2016-10-17 08:22:43 +00:00
conf Update docs for serial console support 2016-11-09 09:46:26 -05:00
console Fixed typos in nova: compute, console and conf dir 2016-08-01 21:14:32 +00:00
consoleauth
db Fix mitaka online migration for PCI devices 2017-04-20 15:14:22 -07:00
hacking Remove hacking check [N347] for config options. 2016-08-11 14:23:21 +02:00
image Determine disk_format for volume-backed snapshot from schema 2016-09-26 14:07:20 -04:00
ipv6 Fix test_ipv6 and simplify to_global() 2016-06-28 20:42:32 +02:00
keymgr Deprecate barbican options 2016-07-29 15:36:28 -05:00
locale Imported Translations from Zanata 2017-02-27 08:55:47 +00:00
network Fix port update exception when unshelving an instance with PCI devices 2017-04-26 11:34:56 -04:00
notifications Merge "Make notification objects use flavor capacity attributes" 2016-08-06 05:58:09 +00:00
objects Merge "[placement] Enforce min_unit, max_unit and step_size" into stable/newton 2017-03-06 12:17:55 +00:00
pci Fix crashing during guest config with pci_devices=None 2016-12-12 15:07:18 +00:00
policies Merge "Fix server operations' policies to admin only" 2016-08-11 06:07:52 +00:00
scheduler Merge "Fresh resource provider in RT must have generation 0" into stable/newton 2017-03-07 12:44:33 +00:00
servicegroup
tests Fix port update exception when unshelving an instance with PCI devices 2017-04-26 11:34:56 -04:00
virt Ignore IOError when creating 'console.log' 2017-04-07 08:20:15 +00:00
vnc
volume encryptors: Workaround mangled passphrases 2016-11-10 15:31:07 +00:00
wsgi
__init__.py
availability_zones.py
baserpc.py
block_device.py Allow None for block_device_mapping_v2.boot_index 2017-02-09 10:33:35 -05:00
cache_utils.py
config.py Add the ability to configure glanceclient debug logging 2016-08-04 00:32:37 +00:00
context.py Merge "Move cell message queue switching and add caching" 2016-09-01 21:49:23 +00:00
crypto.py
debugger.py
exception.py [placement] Enforce min_unit, max_unit and step_size 2017-01-18 12:54:32 -05:00
exception_wrapper.py do not include context to exception notification 2017-03-17 13:06:25 -04:00
filters.py
hash_ring.py Ironic: allow multiple compute services 2016-08-04 23:51:13 +00:00
hooks.py
i18n.py
loadables.py
manager.py
policy.py Emit warning when use 'user_id' in policy rule 2016-08-29 11:46:15 +00:00
quota.py incorrect description in nova-api.log about quota check 2016-09-02 17:00:14 +09:00
rpc.py Stop overwriting thread local context in ClientRouter 2016-09-28 12:07:41 -04:00
safe_utils.py
service.py Device tagging API support 2016-06-29 20:55:16 -07:00
signature_utils.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test.py Use StableObjectJsonFixture from o.vo 2016-08-29 11:52:10 -04:00
utils.py Merge "Properly quote IPv6 address in RsyncDriver" 2016-08-18 13:17:19 +00:00
version.py
weights.py
wsgi.py