Commit 7803d4d3 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix a wrong comparison in _RecursiveAssembleBD

We want to prevent sending too many 'None' children to a device.
However, the test as it is today is wrong, as we want to test the
situation after adding a new child, and not before. This patch fixes
this by testing greater-or-equal instead of just greater.

Reviewed-by: imsnah
parent 7e3dbb94
......@@ -730,7 +730,7 @@ def _RecursiveAssembleBD(disk, owner, as_primary):
cdev = _RecursiveAssembleBD(chld_disk, owner, as_primary)
except errors.BlockDeviceError, err:
if children.count(None) > mcn:
if children.count(None) >= mcn:
cdev = None
logger.Debug("Error in child activation: %s" % str(err))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment