Skip to content

Commit 5bc3ed7

Browse files
committed
Dev: sbd: Minor improvements for log clarity
1 parent 2b481a7 commit 5bc3ed7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crmsh/sbd.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,8 @@ def update_configuration(self) -> None:
520520
utils.sysconfig_set(self.SYSCONFIG_SBD, **self.update_dict)
521521
if self.cluster_is_running:
522522
bootstrap.sync_path(self.SYSCONFIG_SBD)
523-
logger.info("Already synced %s to all nodes", self.SYSCONFIG_SBD)
523+
if utils.list_cluster_nodes_except_me():
524+
logger.info("Already synced %s to all nodes", self.SYSCONFIG_SBD)
524525

525526
@classmethod
526527
def update_sbd_configuration(cls, update_dict: typing.Dict[str, str]) -> None:
@@ -795,7 +796,8 @@ def purge_sbd_from_cluster():
795796
service_manager.disable_service(constants.SBD_SERVICE, node)
796797

797798
config_bak = f"{SBDManager.SYSCONFIG_SBD}.bak"
798-
logger.info("Move %s to %s on all nodes", SBDManager.SYSCONFIG_SBD, config_bak)
799+
all_nodes_msg = f" on all nodes" if utils.list_cluster_nodes_except_me() else ""
800+
logger.info("Move %s to %s%s", SBDManager.SYSCONFIG_SBD, config_bak, all_nodes_msg)
799801
utils.cluster_run_cmd(f"mv {SBDManager.SYSCONFIG_SBD} {config_bak}")
800802

801803
out = sh.cluster_shell().get_stdout_or_raise_error("stonith_admin -L")

0 commit comments

Comments
 (0)