Revision db915bd1

b/lib/cmdlib.py
590 590
    master = self.sstore.GetMasterNode()
591 591

  
592 592
    nodelist = self.cfg.GetNodeList()
593
    if len(nodelist) > 0 and nodelist != [master]:
593
    if len(nodelist) != 1 or nodelist[0] != master:
594 594
      raise errors.OpPrereqError, ("There are still %d node(s) in "
595 595
                                   "this cluster." % (len(nodelist) - 1))
596
    instancelist = self.cfg.GetInstanceList()
597
    if instancelist:
598
      raise errors.OpPrereqError, ("There are still %d instance(s) in "
599
                                   "this cluster." % len(instancelist))
596 600

  
597 601
  def Exec(self, feedback_fn):
598 602
    """Destroys the cluster.

Also available in: Unified diff