Revision e623dbe3 lib/cmdlib.py

b/lib/cmdlib.py
680 680
               ", ".join(node.name for node in mod_list))
681 681
    for name in mod_list:
682 682
      lu.context.ReaddNode(name)
683
  mc_now, mc_max = lu.cfg.GetMasterCandidateStats()
683
  mc_now, mc_max, _ = lu.cfg.GetMasterCandidateStats()
684 684
  if mc_now > mc_max:
685 685
    lu.LogInfo("Note: more nodes are candidates (%d) than desired (%d)" %
686 686
               (mc_now, mc_max))
......
2799 2799
      exceptions = [node]
2800 2800
    else:
2801 2801
      exceptions = []
2802
    mc_now, mc_max = self.cfg.GetMasterCandidateStats(exceptions)
2802
    mc_now, mc_max, _ = self.cfg.GetMasterCandidateStats(exceptions)
2803 2803
    # the new node will increase mc_max with one, so:
2804 2804
    mc_max = min(mc_max + 1, cp_size)
2805 2805
    self.master_candidate = mc_now < mc_max
......
2973 2973
    if ((self.op.master_candidate == False or self.op.offline == True or
2974 2974
         self.op.drained == True) and node.master_candidate):
2975 2975
      cp_size = self.cfg.GetClusterInfo().candidate_pool_size
2976
      num_candidates, _ = self.cfg.GetMasterCandidateStats()
2976
      num_candidates, _, _ = self.cfg.GetMasterCandidateStats()
2977 2977
      if num_candidates <= cp_size:
2978 2978
        msg = ("Not enough master candidates (desired"
2979 2979
               " %d, new value will be %d)" % (cp_size, num_candidates-1))

Also available in: Unified diff