_get_pci_passthrough_devices prone to race condition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Mohammed Naser |
Bug Description
At the moment, the `_get_pci_
This specific code here calls `listCaps()`, however, it is possible that the device has disappeared by the time on method has been called:
https:/
Which would result in the following traceback:
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
2022-05-06 20:16:16.110 4053032 ERROR nova.compute.
I think the cleaner way is to loop over all the items and skip a device if it raises an error that the device is not found.
Fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /840993
Review: https:/