X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/b161386d5519fd2041fed3aaa3a50a65dd9da761..aff363a42d670f1b3100a98aab6f17b49f644179:/Ganeti/HTools/Cluster.hs diff --git a/Ganeti/HTools/Cluster.hs b/Ganeti/HTools/Cluster.hs index 2474fa4..e3753cc 100644 --- a/Ganeti/HTools/Cluster.hs +++ b/Ganeti/HTools/Cluster.hs @@ -15,6 +15,7 @@ module Ganeti.HTools.Cluster , Solution(..) , Table(..) , Removal + , Score -- * Generic functions , totalResources -- * First phase functions @@ -752,10 +753,14 @@ loadData ndata idata = let {- node file: name t_mem n_mem f_mem t_disk f_disk -} (ktn, nl) = loadTabular ndata - (\ (name:tm:nm:fm:td:fd:[]) -> + (\ (name:tm:nm:fm:td:fd:fo:[]) -> (name, - Node.create (read tm) (read nm) - (read fm) (read td) (read fd))) + if any (== "?") [tm,nm,fm,td,fd] || fo == "Y" then + Node.create 0 0 0 0 0 True + else + Node.create (read tm) (read nm) (read fm) + (read td) (read fd) False + )) Node.setIdx {- instance file: name mem disk status pnode snode -} (kti, il) = loadTabular idata