Commit 93ac2fea authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos Committed by Michael Hanselmann
Browse files

Fix disk count check in LUSetInstanceParams



LUSetInstanceParams checked instance.nics (and not instance.disks)
against constants.MAX_DISKS.
Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 913639fe
......@@ -9253,7 +9253,7 @@ class LUInstanceSetParams(LogicalUnit):
_CheckInstanceDown(self, instance, "cannot remove disks")
if (disk_op == constants.DDM_ADD and
len(instance.nics) >= constants.MAX_DISKS):
len(instance.disks) >= constants.MAX_DISKS):
raise errors.OpPrereqError("Instance has too many disks (%d), cannot"
" add more" % constants.MAX_DISKS,
errors.ECODE_STATE)
......
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