Revision 67ec18c0 src/Ganeti/HTools/Backend/IAlloc.hs
b/src/Ganeti/HTools/Backend/IAlloc.hs | ||
---|---|---|
132 | 132 |
gidx <- lookupGroup ktg n guuid |
133 | 133 |
ndparams <- extract "ndparams" >>= asJSObject |
134 | 134 |
spindles <- tryFromObj desc (fromJSObject ndparams) "spindle_count" |
135 |
let live = not offline && not drained && vm_capable'
|
|
135 |
let live = not offline && vm_capable' |
|
136 | 136 |
lvextract def = eitherLive live def . extract |
137 | 137 |
mtotal <- lvextract 0.0 "total_memory" |
138 | 138 |
mnode <- lvextract 0 "reserved_memory" |
... | ... | |
140 | 140 |
dtotal <- lvextract 0.0 "total_disk" |
141 | 141 |
dfree <- lvextract 0 "free_disk" |
142 | 142 |
ctotal <- lvextract 0.0 "total_cpus" |
143 |
let node = Node.create n mtotal mnode mfree dtotal dfree ctotal (not live)
|
|
144 |
spindles gidx |
|
143 |
let node = Node.create n mtotal mnode mfree dtotal dfree ctotal |
|
144 |
(not live || drained) spindles gidx
|
|
145 | 145 |
return (n, node) |
146 | 146 |
|
147 | 147 |
-- | Parses a group as found in the cluster group list. |
Also available in: Unified diff