When resizing guest to flavor with pci passthrogth, we need to drop the old pci devices and allocate new ones. To be able to do that we are leveraging the migration context (that used only for NUMA). Adds old and new PCI devices/ PCI requests into the MigrationContext object and uses the nova.pci.request.get_pci_requests_from_flavor() function to grab the set of requested PCI devices during a migration. Then, in the resource tracker's _update_usage_from_migration() call, we use the old and new PCI devices and PCI requests stored in the MigrationContext to properly account for changes. Closes-Bug: #1368201 Co-Authored-by: Jay Pipes <jaypipes@gmail.com> Change-Id: Ie8690f2b7235d677ebe15fabaae81b0a6bda29de
3.4 KiB
3.4 KiB