Revision 8a8ed513 htools/Ganeti/HTools/Cluster.hs

b/htools/Ganeti/HTools/Cluster.hs
1225 1225
      ReplaceSecondary _ -> (printf "r:%s" d, [rep d])
1226 1226
      ReplaceAndFailover _ -> (printf "r:%s f" c, [rep c, mig])
1227 1227
      ReplacePrimary _ -> (printf "f r:%s f" c, [mig, rep c, mig])
1228
    where morf = if Instance.running i then "migrate" else "failover"
1228
    where morf = if Instance.instanceRunning i then "migrate" else "failover"
1229 1229
          mig = printf "%s -f %s" morf inam::String
1230 1230
          rep n = printf "replace-disks -n %s %s" n inam
1231 1231

  
......
1325 1325
printInsts :: Node.List -> Instance.List -> String
1326 1326
printInsts nl il =
1327 1327
    let sil = sortBy (comparing Instance.idx) (Container.elems il)
1328
        helper inst = [ if Instance.running inst then "R" else " "
1328
        helper inst = [ if Instance.instanceRunning inst then "R" else " "
1329 1329
                      , Instance.name inst
1330 1330
                      , Container.nameOf nl (Instance.pNode inst)
1331 1331
                      , let sdx = Instance.sNode inst

Also available in: Unified diff