From 054596f09aa8facbf4c814c1150ab5f3ce9b1a1f Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 2 Dec 2008 05:04:05 +0000
Subject: [PATCH] Replicate the node list in ssconf

This patch adds node_list in the list of replicated values from
ConfigWriter.

Reviewed-by: imsnah
---
 lib/config.py | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/lib/config.py b/lib/config.py
index 1101e4136..0f4749d35 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -867,11 +867,22 @@ class ConfigWriter:
       self._last_cluster_serial = self._config_data.cluster.serial_no
 
   def _UnlockedGetSsconfValues(self):
+    """Return the values needed by ssconf.
+
+    @rtype: dict
+    @return: a dictionary with keys the ssconf names and values their
+        associated value
+
+    """
+    node_list = "\n".join(utils.NiceSort(self._UnlockedGetNodeList()))
+    cluster = self._config_data.cluster
     return {
-      "cluster_name": self._config_data.cluster.cluster_name,
-      "master_ip": self._config_data.cluster.master_ip,
-      "master_netdev": self._config_data.cluster.master_netdev,
-      "master_node": self._config_data.cluster.master_node,
+      constants.SS_CLUSTER_NAME: cluster.cluster_name,
+      constants.SS_FILE_STORAGE_DIR: cluster.file_storage_dir,
+      constants.SS_MASTER_IP: cluster.master_ip,
+      constants.SS_MASTER_NETDEV: cluster.master_netdev,
+      constants.SS_MASTER_NODE: cluster.master_node,
+      constants.SS_NODE_LIST: node_list,
       }
 
   @locking.ssynchronized(_config_lock)
-- 
GitLab