diff --git a/htools/Ganeti/HTools/Cluster.hs b/htools/Ganeti/HTools/Cluster.hs index e2ec8b8e7be13e888f2793f1db41c86fc4db6cde..92a1e629cc81154b8845a50483739b8ec0186ec3 100644 --- a/htools/Ganeti/HTools/Cluster.hs +++ b/htools/Ganeti/HTools/Cluster.hs @@ -172,6 +172,10 @@ type AllocMethod = Node.List -- ^ Node list -> [CStats] -- ^ Running cluster stats -> Result AllocResult -- ^ Allocation result +-- | A simple type for the running solution of evacuations. +type EvacInnerState = + Either String (Node.List, Instance.Instance, Score, Ndx) + -- * Utility functions -- | Verifies the N+1 status and return the affected nodes. @@ -952,15 +956,9 @@ nodeEvacInstance nl il ChangeAll evacDrbdSecondaryInner :: Node.List -- ^ Cluster node list -> Instance.Instance -- ^ Instance being evacuated -> Gdx -- ^ The group index of the instance - -> Either String ( Node.List - , Instance.Instance - , Score - , Ndx) -- ^ Current best solution + -> EvacInnerState -- ^ Current best solution -> Ndx -- ^ Node we're evaluating as new secondary - -> Either String ( Node.List - , Instance.Instance - , Score - , Ndx) -- ^ New best solution + -> EvacInnerState -- ^ New best solution evacDrbdSecondaryInner nl inst gdx accu ndx = case applyMove nl inst (ReplaceSecondary ndx) of OpFail fm ->