Revision 9c8971d7 lib/cmdlib.py

b/lib/cmdlib.py
3941 3941
    # Remove the temp. assignements for the instance's drbds
3942 3942
    self.cfg.ReleaseDRBDMinors(instance)
3943 3943
    # Unlock all the nodes
3944
    self.context.glm.release(locking.LEVEL_NODE)
3945
    del self.acquired_locks[locking.LEVEL_NODE]
3944
    if self.op.mode == constants.INSTANCE_IMPORT:
3945
      nodes_keep = [self.op.src_node]
3946
      nodes_release = [node for node in self.acquired_locks[locking.LEVEL_NODE]
3947
                       if node != self.op.src_node]
3948
      self.context.glm.release(locking.LEVEL_NODE, nodes_release)
3949
      self.acquired_locks[locking.LEVEL_NODE] = nodes_keep
3950
    else:
3951
      self.context.glm.release(locking.LEVEL_NODE)
3952
      del self.acquired_locks[locking.LEVEL_NODE]
3946 3953

  
3947 3954
    if self.op.wait_for_sync:
3948 3955
      disk_abort = not _WaitForSync(self, iobj)

Also available in: Unified diff