"It seems that this error happens if the compute starts before the control node is ready."
Does that include the placement service in the control node? If placement isn't running when nova-compute starts, nova-compute won't be able to create the compute node resource provider in the placement service and that seems to be what is failing.
To be clear, when you say,
"It seems that this error happens if the compute starts before the control node is ready."
Does that include the placement service in the control node? If placement isn't running when nova-compute starts, nova-compute won't be able to create the compute node resource provider in the placement service and that seems to be what is failing.