Since locaton tags were introduced, node tags may affect allocation, and thus, node tags should be initialized for each node in iallocator backend.
Signed-off-by: Oleg Ponomarev <[email protected]> --- src/Ganeti/HTools/Backend/IAlloc.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ganeti/HTools/Backend/IAlloc.hs b/src/Ganeti/HTools/Backend/IAlloc.hs index 6a0f463..c04375a 100644 --- a/src/Ganeti/HTools/Backend/IAlloc.hs +++ b/src/Ganeti/HTools/Backend/IAlloc.hs @@ -148,6 +148,7 @@ parseNode ktg n a = do let vm_capable' = fromMaybe True vm_capable gidx <- lookupGroup ktg n guuid ndparams <- extract "ndparams" >>= asJSObject + tags <- extract "tags" excl_stor <- tryFromObj desc (fromJSObject ndparams) "exclusive_storage" let live = not offline && vm_capable' lvextract def = eitherLive live def . extract @@ -162,7 +163,8 @@ parseNode ktg n a = do dfree <- lvextract 0 "free_disk" ctotal <- lvextract 0.0 "total_cpus" cnos <- lvextract 0 "reserved_cpus" - let node = Node.create n mtotal mnode mfree dtotal dfree ctotal cnos + let node = flip Node.setNodeTags tags $ + Node.create n mtotal mnode mfree dtotal dfree ctotal cnos (not live || drained) sptotal spfree gidx excl_stor return (n, node) -- 2.6.0.rc2.230.g3dd15c0
