Revision e54c4c5e lib/cmdlib.py

b/lib/cmdlib.py
603 603
  """Verifies the cluster status.
604 604

  
605 605
  """
606
  _OP_REQP = []
606
  _OP_REQP = ["skip_checks"]
607 607

  
608 608
  def _VerifyNode(self, node, file_list, local_cksum, vglist, node_result,
609 609
                  remote_version, feedback_fn):
......
776 776
  def CheckPrereq(self):
777 777
    """Check prerequisites.
778 778

  
779
    This has no prerequisites.
779
    Transform the list of checks we're going to skip into a set and check that
780
    all its members are valid.
780 781

  
781 782
    """
782
    pass
783
    self.skip_set = frozenset(self.op.skip_checks)
784
    if not constants.VERIFY_OPTIONAL_CHECKS.issuperset(self.skip_set):
785
      raise errors.OpPrereqError("Invalid checks to be skipped specified")
783 786

  
784 787
  def Exec(self, feedback_fn):
785 788
    """Verify integrity of cluster, performing various test on nodes.
......
928 931
                                         feedback_fn)
929 932
    bad = bad or result
930 933

  
931
    feedback_fn("* Verifying N+1 Memory redundancy")
932
    result = self._VerifyNPlusOneMemory(node_info, instance_cfg, feedback_fn)
933
    bad = bad or result
934
    if constants.VERIFY_NPLUSONE_MEM not in self.skip_set:
935
      feedback_fn("* Verifying N+1 Memory redundancy")
936
      result = self._VerifyNPlusOneMemory(node_info, instance_cfg, feedback_fn)
937
      bad = bad or result
934 938

  
935 939
    feedback_fn("* Other Notes")
936 940
    if i_non_redundant:

Also available in: Unified diff