Commit df28c49b authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

LUInstanceCreate: Include group name in error message

“” contains the UUID, which isn't very user-friendly.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarBernardo Dal Seno <>
parent e80aeb89
......@@ -10007,10 +10007,9 @@ class LUInstanceCreate(LogicalUnit):
ipolicy = ganeti.masterd.instance.CalculateGroupIPolicy(cluster, group_info)
res = _ComputeIPolicyInstanceSpecViolation(ipolicy, ispec)
if not self.op.ignore_ipolicy and res:
raise errors.OpPrereqError(("Instance allocation to group %s violates"
" policy: %s") % (,
msg = ("Instance allocation to group %s (%s) violates policy: %s" %
(,, utils.CommaJoin(res)))
raise errors.OpPrereqError(msg, errors.ECODE_INVAL)
if not self.adopt_disks:
if self.op.disk_template == constants.DT_RBD:
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