On Wed, Jul 29, 2015 at 1:21 PM, Dimitris Bliablias <[email protected]> wrote:
> As of commit 804d72eb, some modifications on the LUInstanceMultiAlloc LU > resulted in breaking the instances multi allocation functionality. > > In details, when using an iallocator for the instances allocation, the > 'jobs' list is computed for allocations using the DRBD disk template > only and not for the rest templates, due to the wrong indentation of the > relevant code line. Furthermore, for the same reason, the allocation of > more than one instances always fails since the 'missing' set is not > computed after the processing of all the allocatable instances, as it > should do, but at the end of each instance iteration. > > Signed-off-by: Dimitris Bliablias <[email protected]> > --- > lib/cmdlib/instance.py | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/lib/cmdlib/instance.py b/lib/cmdlib/instance.py > index a22043e..967db39 100644 > --- a/lib/cmdlib/instance.py > +++ b/lib/cmdlib/instance.py > @@ -2094,12 +2094,12 @@ class LUInstanceMultiAlloc(NoHooksLU): > (op.snode_uuid, op.snode) = \ > ExpandNodeUuidAndName(self.cfg, None, node_names[1]) > > - jobs.append([op]) > + jobs.append([op]) > > - missing = set(op2inst.keys()) - set(failed) > - assert not missing, \ > - "Iallocator did return incomplete result: %s" % \ > - utils.CommaJoin(missing) > + missing = set(op2inst.keys()) - set(failed) > + assert not missing, \ > + "Iallocator did return incomplete result: %s" % \ > + utils.CommaJoin(missing) > else: > jobs.extend([op] for op in self.op.instances) > > -- > 2.1.4 > > LGTM, thanks. -- Lisa Velden Software Engineer [email protected] Google Germany GmbH Dienerstraße 12 80331 München Geschäftsführer: Graham Law, Christine Elizabeth Flores Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg
