[Pkg-ganeti-devel] [ganeti] 133/165: Staying is not an option in evacuation
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Tue Aug 11 13:53:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch master
in repository ganeti.
commit 57a507c757f53ae47eb6cd5eb51aee67a051fafe
Author: Klaus Aehlig <aehlig at google.com>
Date: Wed Jun 17 12:20:29 2015 +0200
Staying is not an option in evacuation
When checking whether a node can be evacuated, do not
consider the node itself as an escape location.
Signed-off-by: Klaus Aehlig <aehlig at google.com>
Reviewed-by: Petr Pudlak <pudlak at google.com>
---
src/Ganeti/HTools/GlobalN1.hs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/Ganeti/HTools/GlobalN1.hs b/src/Ganeti/HTools/GlobalN1.hs
index d60479c..ced324e 100644
--- a/src/Ganeti/HTools/GlobalN1.hs
+++ b/src/Ganeti/HTools/GlobalN1.hs
@@ -37,7 +37,6 @@ module Ganeti.HTools.GlobalN1
) where
import Control.Monad (foldM)
-import qualified Data.IntMap as IntMap
import Data.List (partition)
import Ganeti.BasicTypes (isOk, Result)
@@ -78,8 +77,6 @@ canEvacuateNode (nl, il) n = isOk $ do
(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
+ let escapenodes = filter (/= Node.idx n) $ Container.keys nl'
+ _ <- foldM (evac (Node.group n) escapenodes) (nl',il') sharedIdxs
return ()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git
More information about the Pkg-ganeti-devel
mailing list