X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/546c5100dece06b92ffa0804b6838b5125450bde..affe17928820414dcde1d745d0b0ef1902c9df20:/src/Ganeti/HTools/Backend/IAlloc.hs diff --git a/src/Ganeti/HTools/Backend/IAlloc.hs b/src/Ganeti/HTools/Backend/IAlloc.hs index dd92497..6c8c8ab 100644 --- a/src/Ganeti/HTools/Backend/IAlloc.hs +++ b/src/Ganeti/HTools/Backend/IAlloc.hs @@ -135,7 +135,7 @@ parseNode ktg n a = do gidx <- lookupGroup ktg n guuid ndparams <- extract "ndparams" >>= asJSObject excl_stor <- tryFromObj desc (fromJSObject ndparams) "exclusive_storage" - let live = not offline && not drained && vm_capable' + let live = not offline && vm_capable' lvextract def = eitherLive live def . extract sptotal <- if excl_stor then lvextract 0 "total_spindles" @@ -149,7 +149,7 @@ parseNode ktg n a = do ctotal <- lvextract 0.0 "total_cpus" cnos <- lvextract 0 "reserved_cpus" let node = Node.create n mtotal mnode mfree dtotal dfree ctotal cnos - (not live) sptotal spfree gidx excl_stor + (not live || drained) sptotal spfree gidx excl_stor return (n, node) -- | Parses a group as found in the cluster group list.