>     Conflicts:
>       NEWS: take all additions
>       configure.ac: ignore suffix bump
>       src/Ganeti/HTools/GlobalN1.hs: trivial

Grr... and in the trivial part I forgot the remove an unused import.

Here is the merge I want to push


commit 35659d18adbec3667d707492b336e3a7995f37af
Merge: 29db783 080ebc7
Author: Klaus Aehlig <[email protected]>
Date:   Wed Jun 17 16:55:11 2015 +0200

    Merge branch 'stable-2.15' into master
    
    * stable-2.15
      Restrict evacuation to a group
      Staying is not an option in evacuation
      Set release date of 2.15.0 rc1 to tomorrow
      Bump revision number to 2.15.0 rc1
      Adapt NEWS file for 2.15.0 rc1
      Set up Transport properly when communicating with metad
      Allow the Transport class to be used for non-master nodes
    
    * stable-2.14
      Make htools tolerate missing "dtotal" and "dfree" on luxi
    
    * stable-2.13
      Mention migration change in NEWS
      Move misplaced NEWS entry
      Add protection against daemons that may already be listening
      Attempt to cleanup failed migrations using a pidfile
      Add utility that gets the full command line of a process
      Introduce socat as a way of doing xl migrations
      fix typo in UPGRADE notes
      During start, only update job file locally
    
    * stable-2.12
      Fix tests for setting (shared) file storage directory
      Add missing call for setting shared file storage directory
      Update ganeti-luxid synopsis
      Update ganeti-mond synopsis
      Update ganeti-confd synopsis
      Update copyright statement
    
    Conflicts:
        NEWS: take all additions
        configure.ac: ignore suffix bump
        src/Ganeti/HTools/GlobalN1.hs: trivial
    
    Signed-off-by: Klaus Aehlig <[email protected]>

diff --cc NEWS
index 12cf2d7,83f20a3..b16e375
--- a/NEWS
+++ b/NEWS
@@@ -2,28 -2,19 +2,41 @@@ New
  ====
  
  
 +Version 2.16.0
 +--------------
 +
 +*(unreleased)*
 +
 +Incompatible/important changes
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +- The IAllocator protocol has been extended by a new ``allocate-secondary``
 +  request type. Currently, this new request type is only used when in disk
 +  conversion to DRBD no secondary node is specified. As long as this new
 +  feature is not used, a third-party IAllocator not aware of this extension 
can
 +  be continued to be used.
 +
 +New dependencies
 +~~~~~~~~~~~~~~~~
 +
 +- Using the metadata daemon now requires the presence of the 'setcap' utility.
 +  On Debian-based systems, it is available as a part of the 'libcap2-bin'
 +  package.
 +
 +
+ Version 2.15.0 rc1
+ ------------------
+ 
+ *(Released Wed, 17 Jun 2015)*
+ 
+ Known issues:
+ ~~~~~~~~~~~~~
+ 
+ - Issue 1094: differences in encodings in SSL certificates due to
+   different OpenSSL versions can result in rendering a cluster
+   uncommunicative after a master-failover.
+ 
+ 
  Version 2.15.0 beta1
  --------------------
  
diff --cc src/Ganeti/HTools/GlobalN1.hs
index bde0c03,581d22d..051f918
--- a/src/Ganeti/HTools/GlobalN1.hs
+++ b/src/Ganeti/HTools/GlobalN1.hs
@@@ -34,12 -34,9 +34,11 @@@ SOFTWARE, EVEN IF ADVISED OF THE POSSIB
  
  module Ganeti.HTools.GlobalN1
    ( canEvacuateNode
 +  , allocGlobalN1
    ) where
  
- import Control.Monad (foldM)
- import qualified Data.IntMap as IntMap
+ import Control.Monad (foldM, foldM_)
 +import qualified Data.Foldable as Foldable
  import Data.List (partition)
  
  import Ganeti.BasicTypes (isOk, Result)
@@@ -81,18 -77,9 +80,19 @@@ canEvacuateNode (nl, il) n = isOk $ d
    (nl', il') <- opToResult
                  . foldM move (nl, il) $ map (flip (,) Failover) drbdIdxs
    -- evacuate other instances
-   let n' = Node.setOffline n True
-       nl'' = Container.add (Node.idx n') n' nl'
-   _ <- foldM (evac (Node.group n') . map Node.idx $ IntMap.elems nl'')
-              (nl'',il') sharedIdxs
-   return ()
+   let grp = Node.group n
+       escapenodes = filter (/= Node.idx n)
+                     . map Node.idx
+                     . filter ((== grp) . Node.group)
+                     $ Container.elems nl'
+   foldM_ (evac grp escapenodes) (nl',il') sharedIdxs
 +
 +-- | Predicate on wheter an allocation element leads to a globally N+1 
redundant
 +-- state.
 +allocGlobalN1 :: Node.List -- ^ the original list of nodes
 +              -> Instance.List -- ^ the original list of instances
 +              -> AllocSol.GenericAllocElement a -> Bool
 +allocGlobalN1 nl il alloc =
 +  let il' = AllocSol.updateIl il $ Just alloc
 +      nl' = AllocSol.extractNl nl il $ Just alloc
 +  in Foldable.all (canEvacuateNode (nl', il')) nl'

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to