Both the simulate and the tiered allocation mode take a machine spec on
input via a comma-separated list. This patch makes this a little bit
more consistent (always use disk,ram,cpu in this order).
oNodeSim :: OptType
oNodeSim = Option "" ["simulate"]
(ReqArg (\ f o -> Ok o { optNodeSim = Just f }) "SPEC")
oNodeSim :: OptType
oNodeSim = Option "" ["simulate"]
(ReqArg (\ f o -> Ok o { optNodeSim = Just f }) "SPEC")
- "simulate an empty cluster, given as 'num_nodes,disk,memory,cpus'"
+ "simulate an empty cluster, given as 'num_nodes,disk,ram,cpu'"
oRapiMaster :: OptType
oRapiMaster = Option "m" ["master"]
oRapiMaster :: OptType
oRapiMaster = Option "m" ["master"]
prs <- mapM (tryRead "tiered specs") sp
tspec <-
case prs of
prs <- mapM (tryRead "tiered specs") sp
tspec <-
case prs of
- [cpu, ram, dsk] -> return $ RSpec cpu ram dsk
+ [dsk, ram, cpu] -> return $ RSpec cpu ram dsk
_ -> Bad $ "Invalid specification: " ++ inp
return $ opts { optTieredSpec = Just tspec } )
"TSPEC")
_ -> Bad $ "Invalid specification: " ++ inp
return $ opts { optTieredSpec = Just tspec } )
"TSPEC")
- "enable tiered specs allocation, where we decrease the instance\
- \ spec on failure to allocate and restart the allocation process"
+ "enable tiered specs allocation, given as 'disk,ram,cpu'"
oShowVer :: OptType
oShowVer = Option "V" ["version"]
oShowVer :: OptType
oShowVer = Option "V" ["version"]
parseDesc :: String -> Result (Int, Int, Int, Int)
parseDesc desc =
case sepSplit ',' desc of
parseDesc :: String -> Result (Int, Int, Int, Int)
parseDesc desc =
case sepSplit ',' desc of
ncount <- tryRead "node count" n
disk <- tryRead "disk size" d
mem <- tryRead "memory size" m
ncount <- tryRead "node count" n
disk <- tryRead "disk size" d
mem <- tryRead "memory size" m