« Previous | Next » 

Revision 14b5d45f

Child 99c7795a

Added by Iustin Pop about 11 years ago

Fix bug in non-mirrored instance allocation

The function `allocateOnSingle' has a bug in the calculation of the
cluster score used for deciding which of the many target nodes to use
in placing the instance: it uses the original node list for the score

Due to this, since the original node list is the same for all target
nodes, it means that basically `allocateOnSingle' returns the same
score, no matter the target node, and hence the choosing of the node
is arbitrary, instead of being done on the basis of the algorithm.

This has gone uncaught until reported because the unittests only test
1 allocation at a time on an empty cluster, and do not check the
consistency of the score. I'll send separate patches on the master
branch for adding more checks to prevent this in the future.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences