File: 0027-Rename_sbd_config.patch

package info (click to toggle)
crmsh 5.0.0-3
  • 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 (175 lines) | stat: -rw-r--r-- 6,221 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
Description: Replace location of sbd config
Author: Valentin Vidic <vvidic@debian.org>
Last-Update: 2025-06-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/crmsh/crash_test/config.py
+++ b/crmsh/crash_test/config.py
@@ -4,5 +4,5 @@
               iptables -{action} OUTPUT -d {peer_ip} -j DROP'''
 REMOVE_PORT = "firewall-cmd --zone=public --remove-port={port}/udp"
 ADD_PORT = "firewall-cmd --zone=public --add-port={port}/udp"
-SBD_CONF = "/etc/sysconfig/sbd"
+SBD_CONF = "/etc/default/sbd"
 SBD_CHECK_CMD = "sbd -d {dev} dump"
--- a/crmsh/report/constants.py
+++ b/crmsh/report/constants.py
@@ -51,7 +51,7 @@
 JOURNAL_SBD_F = "journal_sbd.log"
 MEMBERSHIP_F = "members.txt"
 PERMISSIONS_F = "permissions.txt"
-SBDCONF = "/etc/sysconfig/sbd"
+SBDCONF = "/etc/default/sbd"
 PCMKCONF = "/etc/sysconfig/pacemaker"
 SYSINFO_F = "sysinfo.txt"
 SYSSTATS_F = "sysstats.txt"
--- a/crmsh/sbd.py
+++ b/crmsh/sbd.py
@@ -76,7 +76,7 @@
     @staticmethod
     def get_sbd_value_from_config(key):
         '''
-        Get value from /etc/sysconfig/sbd
+        Get value from /etc/default/sbd
         '''
         return utils.parse_sysconfig(SBDManager.SYSCONFIG_SBD).get(key)
 
@@ -276,7 +276,7 @@
     @staticmethod
     def get_sbd_watchdog_timeout():
         '''
-        Get SBD_WATCHDOG_TIMEOUT from /etc/sysconfig/sbd
+        Get SBD_WATCHDOG_TIMEOUT from /etc/default/sbd
         '''
         res = SBDUtils.get_sbd_value_from_config("SBD_WATCHDOG_TIMEOUT")
         if not res:
@@ -407,7 +407,7 @@
 
     def adjust_sbd_delay_start(self):
         '''
-        Adjust SBD_DELAY_START in /etc/sysconfig/sbd
+        Adjust SBD_DELAY_START in /etc/default/sbd
         '''
         expected_value = str(self.sbd_delay_start_value_expected)
         config_value = self.sbd_delay_start_value_from_config
@@ -431,7 +431,7 @@
 
 
 class SBDManager:
-    SYSCONFIG_SBD = "/etc/sysconfig/sbd"
+    SYSCONFIG_SBD = "/etc/default/sbd"
     SYSCONFIG_SBD_TEMPLATE = "/usr/share/fillup-templates/sysconfig.sbd"
     SBD_SYSTEMD_DELAY_START_DIR = "/etc/systemd/system/sbd.service.d"
     SBD_SYSTEMD_DELAY_START_DISABLE_DIR = "/run/systemd/system/sbd.service.d"
@@ -691,7 +691,7 @@
         '''
         The process of deploying sbd includes:
         1. Initialize sbd device
-        2. Write config file /etc/sysconfig/sbd
+        2. Write config file /etc/default/sbd
         3. Enable sbd.service
         4. Restart cluster service if possible
         5. Configure stonith-sbd resource and related properties
@@ -755,7 +755,7 @@
     Purge SBD from cluster, the process includes:
     - stop and remove sbd agent
     - disable sbd.service
-    - move /etc/sysconfig/sbd to /etc/sysconfig/sbd.bak
+    - move /etc/default/sbd to /etc/default/sbd.bak
     - adjust cluster attributes
     - adjust related timeout values
     '''
--- a/crmsh/ui_sbd.py
+++ b/crmsh/ui_sbd.py
@@ -179,7 +179,7 @@
 
     def _show_sysconfig(self) -> None:
         '''
-        Show pure content of /etc/sysconfig/sbd
+        Show pure content of /etc/default/sbd
         '''
         with open(sbd.SBDManager.SYSCONFIG_SBD) as f:
             content_list = [
--- a/doc/crm.8.adoc
+++ b/doc/crm.8.adoc
@@ -2207,7 +2207,7 @@
 
 Main functionailities include:
 - Show configured disk metadata
-- Show contents of /etc/sysconfig/sbd
+- Show contents of /etc/default/sbd
 - Show SBD related cluster properties
 - Update the SBD related configuration parameters
 - NOTE: sbd crashdump is used for debugging. Understand the risks and run `crm sbd purge crashdump` afterward
--- a/scripts/health/collect.py
+++ b/scripts/health/collect.py
@@ -101,7 +101,7 @@
     '/etc/csync2/key_hagroup',
     '/etc/csync2/csync2.cfg',
     '/etc/corosync/corosync.conf',
-    '/etc/sysconfig/sbd'
+    '/etc/default/sbd'
     ]
 
 
--- a/scripts/sbd-device/main.yml
+++ b/scripts/sbd-device/main.yml
@@ -51,12 +51,12 @@
     sudo: true
     call: |
       #!/bin/sh
-      [ -f "/etc/sysconfig/sbd" ] && rm -f /etc/sysconfig/sbd || true
+      [ -f "/etc/default/sbd" ] && rm -f /etc/default/sbd || true
       <<EOF
       SBD_DEVICE="{{device}}"
       SBD_WATCHDOG="yes"
       SBD_WATCHDOG_DEV="{{watchdog}}"
-      EOF > /etc/sysconfig/sbd
+      EOF > /etc/default/sbd
 
   - shortdesc: Enable SBD Daemon
     service:
--- a/scripts/sbd/main.yml
+++ b/scripts/sbd/main.yml
@@ -7,7 +7,7 @@
 shortdesc: "SBD, Shared storage based fencing"
 longdesc: |
   Create a SBD STONITH resource. SBD must be configured to use
-  a particular shared storage device using /etc/sysconfig/sbd.
+  a particular shared storage device using /etc/default/sbd.
 
   This wizard can optionally create and configure a SBD device.
   A shared device must be available and visible on all nodes.
--- a/test/unittests/test_bootstrap.py
+++ b/test/unittests/test_bootstrap.py
@@ -1906,7 +1906,7 @@
         bootstrap.rm_configuration_files()
         mock_run.assert_has_calls([
             mock.call('rm -f file1 file2', None),
-            mock.call('cp /usr/share/fillup-templates/sysconfig.sbd /etc/sysconfig/sbd', None)
+            mock.call('cp /usr/share/fillup-templates/sysconfig.sbd /etc/default/sbd', None)
             ])
 
     @mock.patch('crmsh.utils.get_iplist_from_name')
--- a/test/unittests/test_report_collect.py
+++ b/test/unittests/test_report_collect.py
@@ -178,7 +178,7 @@
         mock_open_file.assert_called_once_with(f"{mock_ctx_inst.work_dir}/{constants.SBD_F}", "w")
         file_handle.write.assert_has_calls([
             mock.call("\n\n#=====[ Command ] ==========================#\n"),
-            mock.call("# . /etc/sysconfig/sbd;export SBD_DEVICE;sbd dump;sbd list\n"),
+            mock.call("# . /etc/default/sbd;export SBD_DEVICE;sbd dump;sbd list\n"),
             mock.call("data"),
             mock.call("\n\n#=====[ Command ] ==========================#\n"),
             mock.call("# crm sbd configure show\n"),
--- a/utils/crm_init.py
+++ b/utils/crm_init.py
@@ -14,7 +14,7 @@
 CSYNC2_KEY = '/etc/csync2/key_hagroup'
 CSYNC2_CFG = '/etc/csync2/csync2.cfg'
 COROSYNC_CONF = '/etc/corosync/corosync.conf'
-SYSCONFIG_SBD = '/etc/sysconfig/sbd'
+SYSCONFIG_SBD = '/etc/default/sbd'
 
 
 def rpm_info():