LGTM, thanks On Mon, 27 Apr 2015 at 13:01 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote:
> As described in our design, we keep iterated allocation as is for > DRBD instances; there redundancy is a local property, affecting > only neighbor nodes. Also, we keep the semantics of "accept existing" > and "independent groups". For shared-storage instances, however, we > take N+1 redundancy into account as we do for normal allocation. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > src/Ganeti/HTools/Cluster.hs | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/Ganeti/HTools/Cluster.hs b/src/Ganeti/HTools/Cluster.hs > index c41ad41..7f024b2 100644 > --- a/src/Ganeti/HTools/Cluster.hs > +++ b/src/Ganeti/HTools/Cluster.hs > @@ -793,7 +793,10 @@ iterateAlloc opts nl il limit newinst allocnodes ixes > cstats = > newidx = Container.size il > newi2 = Instance.setIdx (Instance.setName newinst newname) newidx > newlimit = fmap (flip (-) 1) limit > - in case tryAlloc ( opts { algCapacity = False } ) nl il newi2 > allocnodes of > + opts' = if Instance.diskTemplate newi2 == DTDrbd8 > + then opts { algCapacity = False } > + else opts > + in case tryAlloc opts' nl il newi2 allocnodes of > Bad s -> Bad s > Ok (AllocSolution { asFailures = errs, asSolution = sols3 }) -> > let newsol = Ok (collapseFailures errs, nl, il, ixes, cstats) in > -- > 2.2.0.rc0.207.ga3a616c > >
