From a292baea3da52c50b80e55dc73df15835ed96800 Mon Sep 17 00:00:00 2001 From: Leonid Chernin Date: Wed, 25 Dec 2024 15:28:24 +0000 Subject: [PATCH] debug update state Signed-off-by: Leonid Chernin --- control/state.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/control/state.py b/control/state.py index 35b42415..eb464fd3 100644 --- a/control/state.py +++ b/control/state.py @@ -595,7 +595,7 @@ def _add_key(self, key: str, val: str): (str(version_update),)) self.ioctx.operate_write_op(write_op, self.omap_name) self.version = version_update - self.logger.debug(f"omap_key generated: {key}") + self.logger.info(f"omap_key generated: {key}, OMAP version: {version_update}") except Exception: self.logger.exception("Unable to add key to OMAP, exiting!") raise @@ -1047,9 +1047,9 @@ def update(self) -> bool: omap_version = int(omap_state_dict[self.omap.OMAP_VERSION_KEY]) local_version = self.omap.get_local_version() + self.logger.info(f"Check local version {local_version} against OMAP version {omap_version}") if local_version < omap_version: - self.logger.debug(f"Start update from {local_version} to " - f"{omap_version} ({self.id_text}).") + self.logger.info(f"Start update from {local_version} to {omap_version} ({self.id_text}).") local_state_dict = self.local.get_state() local_state_keys = local_state_dict.keys() omap_state_keys = omap_state_dict.keys() @@ -1242,8 +1242,7 @@ def update(self) -> bool: # Update local state and version self.local.reset(omap_state_dict) self.omap.set_local_version(omap_version) - self.logger.debug(f"Update complete ({local_version} -> " - f"{omap_version}) ({self.id_text}).") + self.logger.info(f"Update complete ({local_version} -> {omap_version}) ({self.id_text}).") return True