when we remove the pci device that is used from host, the cyborg-agent will raise 'resource provider in use ' exception.
2023-04-24 14:50:08.267 1 ERROR oslo_service.periodic_task [None req-3493a3b4-7275-46cb-8767-253b414eac60 - - - - -] Error during AgentManager.update_available_resource: cyborg.common.exception_Remote.ResourceProviderInUse_Remote: An unknown exception occurred.
Traceback (most recent call last):
File "/var/lib/kolla/venv/lib/python3.6/site-packages/oslo_messaging/rpc/server.py", line 163, in _process_incoming
res = self.dispatcher.dispatch(message)
File "/var/lib/kolla/venv/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 265, in dispatch
return self._do_dispatch(endpoint, method, ctxt, args)
File "/var/lib/kolla/venv/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 194, in _do_dispatch
result = func(ctxt, **new_args)
File "/var/lib/kolla/venv/lib/python3.6/site-packages/cyborg/conductor/manager.py", line 86, in report_data
old_driver_device_list, driver_device_list)
File "/var/lib/kolla/venv/lib/python3.6/site-packages/cyborg/conductor/manager.py", line 112, in drv_device_make_diff
self._delete_provider_and_sub_providers(context, rp_uuid)
File "/var/lib/kolla/venv/lib/python3.6/site-packages/cyborg/conductor/manager.py", line 388, in _delete_provider_and_sub_providers
self.placement_client.delete_provider(rp["uuid"])
File "/var/lib/kolla/venv/lib/python3.6/site-packages/cyborg/common/placement_client.py", line 313, in delete_provider
raise exception.ResourceProviderInUse()
cyborg.common.exception.ResourceProviderInUse: An unknown exception occurred.
I am not sure I understand this bug correctly. Are we removing the pci device from cyborg.conf or trying to delete the pci device from device profile?
I am tried to create a reproducer by removing the pci device from the config. Below is the error devstack: /opt/stack/ cyborg$ openstack accelerator device attribute list ------- ------- ------- ------- ----+-- ------- ------+ ------- -+----- ------- ------- ------- --+ ------- ------- ------- ------- ----+-- ------- ------+ ------- -+----- ------- ------- ------- --+ 0aaf-4681- 880d-a01a6f001c 30 | 2 | rc | CUSTOM_PCI | b042-4995- 8aa9-8a92fd9782 a3 | 2 | trait0 | CUSTOM_ PCI_PRODUCT_ ID_0010 | ------- ------- ------- ------- ----+-- ------- ------+ ------- -+----- ------- ------- ------- --+ devstack: /opt/stack/ cyborg$ openstack accelerator device list ------- ------- ------- ------- ----+-- ----+-- ------+ ------- ------- ---+--- ------- ------- ------- ------- ------- ------+ ------- ------- ------- ------- ----+-- ----+-- ------+ ------- ------- ---+--- ------- ------- ------- ------- ------- ------+ e130-45f0- bdd5-278776173f 12 | GPU | 1b36 | cyborg-devstack | {"product_id": "0010", "controller": null} | ------- ------- ------- ------- ----+-- ----+-- ------+ ------- ------- ---+--- ------- ------- ------- ------- ------- ------+ devstack: /opt/stack/ cyborg$ openstack accelerator device profile create bug2017513 '[{"resources: CUSTOM_ PCI": "1", "trait: CUSTOM_ PCI_PRODUCT_ ID_0010" : "required"}]' ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -----+ ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -----+ a7f9-419d- 939e-143eef0e04 cd | CUSTOM_ PCI': '1', 'trait: CUSTOM_ PCI_PRODUCT_ ID_0010' : 'required'}] | ------- +------ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -----+ devstack: /opt/stack/ cyborg$ openstack accelerator device profile list ------- ------- ------- ------- ----+-- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+----- ------- -+ ------- ------- ------- ------- ----+-- ------- ---...
(venv) stack@cyborg-
+------
| uuid | deployable_id | key | value |
+------
| 3ebba534-
| c54284b2-
+------
(venv) stack@cyborg-
+------
| uuid | type | vendor | hostname | std_board_info |
+------
| c81426fe-
+------
(venv) stack@cyborg-
+------
| Field | Value |
+------
| created_at | 2026-05-06 05:26:51+00:00 |
| updated_at | None |
| uuid | 32a5bf34-
| name | bug2017513 |
| groups | [{'resources:
| description | None |
+------
(venv) stack@cyborg-
+------
| uuid | name | groups | description |
+------