diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 0d119b97bdfafdc10e890d5e1c7739e33dbeb3de..8c62c25107c5839fa70fc3e3f0c28d4a9b8602fd 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -533,7 +533,7 @@ def _AdjustCandidatePool(lu): mod_list = lu.cfg.MaintainCandidatePool() if mod_list: lu.LogInfo("Promoted nodes to master candidate role: %s", - ", ".join(mod_list)) + ", ".join(node.name for node in mod_list)) for name in mod_list: lu.context.ReaddNode(name) mc_now, mc_max = lu.cfg.GetMasterCandidateStats() diff --git a/lib/config.py b/lib/config.py index 0263824a7a798efc3df435b80c4d2fef7baca5bd..b74d68d64c127cfa8a1a5a07d7119a3eedbebd71 100644 --- a/lib/config.py +++ b/lib/config.py @@ -809,7 +809,7 @@ class ConfigWriter: """Try to grow the candidate pool to the desired size. @rtype: list - @return: list with the adjusted node names + @return: list with the adjusted nodes (L{objects.Node} instances) """ mc_now, mc_max = self._UnlockedGetMasterCandidateStats() @@ -823,7 +823,7 @@ class ConfigWriter: node = self._config_data.nodes[name] if node.master_candidate or node.offline: continue - mod_list.append(node.name) + mod_list.append(node) node.master_candidate = True node.serial_no += 1 mc_now += 1