Improve hspace shrinking strategy
Improve hspace shrinking strategy

In tired allocation, hspace shrinks that resource of the instance
next, that causes failure on most nodes. While, this is not a bad
strategy in general, it can lead hspace into a dead end if for a large
number of nodes a particular resource blocks any further allocation of
policy compliant instances. So we improve the heuristics in that it
chooses to shrink such a resource next where by shrinking only this
resource a valid allocation can be made, if such a resource
exists. This improves the results in some cases, while still keeping
the computational complexity of the algorithm low.

Signed-off-by: Klaus Aehlig <4ce51de36d9068cd7db2eec1151e0f3f95419008@google.com>
Reviewed-by: Michele Tartara <05f7077a2c6cbbdc4af4ba42e3ef89a0df846179@google.com>

apyrgio/snf-ganeti,ganeti-github-testing/ganeti-test-1,leshchevds/ganeti,onponomarev/ganeti,andir/ganeti,mbakke/ganeti,onponomarev/ganeti,bitemyapp/ganeti,apyrgio/ganeti,mbakke/ganeti,ganeti/ganeti,mbakke/ganeti,andir/ganeti,apyrgio/snf-ganeti,leshchevds/ganeti,grnet/snf-ganeti,dimara/ganeti,ganeti/ganeti,ganeti-github-testing/ganeti-test-1,andir/ganeti,yiannist/ganeti,yiannist/ganeti,yiannist/ganeti,ganeti/ganeti,bitemyapp/ganeti,apyrgio/ganeti,dimara/ganeti,grnet/snf-ganeti,leshchevds/ganeti