« Previous | Next » 

Revision 14b5d45f

ID14b5d45fc2612992c8f7856d89c161d1b5c3d295
Child ef86bf28

Added by Iustin Pop over 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
calculation.

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 <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences