Revision 3603605a htools/Ganeti/HTools/Program/Hspace.hs
b/htools/Ganeti/HTools/Program/Hspace.hs | ||
---|---|---|
268 | 268 |
printAllocationMap verbose msg nl ixes = |
269 | 269 |
when (verbose > 1) $ do |
270 | 270 |
hPutStrLn stderr (msg ++ " map") |
271 |
hPutStr stderr . unlines . map ((:) ' ' . intercalate " ") $
|
|
271 |
hPutStr stderr . unlines . map ((:) ' ' . unwords) $
|
|
272 | 272 |
formatTable (map (printInstance nl) (reverse ixes)) |
273 | 273 |
-- This is the numberic-or-not field |
274 | 274 |
-- specification; the first three fields are |
... | ... | |
315 | 315 |
-> Node.List -> Node.List -> [(FailMode, Int)] -> IO () |
316 | 316 |
printTiered True spec_map m_cpu nl trl_nl _ = do |
317 | 317 |
printKeys $ printStats PTiered (Cluster.totalResources trl_nl) |
318 |
printKeys [("TSPEC", intercalate " " (formatSpecMap spec_map))]
|
|
318 |
printKeys [("TSPEC", unwords (formatSpecMap spec_map))]
|
|
319 | 319 |
printAllocationStats m_cpu nl trl_nl |
320 | 320 |
|
321 | 321 |
printTiered False spec_map _ ini_nl fin_nl sreason = do |
... | ... | |
433 | 433 |
|
434 | 434 |
-- Run the tiered allocation, if enabled |
435 | 435 |
|
436 |
(case optTieredSpec opts of
|
|
437 |
Nothing -> return ()
|
|
438 |
Just tspec -> do
|
|
439 |
(treason, trl_nl, _, spec_map) <- |
|
436 |
case optTieredSpec opts of |
|
437 |
Nothing -> return () |
|
438 |
Just tspec -> do |
|
439 |
(treason, trl_nl, _, spec_map) <-
|
|
440 | 440 |
runAllocation cdata stop_allocation |
441 |
(Cluster.tieredAlloc nl il alloclimit (iofspec tspec)
|
|
442 |
allocnodes [] []) tspec SpecTiered opts
|
|
441 |
(Cluster.tieredAlloc nl il alloclimit (iofspec tspec) |
|
442 |
allocnodes [] []) tspec SpecTiered opts |
|
443 | 443 |
|
444 |
printTiered machine_r spec_map (optMcpu opts) nl trl_nl treason |
|
445 |
) |
|
444 |
printTiered machine_r spec_map (optMcpu opts) nl trl_nl treason |
|
446 | 445 |
|
447 | 446 |
-- Run the standard (avg-mode) allocation |
448 | 447 |
|
Also available in: Unified diff