Revision 56aa9fd5 lib/cmdlib.py

b/lib/cmdlib.py
2157 2157
    if self.op.master_candidate is not None:
2158 2158
      node.master_candidate = self.op.master_candidate
2159 2159
      result.append(("master_candidate", str(self.op.master_candidate)))
2160
      if self.op.master_candidate == False:
2161
        rrc = self.rpc.call_node_demote_from_mc(node.name)
2162
        if (rrc.failed or not isinstance(rrc.data, (tuple, list))
2163
            or len(rrc.data) != 2):
2164
          self.LogWarning("Node rpc error: %s" % rrc.error)
2165
        elif not rrc.data[0]:
2166
          self.LogWarning("Node failed to demote itself: %s" % rrc.data[1])
2160 2167

  
2161 2168
    # this will trigger configuration file update, if needed
2162 2169
    self.cfg.Update(node)

Also available in: Unified diff