We multiple-create 3 instances, but the host resource is only enough for 1 instance,
nova-scheduler consume the resource of selected host for the first instance in select_destinations.
After the multiple creating fails, we try to boot 1 instance with same flavor, the host have
enough resource to boot it, but nova-scheduler raise 'No Valid Host'. And more worse is that
host resource tracker only update compute node into DB when the host resource have changed,so ComputeNode's update time in DB will be less than the update time in scheduler cache,the scheduler cache can't be updated. In this case, the host will not be selected forever.
We need to release the host resource when multiple creating instance is failed.
Fix proposed to branch: master /review. openstack. org/147048
Review: https:/