diff --git a/htools/Ganeti/HTools/Loader.hs b/htools/Ganeti/HTools/Loader.hs index 186c1338395d4f48f421e31be5e183193a077482..b53d79ced16e73912f5c98046f4ddf8b952c7b14 100644 --- a/htools/Ganeti/HTools/Loader.hs +++ b/htools/Ganeti/HTools/Loader.hs @@ -34,6 +34,7 @@ module Ganeti.HTools.Loader , lookupInstance , lookupGroup , commonSuffix + , RelocMode(..) , RqType(..) , Request(..) , ClusterData(..) @@ -59,6 +60,12 @@ exTagsPrefix = "htools:iextags:" -- * Types +-- | The iallocator multi-evac group mode type. +data RelocMode = KeepGroup + | ChangeGroup [Gdx] + | AnyGroup + deriving (Show, Read) + {-| The iallocator request type. This type denotes what request we got from Ganeti and also holds @@ -70,6 +77,7 @@ data RqType | Relocate Idx Int [Ndx] -- ^ Move an instance to a new -- secondary node | Evacuate [Ndx] -- ^ Evacuate nodes + | MultiReloc [Idx] RelocMode -- ^ Multi-relocate mode deriving (Show, Read) -- | A complete request, as received from Ganeti. diff --git a/htools/hail.hs b/htools/hail.hs index 1831837c6eff0114bee91c93b4de49e87f6ff8e8..646cdcf26db60ed2bfdc0b1486c6492e618c89eb 100644 --- a/htools/hail.hs +++ b/htools/hail.hs @@ -74,6 +74,7 @@ processRequest request = Relocate idx reqn exnodes -> Cluster.tryMGReloc gl nl il idx reqn exnodes Evacuate exnodes -> Cluster.tryMGEvac gl nl il exnodes + MultiReloc _ _ -> fail "multi-reloc not handled" -- | Reads the request from the data file(s) readRequest :: Options -> [String] -> IO Request