Revision ec629280 htools/Ganeti/HTools/Node.hs

b/htools/Ganeti/HTools/Node.hs
316 316
  in t {peers=pmap, failN1 = new_failN1, rMem = new_rmem, pRem = new_prem}
317 317

  
318 318
-- | Calculate the new spindle usage
319
calcSpindleUsage :: Node -> Instance.Instance -> Double
320
calcSpindleUsage n i = incIf (Instance.usesLocalStorage i) (instSpindles n)
321
                         (fromIntegral $ Instance.spindleUsage i)
319
calcSpindleUse :: Node -> Instance.Instance -> Double
320
calcSpindleUse n i = incIf (Instance.usesLocalStorage i) (instSpindles n)
321
                       (fromIntegral $ Instance.spindleUse i)
322 322

  
323 323
-- | Assigns an instance to a node as primary and update the used VCPU
324 324
-- count, utilisation data and tags map.
......
328 328
                  , pCpu = fromIntegral new_count / tCpu t
329 329
                  , utilLoad = utilLoad t `T.addUtil` Instance.util inst
330 330
                  , pTags = addTags (pTags t) (Instance.tags inst)
331
                  , instSpindles = calcSpindleUsage t inst
331
                  , instSpindles = calcSpindleUse t inst
332 332
                  }
333 333
  where new_count = Instance.applyIfOnline inst (+ Instance.vcpus inst)
334 334
                    (uCpu t )
......
338 338
setSec t inst = t { sList = Instance.idx inst:sList t
339 339
                  , utilLoad = old_load { T.dskWeight = T.dskWeight old_load +
340 340
                                          T.dskWeight (Instance.util inst) }
341
                  , instSpindles = calcSpindleUsage t inst
341
                  , instSpindles = calcSpindleUse t inst
342 342
                  }
343 343
  where old_load = utilLoad t
344 344

  

Also available in: Unified diff