Revision 3173c987

b/Ganeti/HTools/Cluster.hs
74 74
type Score = Double
75 75

  
76 76
-- | The description of an instance placement.
77
type Placement = (Idx, Ndx, Ndx, Score)
77
type Placement = ( Idx   -- ^ The index of the instance being moved
78
                 , Ndx   -- ^ New primary node
79
                 , Ndx   -- ^ New secondary node
80
                 , IMove -- ^ The move being performed
81
                 , Score -- ^ The score of the cluster after this move
82
                 )
78 83

  
79 84
-- | Allocation\/relocation solution.
80 85
type AllocSolution = ([FailMode], Int, Maybe (Score, AllocElement))
......
375 380
    in
376 381
      case tmp_resu of
377 382
        OpFail _ -> cur_tbl
378
        OpGood (upd_nl, new_inst, pri_idx, sec_idx)  ->
383
        OpGood (upd_nl, new_inst, pri_idx, sec_idx) ->
379 384
            let tgt_idx = Instance.idx target
380 385
                upd_cvar = compCV upd_nl
381 386
                upd_il = Container.add tgt_idx new_inst ini_il
382
                upd_plc = (tgt_idx, pri_idx, sec_idx, upd_cvar):ini_plc
387
                upd_plc = (tgt_idx, pri_idx, sec_idx, move, upd_cvar):ini_plc
383 388
                upd_tbl = Table upd_nl upd_il upd_cvar upd_plc
384 389
            in
385 390
              compareTables cur_tbl upd_tbl
......
604 609
printSolutionLine nl il nmlen imlen plc pos =
605 610
    let
606 611
        pmlen = (2*nmlen + 1)
607
        (i, p, s, c) = plc
612
        (i, p, s, _, c) = plc
608 613
        inst = Container.find i il
609 614
        inam = Instance.name inst
610 615
        npri = Container.nameOf nl p
......
623 628
-- | Return the instance and involved nodes in an instance move.
624 629
involvedNodes :: Instance.List -> Placement -> [Ndx]
625 630
involvedNodes il plc =
626
    let (i, np, ns, _) = plc
631
    let (i, np, ns, _, _) = plc
627 632
        inst = Container.find i il
628 633
        op = Instance.pnode inst
629 634
        os = Instance.snode inst

Also available in: Unified diff