Revision 87ed6b79 lib/cmdlib/cluster.py

b/lib/cmdlib/cluster.py
331 331
    """Computes the list of nodes and their attributes.
332 332

  
333 333
    """
334
    # Locking is not used
335
    assert not (compat.any(lu.glm.is_owned(level)
336
                           for level in locking.LEVELS
337
                           if level != locking.LEVEL_CLUSTER) or
338
                self.do_locking or self.use_locking)
339

  
340 334
    if query.CQ_CONFIG in self.requested_data:
341 335
      cluster = lu.cfg.GetClusterInfo()
342 336
      nodes = lu.cfg.GetAllNodesInfo()
......
591 585

  
592 586
    """
593 587
    if self.wanted_names is None:
594
      self.wanted_names = self.owned_locks(locking.LEVEL_INSTANCE)
588
      self.wanted_names = \
589
          map(self.cfg.GetInstanceName,
590
              self.owned_locks(locking.LEVEL_INSTANCE))
595 591

  
596 592
    self.wanted_instances = \
597 593
        map(compat.snd, self.cfg.GetMultiInstanceInfoByName(self.wanted_names))
......
634 630
        per_node_disks[pnode].append((instance, idx, disk))
635 631

  
636 632
    assert not (frozenset(per_node_disks.keys()) -
637
                self.owned_locks(locking.LEVEL_NODE_RES)), \
633
                frozenset(self.owned_locks(locking.LEVEL_NODE_RES))), \
638 634
      "Not owning correct locks"
639 635
    assert not self.owned_locks(locking.LEVEL_NODE)
640 636

  

Also available in: Unified diff