nova/nova
Hemanth Nakkina 1fb4cc03e3 Update pci stat pools based on PCI device changes
At start up of nova-compute service, the PCI stat pools are
populated based on information in pci_devices table in Nova
database. The pools are updated only when new device is added
or removed but not on any device changes like device type.

If an existing device is configured as SRIOV and nova-compute
is restarted, the pci_devices table gets updated but the device
is still listed under the old pool in pci_tracker.stats.pool
(in-memory object).

This patch looks for device type updates in existing devices
and updates the pools accordingly.

Conflicts:
    nova/tests/functional/libvirt/test_pci_sriov_servers.py
    nova/tests/unit/virt/libvirt/fakelibvirt.py

The functional test requires to skip the capabilities of pci
device. This can be done by getting capability template out of
pci_dev_template [1] which is introduced by commit
b927748c25. Not able to clean
backport the mentioned commit and so removed funtional test
case.

[1] b0a451d428/nova/tests/unit/virt/libvirt/fakelibvirt.py (L186)

Change-Id: Id4ebb06e634a612c8be4be6c678d8265e0b99730
Closes-Bug: #1892361
(cherry picked from commit b8695de6da)
(cherry picked from commit d8b8a8193b)
(cherry picked from commit f58399cf49)
(cherry picked from commit 8378785f99)
(cherry picked from commit 73e631862a)
2021-02-15 12:07:39 +00:00
..
api Merge "Block rebuild when NUMA topology changed" into stable/rocky 2020-08-18 02:28:16 +00:00
cells Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
cmd Add --instance option to heal_allocations 2019-12-13 15:05:22 -05:00
common
compute Merge "post live migration: don't call Neutron needlessly" into stable/rocky 2020-10-15 00:06:44 +00:00
conductor Avoid circular reference during serialization 2020-02-26 12:24:18 +00:00
conf Add config option for neutron client retries 2020-04-24 15:09:16 +00:00
console Mask the token used to allow access to consoles 2020-01-26 16:00:05 +01:00
consoleauth Mask the token used to allow access to consoles 2020-01-26 16:00:05 +01:00
db Add retry_on_deadlock to migration_update DB API 2020-03-05 14:05:33 +00:00
hacking Use nova.db.api directly 2018-07-10 14:56:27 +00:00
image Share snapshot image membership with instance owner 2019-04-30 21:13:46 +09:00
ipv6
keymgr
locale Imported Translations from Zanata 2019-01-06 07:42:59 +00:00
network Add config option for neutron client retries 2020-04-24 15:09:16 +00:00
notifications Remove noisy DEBUG log 2018-08-24 11:19:14 +02:00
objects compute: Use source_bdms to reset attachment_ids during LM rollback 2020-09-14 10:20:11 +01:00
pci Update pci stat pools based on PCI device changes 2021-02-15 12:07:39 +00:00
policies Remove support for /os-floating-ip-dns REST API 2018-07-18 22:23:45 -04:00
privsep Make supports_direct_io work on 4096b sector size 2018-11-21 14:14:22 +00:00
scheduler FUP for in-place numa rebuild 2020-07-09 14:06:22 +01:00
servicegroup Fix service list for disabled compute using MC driver 2018-09-14 02:25:10 +00:00
tests Update pci stat pools based on PCI device changes 2021-02-15 12:07:39 +00:00
virt Merge "libvirt: Do not reference VIR_ERR_DEVICE_MISSING when libvirt is < v4.1.0" into stable/rocky 2020-09-24 20:01:05 +00:00
vnc
volume Add retry to cinder API calls related to volume detach 2020-05-04 09:37:22 -04:00
__init__.py
availability_zones.py AZ list performance optimization: avoid double service list DB fetch 2019-04-30 13:17:04 +00:00
baserpc.py
block_device.py Add uuid column to BlockDeviceMapping 2017-12-17 14:28:35 +00:00
cache_utils.py
config.py Configure placement DB context manager for nova-manage/status 2018-09-06 10:47:55 -04:00
context.py Reset the cell cache for database access in Service 2020-04-16 20:56:39 +00:00
crypto.py Convert certificate generation to processutils. 2018-05-02 19:18:41 +10:00
debugger.py
exception.py Removed the host FQDN from the exception message 2020-09-03 00:30:14 +00:00
exception_wrapper.py Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
filters.py
hooks.py
i18n.py correct referenced url in comments 2018-01-18 09:16:37 +08:00
loadables.py
manager.py conf: Remove 'db_driver' config opt 2018-03-16 17:23:16 +00:00
policy.py
profiler.py
quota.py Merge "Avoid joins in _server_group_count_members_by_user" 2018-08-07 23:16:06 +00:00
rc_fields.py Nix unused raise_if_custom_resource_class_pre_v1_1 2018-06-18 19:52:45 +00:00
rpc.py Use oslo.messaging per-call monitoring 2018-06-11 14:44:10 -07:00
safe_utils.py
service.py Reset the cell cache for database access in Service 2020-04-16 20:56:39 +00:00
service_auth.py Fix NoneType error when [service_user] is misconfigured 2017-11-28 12:22:30 -06:00
test.py Enhance service restart in functional env 2020-03-13 18:03:04 +01:00
utils.py Harden placement init under wsgi 2018-11-12 11:30:32 +00:00
version.py
weights.py
wsgi.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00