Revision a167575e lib/cmdlib.py

b/lib/cmdlib.py
1613 1613
    instances it was primary for.
1614 1614

  
1615 1615
    """
1616
    cluster_info = self.cfg.GetClusterInfo()
1616 1617
    for node, n_img in node_image.items():
1617 1618
      # This code checks that every node which is now listed as
1618 1619
      # secondary has enough memory to host all instances it is
......
1625 1626
      for prinode, instances in n_img.sbp.items():
1626 1627
        needed_mem = 0
1627 1628
        for instance in instances:
1628
          bep = self.cfg.GetClusterInfo().FillBE(instance_cfg[instance])
1629
          bep = cluster_info.FillBE(instance_cfg[instance])
1629 1630
          if bep[constants.BE_AUTO_BALANCE]:
1630 1631
            needed_mem += bep[constants.BE_MEMORY]
1631 1632
        test = n_img.mfree < needed_mem

Also available in: Unified diff