Commit d8e9131b authored by Michele Tartara's avatar Michele Tartara
Browse files

Add function to fetch the list of master candidates

This commits adds to the Haskell codebase a function to fetch the list of
IPs of the master candidates from the SSConf database.
Signed-off-by: default avatarMichele Tartara <>
Reviewed-by: default avatarIustin Pop <>
parent 1a0defea
......@@ -30,6 +30,7 @@ module Ganeti.Ssconf
, sSKeyToRaw
, sSKeyFromRaw
, getPrimaryIPFamily
, getMasterCandidatesIps
, keyToFilename
, sSFilePrefix
) where
......@@ -127,3 +128,9 @@ getPrimaryIPFamily optpath = do
result <- readSSConfFile optpath (Just (show C.ip4Family)) SSPrimaryIpFamily
return (liftM rStripSpace result >>=
tryRead "Parsing af_family" >>= parseIPFamily)
-- | Read the list of IP addresses of the master candidates of the cluster.
getMasterCandidatesIps :: Maybe FilePath -> IO (Result [String])
getMasterCandidatesIps optPath = do
result <- readSSConfFile optPath Nothing SSMasterCandidatesIps
return $ liftM lines result
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment