X-Git-Url: http://git.ganeti.org/?p=ganeti-github.git;a=blobdiff_plain;f=src%2FGaneti%2FHTools%2FBackend%2FIAlloc.hs;h=b575af1b8e5cb69752208668b8452872ba7d3c6f;hp=c421b5f44e2ba44362435b6a569c4b10a1932dc2;hb=67ec18c0c0f6be96e99cd3394022e5131f48da85;hpb=0eb83d700f0749203d057d2b7fedffde903f3942 diff --git a/src/Ganeti/HTools/Backend/IAlloc.hs b/src/Ganeti/HTools/Backend/IAlloc.hs index c421b5f..b575af1 100644 --- a/src/Ganeti/HTools/Backend/IAlloc.hs +++ b/src/Ganeti/HTools/Backend/IAlloc.hs @@ -132,7 +132,7 @@ parseNode ktg n a = do gidx <- lookupGroup ktg n guuid ndparams <- extract "ndparams" >>= asJSObject spindles <- tryFromObj desc (fromJSObject ndparams) "spindle_count" - let live = not offline && not drained && vm_capable' + let live = not offline && vm_capable' lvextract def = eitherLive live def . extract mtotal <- lvextract 0.0 "total_memory" mnode <- lvextract 0 "reserved_memory" @@ -140,8 +140,8 @@ parseNode ktg n a = do dtotal <- lvextract 0.0 "total_disk" dfree <- lvextract 0 "free_disk" ctotal <- lvextract 0.0 "total_cpus" - let node = Node.create n mtotal mnode mfree dtotal dfree ctotal (not live) - spindles gidx + let node = Node.create n mtotal mnode mfree dtotal dfree ctotal + (not live || drained) spindles gidx return (n, node) -- | Parses a group as found in the cluster group list.