I'm not totally sure how this happens if the --force option isn't specified with the nova evacuate command, because of this code in the API:
https://github.com/openstack/nova/blob/8d492c76d53f3fcfacdd945a277446bdfe6797b0/nova/compute/api.py#L4115
So if a host is specified by force is not, then the API sets a requested destination to that host for the scheduler and nulls out the host value, which is checked in conductor here:
https://github.com/openstack/nova/blob/8d492c76d53f3fcfacdd945a277446bdfe6797b0/nova/conductor/manager.py#L743
Which would call the scheduler to pick a host and set the node variable here:
https://github.com/openstack/nova/blob/8d492c76d53f3fcfacdd945a277446bdfe6797b0/nova/conductor/manager.py#L770
Which gets passed to the compute as the scheduled_node variable which is used to determine if we should do a claim or not.
I'm not totally sure how this happens if the --force option isn't specified with the nova evacuate command, because of this code in the API:
https:/ /github. com/openstack/ nova/blob/ 8d492c76d53f3fc facdd945a277446 bdfe6797b0/ nova/compute/ api.py# L4115
So if a host is specified by force is not, then the API sets a requested destination to that host for the scheduler and nulls out the host value, which is checked in conductor here:
https:/ /github. com/openstack/ nova/blob/ 8d492c76d53f3fc facdd945a277446 bdfe6797b0/ nova/conductor/ manager. py#L743
Which would call the scheduler to pick a host and set the node variable here:
https:/ /github. com/openstack/ nova/blob/ 8d492c76d53f3fc facdd945a277446 bdfe6797b0/ nova/conductor/ manager. py#L770
Which gets passed to the compute as the scheduled_node variable which is used to determine if we should do a claim or not.