Revision 8bc34c7b htools/Ganeti/HTools/IAlloc.hs
b/htools/Ganeti/HTools/IAlloc.hs | ||
---|---|---|
4 | 4 |
|
5 | 5 |
{- |
6 | 6 |
|
7 |
Copyright (C) 2009, 2010, 2011 Google Inc. |
|
7 |
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
|
|
8 | 8 |
|
9 | 9 |
This program is free software; you can redistribute it and/or modify |
10 | 10 |
it under the terms of the GNU General Public License as published by |
... | ... | |
105 | 105 |
let vm_capable' = fromMaybe True vm_capable |
106 | 106 |
gidx <- lookupGroup ktg n guuid |
107 | 107 |
node <- if offline || drained || not vm_capable' |
108 |
then return $ Node.create n 0 0 0 0 0 0 True gidx |
|
108 |
then return $ Node.create n 0 0 0 0 0 0 True 0 gidx
|
|
109 | 109 |
else do |
110 | 110 |
mtotal <- extract "total_memory" |
111 | 111 |
mnode <- extract "reserved_memory" |
... | ... | |
113 | 113 |
dtotal <- extract "total_disk" |
114 | 114 |
dfree <- extract "free_disk" |
115 | 115 |
ctotal <- extract "total_cpus" |
116 |
ndparams <- extract "ndparams" >>= asJSObject |
|
117 |
spindles <- tryFromObj desc (fromJSObject ndparams) |
|
118 |
"spindle_count" |
|
116 | 119 |
return $ Node.create n mtotal mnode mfree |
117 |
dtotal dfree ctotal False gidx |
|
120 |
dtotal dfree ctotal False spindles gidx
|
|
118 | 121 |
return (n, node) |
119 | 122 |
|
120 | 123 |
-- | Parses a group as found in the cluster group list. |
Also available in: Unified diff