Commit 0779e3aa authored by Iustin Pop's avatar Iustin Pop
Browse files

Only update ssconf on cluster serial change

There is no need to update ssconf if the cluster serial number has not

Reviewed-by: ultrotter
parent 9fbfbb7b
......@@ -802,6 +802,9 @@ class ConfigWriter:
raise errors.ConfigurationError("Incomplete configuration"
" (missing cluster.rsahostkeypub)")
self._config_data = data
# init the last serial as -1 so that the next write will cause
# ssconf update
self._last_cluster_serial = -1
def _DistributeConfig(self):
"""Distribute the configuration to the other nodes.
......@@ -860,7 +863,9 @@ class ConfigWriter:
# Write ssconf files on all nodes (including locally)
if self._last_cluster_serial < self._config_data.cluster.serial_no:
self._last_cluster_serial = self._config_data.cluster.serial_no
def InitConfig(self, version, cluster_config, master_node_config):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment