table nova.pci_devices lost device status every time. && PciDeviceList.get_by_compute_node pass a wrong parameter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Yongli He |
Bug Description
I'm trying to use SR-IOV in openstack havana.
After a pci device(virtual function in my case) is allocated to a vm, the status of according record in table 'nova.pci_devices' is updated to allocated.
However, when I restart the openstack services, the devices' records are updated to available again. Actually, the pci devices are allocated to vm.
I looked into the code and found the problem below.
In the __init__ function of PciDevTracker in pci/pci_manager.py , it requires node_id.
If a node_id is passed in, it will fetch pci devices information
from database, otherwise, it will create an empty devices list
However, the code initiating PciDevTracker (in compute/
=================
Then I try do add the node id and want to see what will happen.
Then I got this error
self.
File "/usr/lib/
context, node_id)
File "/usr/lib/
args, kwargs)
File "/usr/lib/
objver=objver, args=args, kwargs=kwargs)
File "/usr/lib/
return self._invoke(
File "/usr/lib/
return cast_or_call(ctxt, msg, **self.kwargs)
File "/usr/lib/
result = rpc.call(context, real_topic, msg, timeout)
File "/usr/lib/
return _get_impl(
File "/usr/lib/
rpc_
File "/usr/lib/
rv = multicall(conf, context, topic, msg, timeout, connection_pool)
File "/usr/lib/
pack_
File "/usr/lib/
for (key, value) in context.
AttributeError: 'module' object has no attribute 'to_dict'
It pass the module context to pci_device_
tags: | added: compute |
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → jiang, yunhong (yunhong-jiang) |
Changed in nova: | |
status: | Confirmed → In Progress |
tags: | added: pci-passthrough |
tags: | added: icehouse-backport-potential |
Changed in nova: | |
assignee: | nobody → Yongli He (yongli-he) |
tags: |
added: pci removed: pci-passthrough |
tags: | removed: icehouse-backport-potential |
https:/ /review. openstack. org/#/c/ 102298/