Fix iallocator name
authorRené Nussbaumer <rn@google.com>
Thu, 25 Sep 2008 09:40:13 +0000 (09:40 +0000)
committerRené Nussbaumer <rn@google.com>
Thu, 25 Sep 2008 09:40:13 +0000 (09:40 +0000)
port forward of patch from revision 1690 with following message:

Patch on revision 1686 used the wrong field: ial.name, which is the instance
name and not the iallocator name. self.op.iallocator is the right field.

Sorry for this inconvenience.

Reviewed-by: imsnah

lib/cmdlib.py

index de74867..378aab5 100644 (file)
@@ -3257,7 +3257,8 @@ class LUCreateInstance(LogicalUnit):
     if len(ial.nodes) != ial.required_nodes:
       raise errors.OpPrereqError("iallocator '%s' returned invalid number"
                                  " of nodes (%s), required %s" %
-                                 (ial.name, len(ial.nodes), ial.required_nodes))
+                                 (self.op.iallocator, len(ial.nodes), 
+                                  ial.required_nodes))
     self.op.pnode = ial.nodes[0]
     logger.ToStdout("Selected nodes for the instance: %s" %
                     (", ".join(ial.nodes),))