Description: Fix cluster init on Debian Update file paths and service names to work better on Debian. Author: Valentin Vidic Last-Update: 2019-01-12 --- a/crmsh/utils.py +++ b/crmsh/utils.py @@ -2495,13 +2495,13 @@ """ Check if package is installed """ - cmd = "rpm -q --quiet {}".format(pkg) + cmd = "dpkg-query --status {}".format(pkg) if remote_addr: # check on remote rc, _, _ = sh.cluster_shell().get_rc_stdout_stderr_without_input(remote_addr, cmd) else: # check on local - rc, _ = ShellUtils().get_stdout(cmd) + rc, _, _ = ShellUtils().get_stdout_stderr(cmd) return rc == 0 --- a/crmsh/bootstrap.py +++ b/crmsh/bootstrap.py @@ -52,12 +52,12 @@ logger_utils = log.LoggerUtils(logger) -CSYNC2_KEY = "/etc/csync2/key_hagroup" -CSYNC2_CFG = "/etc/csync2/csync2.cfg" +CSYNC2_KEY = "/etc/csync2.key_hagroup" +CSYNC2_CFG = "/etc/csync2.cfg" COROSYNC_AUTH = "/etc/corosync/authkey" CRM_CFG = "/etc/crm/crm.conf" PROFILES_FILE = "/etc/crm/profiles.yml" -SYSCONFIG_SBD = "/etc/sysconfig/sbd" +SYSCONFIG_SBD = "/etc/default/sbd" SYSCONFIG_PCMK = "/etc/sysconfig/pacemaker" SYSCONFIG_NFS = "/etc/sysconfig/nfs" SYSCONFIG_FW = "/etc/sysconfig/SuSEfirewall2" @@ -1385,7 +1385,7 @@ clustername=_context.cluster_name, ringXaddr=ringXaddr_res, mcastport=mcastport_res, - transport="udpu", + transport="knet", ipv6=_context.ipv6, two_rings=two_rings) sync_file(corosync.conf()) --- a/crmsh/corosync.py +++ b/crmsh/corosync.py @@ -643,7 +643,7 @@ two_rings=False, qdevice=None): - if transport == "udpu": + if transport == "knet": ring_tmpl = "" for i in 0, 1: ring_tmpl += " ring{}_addr: {}\n".format(i, ringXaddr[i]) @@ -682,6 +682,9 @@ expected_votes: 1 two_node: 0 } +resources { + watchdog_device: off +} """ if qdevice is not None: quorum_tmpl = """quorum {