Looking at the code in 16.1.1 I can't really see how this is happening because the related methods ensure the resource provider exists in placement first, and then put that into the self._resource_providers cache which is what this code is using when it fails.
If you can attach your full nova-compute log when this fails that would help us debug this.
Bug 1765568 is related to this. We started seeing something similar in Ocata CI once this merged:
https:/ /review. openstack. org/#/c/ 525309/
So we had to revert it here:
https:/ /review. openstack. org/#/c/ 562739/
That likely means https:/ /review. openstack. org/#/c/ 524618/ could have caused some regression in stable/pike, and https:/ /review. openstack. org/#/c/ 524618/ was released in 16.1.1 which is the version you're reporting this against.
Looking at the code in 16.1.1 I can't really see how this is happening because the related methods ensure the resource provider exists in placement first, and then put that into the self._resource_ providers cache which is what this code is using when it fails.
If you can attach your full nova-compute log when this fails that would help us debug this.