Commit e1e75d00 authored by Iustin Pop's avatar Iustin Pop
Browse files

Convert write_ssconf_files to new style



The patch also adds logging of errors from the ConfigWriter in case the
RPC fails (although today we don't have failure modes).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 2a52a064
......@@ -1485,6 +1485,7 @@ def WriteSsconfFiles(values):
"""
ssconf.SimpleStore().WriteFiles(values)
return True, None
def _ErrnoOrStr(err):
......
......@@ -1106,8 +1106,14 @@ class ConfigWriter:
# Write ssconf files on all nodes (including locally)
if self._last_cluster_serial < self._config_data.cluster.serial_no:
if not self._offline:
rpc.RpcRunner.call_write_ssconf_files(self._UnlockedGetNodeList(),
self._UnlockedGetSsconfValues())
result = rpc.RpcRunner.call_write_ssconf_files(\
self._UnlockedGetNodeList(),
self._UnlockedGetSsconfValues())
for nname, nresu in result.items():
msg = nresu.RemoteFailMsg()
if msg:
logging.warning("Error while uploading ssconf files to"
" node %s: %s", nname, msg)
self._last_cluster_serial = self._config_data.cluster.serial_no
def _UnlockedGetSsconfValues(self):
......
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