File: 0013-Fix-cluster-bootstrap.patch

package info (click to toggle)
crmsh 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,980 kB
  • sloc: python: 50,399; sh: 1,207; makefile: 255; xml: 243; exp: 234; awk: 22
file content (47 lines) | stat: -rw-r--r-- 1,248 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: Fix cluster init on Debian
 Update file paths and service names to work better on Debian.
Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Last-Update: 2019-01-12
--- a/crmsh/utils.py
+++ b/crmsh/utils.py
@@ -2406,13 +2406,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
@@ -55,8 +55,8 @@
 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"
--- a/crmsh/corosync.py
+++ b/crmsh/corosync.py
@@ -41,6 +41,9 @@
     to_syslog: yes
     timestamp: on
 }
+resources {
+    watchdog_device: off
+}
 """
 KNET_LINK_NUM_LIMIT = 8