[nova] Do we need to copy pci_devices to target cell DB during cross-cell resize?
mriedemos at gmail.com
Tue Jan 22 15:20:45 UTC 2019
While working on the code to create instance-related data in the target
cell database during a cross-cell resize I noticed I wasn't copying over
pci_devices  but when looking at the PciDevice object create/save
methods, those aren't really what I'm looking for here. And looking at
the data model, there is a compute_node_id field which is the
compute_nodes.id primary key which won't match the target cell DB.
I am not very familiar with the PCI device manager code and data model
(it's my weakest area in nova lo these many years) but looking closer at
this, am I correct in understanding that the PciDevice object and data
model is really more about the actual inventory and allocations of PCI
devices on a given compute node and therefore it doesn't really make
sense to need to copy that data over to the target cell database.
During a cross-cell resize, the scheduler is going to pick a target host
in another cell and claim standard resources (VCPU, MEMORY_MB and
DISK_GB) in placement, but things like NUMA/PCI claims won't happen
until we do a ResourceTracker.resize_claim on the target host in the
target cell. In that case, it seems the things I only need to care about
mirroring is instance.pci_requests and instance.numa_topology, correct?
Since those are the user-requested (via flavor/image/port) resources
which will then result in PciDevice and NUMA allocations on the target host.
I'm just looking for confirmation from others that better understand the
data model in this area.
More information about the openstack-discuss