The related issue is that the scheduler was not filtering out deleted compute node records when pulling them from the cell DB:
https://github.com/openstack/nova/blob/d87852ae6a1987b6faa3cb5851f9758b47ef4636/nova/objects/compute_node.py#L443
Because ^ that query doesn't filter out deleted records. Granted, if the resource provider record in placement was cleaned up properly, we wouldn't have gotten that far anyway, but it's still an issue.
The related issue is that the scheduler was not filtering out deleted compute node records when pulling them from the cell DB:
https:/ /github. com/openstack/ nova/blob/ d87852ae6a1987b 6faa3cb5851f975 8b47ef4636/ nova/objects/ compute_ node.py# L443
Because ^ that query doesn't filter out deleted records. Granted, if the resource provider record in placement was cleaned up properly, we wouldn't have gotten that far anyway, but it's still an issue.