Revision 7959cbb9 htools/Ganeti/HTools/Cluster.hs

b/htools/Ganeti/HTools/Cluster.hs
1208 1208
    ReplaceSecondary _ -> (printf "r:%s" d, [rep d])
1209 1209
    ReplaceAndFailover _ -> (printf "r:%s f" c, [rep c, mig])
1210 1210
    ReplacePrimary _ -> (printf "f r:%s f" c, [mig, rep c, mig])
1211
  where morf = if Instance.instanceRunning i then "migrate" else "failover"
1211
  where morf = if Instance.isRunning i then "migrate" else "failover"
1212 1212
        mig = printf "%s -f %s" morf inam::String
1213 1213
        rep n = printf "replace-disks -n %s %s" n inam
1214 1214

  
......
1306 1306
printInsts :: Node.List -> Instance.List -> String
1307 1307
printInsts nl il =
1308 1308
  let sil = sortBy (comparing Instance.idx) (Container.elems il)
1309
      helper inst = [ if Instance.instanceRunning inst then "R" else " "
1309
      helper inst = [ if Instance.isRunning inst then "R" else " "
1310 1310
                    , Instance.name inst
1311 1311
                    , Container.nameOf nl (Instance.pNode inst)
1312 1312
                    , let sdx = Instance.sNode inst

Also available in: Unified diff