On Wed, Jul 13, 2011 at 04:17:59PM +0100, Guido Trotter wrote:
> On Fri, Jul 08, 2011 at 04:21:47PM +0200, Iustin Pop wrote:
> 
> Hi,
> 
> > ---
> >  htools/Ganeti/HTools/Cluster.hs |   11 ++++++++++-
> >  1 files changed, 10 insertions(+), 1 deletions(-)
> > 
> > diff --git a/htools/Ganeti/HTools/Cluster.hs 
> > b/htools/Ganeti/HTools/Cluster.hs
> > index db9e71d..6822a4f 100644
> > --- a/htools/Ganeti/HTools/Cluster.hs
> > +++ b/htools/Ganeti/HTools/Cluster.hs
> > @@ -905,10 +905,19 @@ nodeEvacInstance _ _ mode _ _ (Instance.Instance
> >                    fail "Shared file relocations not implemented yet"
> >  
> >  nodeEvacInstance _ _ mode _ _ (Instance.Instance
> > -                            {Instance.diskTemplate = dt@DTBlock}) =
> > +                               {Instance.diskTemplate = dt@DTBlock}) =
> 
> This is an alignment fix for something you introduced in the previous patch.
> Can you please move it there?

Yep.

> >                    failOnSecondaryChange mode dt >>
> >                    fail "Block device relocations not implemented yet"
> >  
> 
> Would it make sense to add it and use it in the same patch, since using it
> should be almost a one-liner here?

Sorry, I'm lost now. What to add? The above or the below?

> > +nodeEvacInstance nl il ChangePrimary _ _
> > +                 inst@(Instance.Instance {Instance.diskTemplate = 
> > DTDrbd8}) =
> > +  do
> > +    (nl', inst', _, _) <- opToResult $ applyMove nl inst Failover
> > +    let idx = Instance.idx inst
> > +        il' = Container.add idx inst' il
> > +        ops = iMoveToJob nl' il' idx Failover
> > +    return (nl', il', ops)
> > +
> 
> rest LGTM
> 
> Thanks,
> 
> Guido
> 

Reply via email to