Revision b8a2c0ab htools/Ganeti/HTools/Program/Hspace.hs

b/htools/Ganeti/HTools/Program/Hspace.hs
65 65
    , oIVcpus
66 66
    , oMachineReadable
67 67
    , oMaxCpu
68
    , oMaxSolLength
68 69
    , oMinDisk
69 70
    , oTieredSpec
70 71
    , oSaveCluster
......
427 428

  
428 429

  
429 430
  let reqinst = iofspec ispec
431
      alloclimit = if optMaxLength opts == -1
432
                   then Nothing
433
                   else Just (optMaxLength opts)
430 434

  
431 435
  allocnodes <- exitifbad $ Cluster.genAllocNodes gl nl req_nodes True
432 436

  
......
438 442
       (treason, trl_nl, trl_il, trl_ixes, _) <-
439 443
           if stop_allocation
440 444
           then return result_noalloc
441
           else exitifbad (Cluster.tieredAlloc nl il Nothing (iofspec tspec)
445
           else exitifbad (Cluster.tieredAlloc nl il alloclimit (iofspec tspec)
442 446
                                  allocnodes [] [])
443 447
       let spec_map' = tieredSpecMap trl_ixes
444 448
           treason' = sortReasons treason
......
461 465
  (ereason, fin_nl, fin_il, ixes, _) <-
462 466
      if stop_allocation
463 467
      then return result_noalloc
464
      else exitifbad (Cluster.iterateAlloc nl il Nothing
468
      else exitifbad (Cluster.iterateAlloc nl il alloclimit
465 469
                      reqinst allocnodes [] [])
466 470

  
467 471
  let allocs = length ixes

Also available in: Unified diff