Commit 579f4ee5 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Verify the node count just if the allocation was successful


Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent ada0e680
......@@ -195,7 +195,7 @@ class IAReqInstanceAlloc(IARequestBase):
"""
IARequestBase.ValidateResult(self, ia, result)
if len(result) != self.RequiredNodes():
if ia.success and len(result) != self.RequiredNodes():
raise errors.ResultValidationError("iallocator returned invalid number"
" of nodes (%s), required %s" %
(len(result), self.RequiredNodes()))
......
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