Revision bdd8c739 htools/Ganeti/HTools/Loader.hs

b/htools/Ganeti/HTools/Loader.hs
318 318
                             - nodeIdsk node il
319 319
                 newn = Node.setFmem (Node.setXmem node delta_mem)
320 320
                        (Node.fMem node - adj_mem)
321
                 umsg1 = [printf "node %s is missing %d MB ram \
322
                                 \and %d GB disk"
323
                                 nname delta_mem (delta_dsk `div` 1024) |
324
                                 delta_mem > 512 || delta_dsk > 1024]::[String]
325
             in (msgs ++ umsg1, newn)
321
                 umsg1 =
322
                   if delta_mem > 512 || delta_dsk > 1024
323
                      then (printf "node %s is missing %d MB ram \
324
                                   \and %d GB disk"
325
                                   nname delta_mem (delta_dsk `div` 1024)):
326
                           msgs
327
                      else msgs
328
             in (umsg1, newn)
326 329
        ) [] nl
327 330

  
328 331
-- | Compute the amount of memory used by primary instances on a node.

Also available in: Unified diff