From 39cf99af225a7beffa7d2f9cfc20905eae8e5c43 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Fri, 16 Sep 2022 17:22:31 +0530 Subject: [PATCH] Use ctdb admin command detected from SAMBA_SPECFICS env Signed-off-by: Anoop C S --- sambacc/ctdb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sambacc/ctdb.py b/sambacc/ctdb.py index c9fcdb5..28cc036 100644 --- a/sambacc/ctdb.py +++ b/sambacc/ctdb.py @@ -527,8 +527,9 @@ def __enter__(self) -> CLILeaderStatus: _logger.error(f"command {pnn_cmd!r} failed: {err!r}") except FileNotFoundError: _logger.error(f"ctdb command ({pnn_cmd!r}) not found") - # recmaster = - recmaster_cmd = samba_cmds.ctdb["recmaster"] + # recmaster = + admin_cmd = samba_cmds.ctdb_leader_admin_cmd() + recmaster_cmd = samba_cmds.ctdb[admin_cmd] try: out = subprocess.check_output(list(recmaster_cmd)) recmaster = out.decode("utf8").strip()