Revision 9ef605a6 htools/hspace.hs
b/htools/hspace.hs | ||
---|---|---|
52 | 52 |
options = |
53 | 53 |
[ oPrintNodes |
54 | 54 |
, oDataFile |
55 |
, oDiskTemplate |
|
55 | 56 |
, oNodeSim |
56 | 57 |
, oRapiMaster |
57 | 58 |
, oLuxiSocket |
... | ... | |
61 | 62 |
, oIMem |
62 | 63 |
, oIDisk |
63 | 64 |
, oIVcpus |
64 |
, oINodes |
|
65 | 65 |
, oMaxCpu |
66 | 66 |
, oMinDisk |
67 | 67 |
, oTieredSpec |
... | ... | |
217 | 217 |
let verbose = optVerbose opts |
218 | 218 |
ispec = optISpec opts |
219 | 219 |
shownodes = optShowNodes opts |
220 |
disk_template = optDiskTemplate opts |
|
221 |
req_nodes = Instance.requiredNodes disk_template |
|
220 | 222 |
|
221 | 223 |
(ClusterData gl fixed_nl il ctags) <- loadExternalData opts |
222 | 224 |
|
223 | 225 |
printKeys $ map (\(a, fn) -> ("SPEC_" ++ a, fn ispec)) specData |
224 |
printKeys [ ("SPEC_RQN", printf "%d" (optINodes opts)) ]
|
|
226 |
printKeys [ ("SPEC_RQN", printf "%d" req_nodes) ]
|
|
225 | 227 |
|
226 | 228 |
let num_instances = length $ Container.elems il |
227 | 229 |
|
... | ... | |
234 | 236 |
Node.name n `elem` offline_names || |
235 | 237 |
Node.alias n `elem` offline_names) |
236 | 238 |
all_nodes |
237 |
req_nodes = optINodes opts |
|
238 | 239 |
m_cpu = optMcpu opts |
239 | 240 |
m_dsk = optMdsk opts |
240 | 241 |
|
... | ... | |
280 | 281 |
|
281 | 282 |
-- utility functions |
282 | 283 |
let iofspec spx = Instance.create "new" (rspecMem spx) (rspecDsk spx) |
283 |
(rspecCpu spx) "running" [] True (-1) (-1) DTDrbd8
|
|
284 |
(rspecCpu spx) "running" [] True (-1) (-1) disk_template
|
|
284 | 285 |
exitifbad val = (case val of |
285 | 286 |
Bad s -> do |
286 | 287 |
hPrintf stderr "Failure: %s\n" s :: IO () |
Also available in: Unified diff