Browse Source

Relocate drbd-tools to stx-integ/filesystem/drbd/drbd-tools

Move content from stx-gplv2 into stx-integ

Packages will be relocated to

stx-integ:
    base/
        bash
        cgcs-users
        cluster-resource-agents
        dpkg
        haproxy
        libfdt
        netpbm
        rpm

    database/
        mariadb

    filesystem/
        iscsi-initiator-utils

    filesystem/drbd/
        drbd-tools

    kernel/kernel-modules/
        drbd
        integrity
        intel-e1000e
        intel-i40e
        intel-i40evf
        intel-ixgbe
        intel-ixgbevf
        qat17
        tpmdd

    ldap/
        ldapscripts

    networking/
        iptables
        net-tools

Change-Id: I723e4dabe7f05287643eceebf5bd9cc6211c7276
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
Scott Little 8 months ago
parent
commit
850913089d

+ 0
- 1
centos_pkg_dirs View File

@@ -1,3 +1,2 @@
1 1
 iptables
2
-drbd-tools
3 2
 mariadb

+ 0
- 4
drbd-tools/centos/build_srpm.data View File

@@ -1,4 +0,0 @@
1
-COPY_LIST="$FILES_BASE/* \
2
-           $DISTRO/patches/* \
3
-           $CGCS_BASE/downloads/drbd-8.4.3.tar.gz"
4
-TIS_PATCH_VER=6

+ 0
- 407
drbd-tools/centos/drbd.spec View File

@@ -1,407 +0,0 @@
1
-# Define init script directory. %{_initddir} is available from Fedora
2
-# 9 forward; CentOS knows 5 only %{_initrddir}. Neither are known to
3
-# autoconf...
4
-%{!?_initddir: %{expand: %%global _initddir %{_initrddir}}}
5
-
6
-# Compatibility macro wrappers for legacy RPM versions that do not
7
-# support conditional builds
8
-%{!?bcond_without: %{expand: %%global bcond_without() %%{expand:%%%%{!?_without_%%{1}:%%%%global with_%%{1} 1}}}}
9
-%{!?bcond_with:    %{expand: %%global bcond_with()    %%{expand:%%%%{?_with_%%{1}:%%%%global with_%%{1} 1}}}}
10
-%{!?with:          %{expand: %%global with()          %%{expand:%%%%{?with_%%{1}:1}%%%%{!?with_%%{1}:0}}}}
11
-%{!?without:       %{expand: %%global without()       %%{expand:%%%%{?with_%%{1}:0}%%%%{!?with_%%{1}:1}}}}
12
-
13
-# Conditionals
14
-# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
15
-# to disable or enable specific features
16
-%bcond_without udev
17
-%bcond_without pacemaker
18
-%bcond_with rgmanager
19
-%bcond_without heartbeat
20
-# conditionals may not contain "-" nor "_", hence "bashcompletion"
21
-%bcond_without bashcompletion
22
-# --with xen is ignored on any non-x86 architecture
23
-%bcond_without xen
24
-%bcond_without legacy_utils
25
-#%ifnarch %{ix86} x86_64
26
-%global _without_xen --without-xen
27
-#%endif
28
-
29
-Name: drbd
30
-Summary: DRBD driver for Linux
31
-Version: 8.4.3
32
-Release: 0%{?_tis_dist}.%{tis_patch_ver}
33
-Source: http://oss.linbit.com/%{name}/8.3/%{name}-%{version}.tar.gz
34
-
35
-Source1: drbd.service
36
-
37
-# WRS
38
-Patch0001: 0001-skip_wait_con_int_on_simplex.patch
39
-Patch0002: 0002-drbd-conditional-crm-dependency.patch
40
-Patch0003: 0003-drbd_report_condition.patch
41
-Patch0004: 0004-drbdadm-ipaddr-change.patch
42
-Patch0005: 0005-drbd_reconnect_standby_standalone.patch
43
-Patch0006: 0006-avoid-kernel-userspace-version-check.patch
44
-Patch0007: 0007-Update-OCF-to-attempt-connect-in-certain-states.patch
45
-Patch0008: 0008-Increase-short-cmd-timeout-to-15-secs.patch
46
-
47
-License: GPLv2+
48
-ExclusiveOS: linux
49
-Group: System Environment/Kernel
50
-URL: http://www.drbd.org/
51
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
52
-BuildRequires: flex
53
-Requires: %{name}-utils = %{version}
54
-%if %{with udev}
55
-Requires: %{name}-udev = %{version}
56
-BuildRequires: udev
57
-%endif
58
-%if %{with pacemaker}
59
-Requires: %{name}-pacemaker = %{version}
60
-%endif
61
-## %if %{with rgmanager}
62
-## ## No.
63
-## ## We don't want to annoy the majority of our userbase on pacemaker
64
-## ## by pulling in the full rgmanager stack via drbd-rgmanager as well.
65
-## Requires: %{name}-rgmanager = %{version}
66
-## %endif
67
-%if %{with heartbeat}
68
-Requires: %{name}-heartbeat = %{version}
69
-%endif
70
-%if %{with bashcompletion}
71
-Requires: %{name}-bash-completion = %{version}
72
-%endif
73
-BuildRequires: systemd-devel
74
-
75
-%description
76
-DRBD mirrors a block device over the network to another machine.
77
-Think of it as networked raid 1. It is a building block for
78
-setting up high availability (HA) clusters.
79
-
80
-This is a virtual package, installing the full DRBD userland suite.
81
-
82
-# Just a few docs go into the "drbd" package. Everything else is part
83
-# of one of the drbd-* packages.
84
-%files
85
-%defattr(-,root,root,-)
86
-%doc COPYING
87
-%doc ChangeLog
88
-%doc README
89
-
90
-%package utils
91
-Summary: Management utilities for DRBD
92
-Group: System Environment/Kernel
93
-# We used to have one monolithic userland package.
94
-# Since all other packages require drbd-utils,
95
-# it should be sufficient to add the conflict here.
96
-Conflicts: drbd < 8.3.6
97
-# These exist in centos extras:
98
-Conflicts: drbd82 drbd83
99
-Requires(post): chkconfig
100
-Requires(preun): chkconfig
101
-
102
-%description utils
103
-DRBD mirrors a block device over the network to another machine.
104
-Think of it as networked raid 1. It is a building block for
105
-setting up high availability (HA) clusters.
106
-
107
-This packages includes the DRBD administration tools.
108
-
109
-%files utils
110
-%defattr(755,root,root,-)
111
-/sbin/drbdsetup
112
-/sbin/drbdadm
113
-/sbin/drbdmeta
114
-%if %{with legacy_utils}
115
-%dir /lib/drbd/
116
-/lib/drbd/drbdsetup-83
117
-/lib/drbd/drbdadm-83
118
-%endif
119
-%{_initddir}/%{name}
120
-%attr(644,root,root) %{_unitdir}/%{name}.service
121
-%{_sbindir}/drbd-overview
122
-%dir %{_prefix}/lib/%{name}
123
-%{_prefix}/lib/%{name}/outdate-peer.sh
124
-%{_prefix}/lib/%{name}/snapshot-resync-target-lvm.sh
125
-%{_prefix}/lib/%{name}/unsnapshot-resync-target-lvm.sh
126
-%{_prefix}/lib/%{name}/notify-out-of-sync.sh
127
-%{_prefix}/lib/%{name}/notify-split-brain.sh
128
-%{_prefix}/lib/%{name}/notify-emergency-reboot.sh
129
-%{_prefix}/lib/%{name}/notify-emergency-shutdown.sh
130
-%{_prefix}/lib/%{name}/notify-io-error.sh
131
-%{_prefix}/lib/%{name}/notify-pri-lost-after-sb.sh
132
-%{_prefix}/lib/%{name}/notify-pri-lost.sh
133
-%{_prefix}/lib/%{name}/notify-pri-on-incon-degr.sh
134
-%{_prefix}/lib/%{name}/notify.sh
135
-
136
-%defattr(-,root,root,-)
137
-%dir %{_var}/lib/%{name}
138
-%config(noreplace) %attr(640, root, root) %{_sysconfdir}/drbd.conf
139
-%dir %attr(740, root, root) %{_sysconfdir}/drbd.d
140
-%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf
141
-%{_mandir}/man8/drbd.8.*
142
-%{_mandir}/man8/drbdsetup.8.*
143
-%{_mandir}/man8/drbdadm.8.*
144
-%{_mandir}/man5/drbd.conf.5.*
145
-%{_mandir}/man8/drbdmeta.8.*
146
-%doc scripts/drbd.conf.example
147
-%doc COPYING
148
-%doc ChangeLog
149
-%doc README
150
-
151
-%if %{with udev}
152
-%package udev
153
-Summary: udev integration scripts for DRBD
154
-Group: System Environment/Kernel
155
-Requires: %{name}-utils = %{version}-%{release}, udev
156
-
157
-%description udev
158
-This package contains udev helper scripts for DRBD, managing symlinks to
159
-DRBD devices in /dev/drbd/by-res and /dev/drbd/by-disk.
160
-
161
-%files udev
162
-%defattr(-,root,root,-)
163
-%config(noreplace) %{_sysconfdir}/udev/rules.d/65-drbd.rules*
164
-%endif # with udev
165
-
166
-%if %{with pacemaker}
167
-%package pacemaker
168
-Summary: Pacemaker resource agent for DRBD
169
-Group: System Environment/Base
170
-Requires: %{name}-utils = %{version}-%{release}
171
-License: GPLv2
172
-
173
-%description pacemaker
174
-This package contains the master/slave DRBD resource agent for the
175
-Pacemaker High Availability cluster manager.
176
-
177
-%files pacemaker
178
-%defattr(755,root,root,-)
179
-%{_prefix}/lib/%{name}/crm-fence-peer.sh
180
-%{_prefix}/lib/%{name}/crm-unfence-peer.sh
181
-%{_prefix}/lib/%{name}/stonith_admin-fence-peer.sh
182
-%{_prefix}/lib/ocf/resource.d/linbit/drbd
183
-%endif # with pacemaker
184
-
185
-# Dependencies for drbd-rgmanager are particularly awful. On RHEL 5
186
-# and prior (and corresponding Fedora releases), %{_datadir}/cluster
187
-# was owned by rgmanager version 2, so we have to depend on that.
188
-#
189
-# With Red Hat Cluster 3.0.1 (around Fedora 12), the DRBD resource
190
-# agent was merged in, and it became part of the resource-agents 3
191
-# package (which of course is different from resource-agents on all
192
-# other platforms -- go figure). So for resource-agents >= 3, we must
193
-# generally conflict.
194
-#
195
-# Then for RHEL 6, Red Hat in all their glory decided to keep the
196
-# packaging scheme, but kicked DRBD out of the resource-agents
197
-# package. Thus, for RHEL 6 specifically, we must not conflict with
198
-# resource-agents >=3, but instead require it.
199
-#
200
-# The saga continues:
201
-# In RHEL 6.1 they have listed the drbd resource agent as valid agent,
202
-# but do not include it in their resource-agents package. -> So we
203
-# drop any dependency regarding rgmanager's version.
204
-#
205
-# All of this for exactly two (2) files.
206
-%if %{with rgmanager}
207
-%package rgmanager
208
-Summary: Red Hat Cluster Suite agent for DRBD
209
-Group: System Environment/Base
210
-Requires: %{name}-utils = %{version}-%{release}
211
-
212
-%description rgmanager
213
-This package contains the DRBD resource agent for the Red Hat Cluster Suite
214
-resource manager.
215
-
216
-As of Red Hat Cluster Suite 3.0.1, the DRBD resource agent is included
217
-in the Cluster distribution.
218
-
219
-%files rgmanager
220
-%defattr(755,root,root,-)
221
-%{_datadir}/cluster/drbd.sh
222
-%{_prefix}/lib/%{name}/rhcs_fence
223
-
224
-%defattr(-,root,root,-)
225
-%{_datadir}/cluster/drbd.metadata
226
-%endif # with rgmanager
227
-
228
-%if %{with heartbeat}
229
-%package heartbeat
230
-Summary: Heartbeat resource agent for DRBD
231
-Group: System Environment/Base
232
-Requires: %{name}-utils = %{version}-%{release}
233
-License: GPLv2
234
-
235
-%description heartbeat
236
-This package contains the DRBD resource agents for the Heartbeat cluster
237
-resource manager (in v1 compatibility mode).
238
-
239
-%files heartbeat
240
-%defattr(755,root,root,-)
241
-%{_sysconfdir}/ha.d/resource.d/drbddisk
242
-%{_sysconfdir}/ha.d/resource.d/drbdupper
243
-
244
-%defattr(-,root,root,-)
245
-%{_mandir}/man8/drbddisk.8.*
246
-%endif # with heartbeat
247
-
248
-%if %{with bashcompletion}
249
-%package bash-completion
250
-Summary: Programmable bash completion support for drbdadm
251
-Group: System Environment/Base
252
-Requires: %{name}-utils = %{version}-%{release}
253
-
254
-%description bash-completion
255
-This package contains programmable bash completion support for the drbdadm
256
-management utility.
257
-
258
-%files bash-completion
259
-%defattr(-,root,root,-)
260
-%config(noreplace) %{_sysconfdir}/bash_completion.d/drbdadm*
261
-%endif # with bashcompletion
262
-
263
-
264
-%prep
265
-%setup -q
266
-%patch0001 -p1
267
-%patch0002 -p1
268
-%patch0003 -p1
269
-%patch0004 -p1
270
-%patch0005 -p1
271
-%patch0006 -p1
272
-%patch0007 -p1
273
-%patch0008 -p1
274
-
275
-%build
276
-%configure \
277
-    --with-utils \
278
-    --without-km \
279
-    %{?_without_udev} \
280
-    %{?_without_xen} \
281
-    %{?_without_pacemaker} \
282
-    %{?_without_heartbeat} \
283
-    %{?_with_rgmanager} \
284
-    %{?_without_bashcompletion} \
285
-    %{?_without_legacy_utils} \
286
-    --with-initdir=%{_initddir}
287
-make %{?_smp_mflags}
288
-
289
-%install
290
-rm -rf %{buildroot}
291
-make install DESTDIR=%{buildroot}
292
-
293
-install -m 755 -d %{buildroot}%{_unitdir}
294
-install -m 644 -p -D %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
295
-
296
-%clean
297
-rm -rf %{buildroot}
298
-
299
-%post utils
300
-chkconfig --add drbd
301
-%if %{without udev}
302
-for i in `seq 0 15` ; do
303
-    test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
304
-done
305
-%endif #without udev
306
-
307
-%preun utils
308
-if [ $1 -eq 0 ]; then
309
-        %{_initrddir}/drbd stop >/dev/null 2>&1
310
-        /sbin/chkconfig --del drbd
311
-fi
312
-
313
-
314
-%changelog
315
-* Tue Feb  5 2013 Philipp Reisner <phil@linbit.com> - 8.4.3-1
316
-- New upstream release.
317
-
318
-* Thu Sep  6 2012 Philipp Reisner <phil@linbit.com> - 8.4.2-1
319
-- New upstream release.
320
-
321
-* Tue Feb 21 2012 Lars Ellenberg <lars@linbit.com> - 8.4.1-2
322
-- Build fix for RHEL 6 and ubuntu lucid
323
-
324
-* Tue Dec 20 2011 Philipp Reisner <phil@linbit.com> - 8.4.1-1
325
-- New upstream release.
326
-
327
-* Wed Jul 15 2011 Philipp Reisner <phil@linbit.com> - 8.4.0-1
328
-- New upstream release.
329
-
330
-* Fri Jan 28 2011 Philipp Reisner <phil@linbit.com> - 8.3.10-1
331
-- New upstream release.
332
-
333
-* Fri Oct 22 2010 Philipp Reisner <phil@linbit.com> - 8.3.9-1
334
-- New upstream release.
335
-
336
-* Wed Jun  2 2010 Philipp Reisner <phil@linbit.com> - 8.3.8-1
337
-- New upstream release.
338
-
339
-* Thu Jan 13 2010 Philipp Reisner <phil@linbit.com> - 8.3.7-1
340
-- New upstream release.
341
-
342
-* Thu Nov  8 2009 Philipp Reisner <phil@linbit.com> - 8.3.6-1
343
-- New upstream release.
344
-
345
-* Thu Oct 27 2009 Philipp Reisner <phil@linbit.com> - 8.3.5-1
346
-- New upstream release.
347
-
348
-* Wed Oct 21 2009 Florian Haas <florian@linbit.com> - 8.3.4-12
349
-- Packaging makeover.
350
-
351
-* Thu Oct  6 2009 Philipp Reisner <phil@linbit.com> - 8.3.4-1
352
-- New upstream release.
353
-
354
-* Thu Oct  5 2009 Philipp Reisner <phil@linbit.com> - 8.3.3-1
355
-- New upstream release.
356
-
357
-* Fri Jul  3 2009 Philipp Reisner <phil@linbit.com> - 8.3.2-1
358
-- New upstream release.
359
-
360
-* Fri Mar 27 2009 Philipp Reisner <phil@linbit.com> - 8.3.1-1
361
-- New upstream release.
362
-
363
-* Thu Dec 18 2008 Philipp Reisner <phil@linbit.com> - 8.3.0-1
364
-- New upstream release.
365
-
366
-* Thu Nov 12 2008 Philipp Reisner <phil@linbit.com> - 8.2.7-1
367
-- New upstream release.
368
-
369
-* Fri May 30 2008 Philipp Reisner <phil@linbit.com> - 8.2.6-1
370
-- New upstream release.
371
-
372
-* Tue Feb 12 2008 Philipp Reisner <phil@linbit.com> - 8.2.5-1
373
-- New upstream release.
374
-
375
-* Fri Jan 11 2008 Philipp Reisner <phil@linbit.com> - 8.2.4-1
376
-- New upstream release.
377
-
378
-* Wed Jan  9 2008 Philipp Reisner <phil@linbit.com> - 8.2.3-1
379
-- New upstream release.
380
-
381
-* Fri Nov  2 2007 Philipp Reisner <phil@linbit.com> - 8.2.1-1
382
-- New upstream release.
383
-
384
-* Fri Sep 28 2007 Philipp Reisner <phil@linbit.com> - 8.2.0-1
385
-- New upstream release.
386
-
387
-* Mon Sep  3 2007 Philipp Reisner <phil@linbit.com> - 8.0.6-1
388
-- New upstream release.
389
-
390
-* Fri Aug  3 2007 Philipp Reisner <phil@linbit.com> - 8.0.5-1
391
-- New upstream release.
392
-
393
-* Wed Jun 27 2007 Philipp Reisner <phil@linbit.com> - 8.0.4-1
394
-- New upstream release.
395
-
396
-* Mon May 7 2007 Philipp Reisner <phil@linbit.com> - 8.0.3-1
397
-- New upstream release.
398
-
399
-* Fri Apr 6 2007 Philipp Reisner <phil@linbit.com> - 8.0.2-1
400
-- New upstream release.
401
-
402
-* Mon Mar 3 2007 Philipp Reisner <phil@linbit.com> - 8.0.1-1
403
-- New upstream release.
404
-
405
-* Wed Jan 24 2007 Philipp Reisner <phil@linbit.com>  - 8.0.0-1
406
-- New upstream release.
407
-

+ 0
- 17
drbd-tools/centos/files/drbd.service View File

@@ -1,17 +0,0 @@
1
-[Unit]
2
-Description=Control drbd resources.
3
-After=network.target sshd.service
4
-
5
-[Service]
6
-Type=forking
7
-Restart=no
8
-KillMode=process
9
-RemainAfterExit=yes
10
-ExecStart=/etc/rc.d/init.d/drbd start
11
-ExecStop=/etc/rc.d/init.d/drbd stop
12
-ExecReload=/etc/rc.d/init.d/drbd reload
13
-TimeoutSec=5min
14
-
15
-[Install]
16
-WantedBy=multi-user.target
17
-

+ 0
- 18
drbd-tools/centos/patches/0001-skip_wait_con_int_on_simplex.patch View File

@@ -1,18 +0,0 @@
1
----
2
- scripts/drbd |    5 ++++-
3
- 1 file changed, 4 insertions(+), 1 deletion(-)
4
-
5
---- a/scripts/drbd
6
-+++ b/scripts/drbd
7
-@@ -185,7 +185,10 @@ case "$1" in
8
- 	done
9
- 
10
- 	[ -d /var/lock/subsys ] && touch /var/lock/subsys/drbd	# for RedHat
11
--	$DRBDADM wait-con-int # User interruptible version of wait-connect all
12
-+
13
-+	if [ ! -e /etc/platform/simplex ] ; then # Skip if simplex
14
-+	    $DRBDADM wait-con-int # User interruptible version of wait-connect all
15
-+	fi
16
- 
17
- 	$DRBDADM sh-b-pri all # Become primary if configured
18
- 	log_end_msg 0

+ 0
- 26
drbd-tools/centos/patches/0002-drbd-conditional-crm-dependency.patch View File

@@ -1,26 +0,0 @@
1
-Index: drbd-8.3.11/scripts/drbd.ocf
2
-===================================================================
3
---- drbd-8.3.11.orig/scripts/drbd.ocf
4
-+++ drbd-8.3.11/scripts/drbd.ocf
5
-@@ -202,13 +202,17 @@ do_drbdadm() {
6
- }
7
-
8
- set_master_score() {
9
--	# Use quiet mode (-Q) to quench logging. Actual score updates
10
--	# will get logged by attrd anyway
11
--	do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1
12
-+	if [ -x ${HA_SBIN_DIR}/crm_master ]; then
13
-+		# Use quiet mode (-Q) to quench logging. Actual score updates
14
-+		# will get logged by attrd anyway
15
-+		do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1
16
-+	fi
17
- }
18
-
19
- remove_master_score() {
20
--	do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
21
-+	if [ -x ${HA_SBIN_DIR}/crm_master ]; then
22
-+		do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
23
-+	fi
24
- }
25
-
26
- _sh_status_process() {

+ 0
- 387
drbd-tools/centos/patches/0003-drbd_report_condition.patch View File

@@ -1,387 +0,0 @@
1
----
2
- scripts/drbd     |    1 
3
- scripts/drbd.ocf |  259 ++++++++++++++++++++++---------------------------------
4
- 2 files changed, 109 insertions(+), 151 deletions(-)
5
-
6
---- a/scripts/drbd.ocf
7
-+++ b/scripts/drbd.ocf
8
-@@ -5,6 +5,8 @@
9
- #
10
- # Copyright (c) 2009 LINBIT HA-Solutions GmbH,
11
- # Copyright (c) 2009 Florian Haas, Lars Ellenberg
12
-+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
13
-+#
14
- # Based on the Heartbeat drbd OCF Resource Agent by Lars Marowsky-Bree
15
- # (though it turned out to be an almost complete rewrite)
16
- #
17
-@@ -216,20 +218,6 @@ do_drbdadm() {
18
- 	return $ret
19
- }
20
- 
21
--set_master_score() {
22
--	if [ -x ${HA_SBIN_DIR}/crm_master ]; then
23
--		# Use quiet mode (-Q) to quench logging. Actual score updates
24
--		# will get logged by attrd anyway
25
--		do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1
26
--	fi
27
--}
28
--
29
--remove_master_score() {
30
--	if [ -x ${HA_SBIN_DIR}/crm_master ]; then
31
--		do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
32
--	fi
33
--}
34
--
35
- _sh_status_process() {
36
- 	# _volume not present should not happen,
37
- 	# but may help make this agent work even if it talks to drbd 8.3.
38
-@@ -242,6 +230,7 @@ _sh_status_process() {
39
- 	DRBD_DSTATE_LOCAL[$_volume]=${_disk:-Unconfigured}
40
- 	DRBD_DSTATE_REMOTE[$_volume]=${_pdsk:-DUnknown}
41
- }
42
-+
43
- drbd_set_status_variables() {
44
- 	# drbdsetup sh-status prints these values to stdout,
45
- 	# and then prints _sh_status_process.
46
-@@ -322,119 +311,9 @@ maybe_outdate_self()
47
- 	ocf_log notice "outdating $DRBD_RESOURCE: according to OCF_RESKEY_CRM_meta_notify_master_uname, '$host' is still master"
48
- 	do_drbdadm outdate $DRBD_RESOURCE
49
- 
50
--	# on some pacemaker versions, -INFINITY may cause resource instance stop/start.
51
--	# But in this case that is ok, it may even clear the replication link
52
--	# problem.
53
--	set_master_score -INFINITY
54
--
55
- 	return 0
56
- }
57
- 
58
--drbd_update_master_score() {
59
--	# NOTE
60
--	# there may be constraint scores from rules on role=Master,
61
--	# that in some ways can add to the node attribute based master score we
62
--	# specify below. If you think you want to add personal preferences,
63
--	# in case the scores given by this RA do not suffice, this is the
64
--	# value space you can work with:
65
--	# -INFINITY: Do not promote. Really. Won't work anyways.
66
--		# Too bad, at least with current (Oktober 2009) Pacemaker,
67
--		# negative master scores cause instance stop; restart cycle :(
68
--	# missing, zero: Do not promote.
69
--	#        I think my data is not good enough.
70
--	#        Though, of course, you may try, and it might even work.
71
--	#     5: please, do not promote, unless this is your only option.
72
--	#    10: promotion is probably a bad idea, our local data is no good,
73
--	#        you'd probably run into severe performance problems, and risk
74
--	#        application crashes or blocking IO in case you lose the
75
--	#        replication connection.
76
--	#  1000: Ok to be promoted, we have good data locally (though we don't
77
--	#        know about the peer, so possibly it has even better data?).
78
--	#        You sould use the crm-fence-peer.sh handler or similar
79
--	#        mechanism to avoid data divergence.
80
--	# 10000: Please promote me/keep me Primary.
81
--	#        I'm confident that my data is as good as it gets.
82
--	#
83
--	# For multi volume, we need to compare who is "better" a bit more sophisticated.
84
--	# The ${XXX[*]//UpToDate}, without being in double quotes, results in a single space,
85
--	# if all are UpToDate.
86
--	: == DEBUG == ${DRBD_ROLE_LOCAL[*]}/${DRBD_DSTATE_LOCAL[*]//UpToDate/ }/${DRBD_DSTATE_REMOTE[*]//UpToDate/ }/ ==
87
--	case ${DRBD_ROLE_LOCAL[*]}/${DRBD_DSTATE_LOCAL[*]//UpToDate/ }/${DRBD_DSTATE_REMOTE[*]//UpToDate/ }/ in
88
--	*Primary*/\ /*/)
89
--		# I am Primary, all local disks are UpToDate
90
--		set_master_score 10000
91
--		;;
92
--	*/\ /*DUnknown*/)
93
--		# all local disks are UpToDate,
94
--		# but I'm not Primary,
95
--		# and I'm not sure about the peer's disk state(s).
96
--		# We may need to outdate ourselves?
97
--		# But if we outdate in a MONITOR, and are disconnected
98
--		# secondary because of a hard primary crash, before CRM noticed
99
--		# that there is no more master, we'd make us utterly useless!
100
--		# Trust that the primary will also notice the disconnect,
101
--		# and will place an appropriate fencing constraint via
102
--		# its fence-peer handler callback.
103
--		set_master_score  1000
104
--		;;
105
--	*/\ /*/)
106
--		# We know something about our peer, which means that either the
107
--		# replication link is established, or it was not even
108
--		# consistent last time we talked to each other.
109
--		# Also all our local disks are UpToDate, which means even if we are
110
--		# currently synchronizing, we do so as SyncSource.
111
--		set_master_score 10000
112
--		;;
113
--
114
--	*/*/\ /)
115
--		# At least one of our local disks is not up to date.
116
--		# But our peer is ALL OK.
117
--		# We can expect to have access to useful
118
--		# data, but must expect degraded performance.
119
--		set_master_score 10
120
--		;;
121
--	*/*Attaching*/*/|\
122
--	*/*Negotiating*/*/)
123
--		# some transitional state.
124
--		# just don't do anything
125
--		: ;;
126
--
127
--	Unconfigured*|\
128
--	*/*Diskless*/*/|\
129
--	*/*Failed*/*/|\
130
--	*/*Inconsistent*/*/|\
131
--	*/*Outdated*/*/)
132
--		# ALWAYS put the cluster in MAINTENANCE MODE
133
--		# if you add a volume to a live replication group,
134
--		# because the new volume will typically come up as Inconsistent
135
--		# the first time, which would cause a monitor to revoke the
136
--		# master score!
137
--		#
138
--		# At least some of our local disks are not really useable.
139
--		# Our peer is not all good either (or some previous case block
140
--		# would have matched).  We have no access to useful data.
141
--		# DRBD would refuse to be promoted, anyways.
142
--		#
143
--		# set_master_score -INFINITY
144
--		# Too bad, at least with current (Oktober 2009) Pacemaker,
145
--		# negative master scores cause instance stop; restart cycle :(
146
--		# Hope that this will suffice.
147
--		remove_master_score
148
--		;;
149
--	*)
150
--		# All local disks seem to be Consistent.
151
--		# They _may_ be up to date, or not.
152
--		# We hope that fencing mechanisms have put constraints in
153
--		# place, so we won't be promoted with stale data.
154
--		# But in case this was a cluster crash,
155
--		# at least allow _someone_ to be promoted.
156
--		set_master_score 5
157
--		;;
158
--	esac
159
--
160
--	return $OCF_SUCCESS
161
--}
162
--
163
- is_drbd_enabled() {
164
- 	test -f /proc/drbd
165
- }
166
-@@ -488,7 +367,103 @@ drbd_status() {
167
- 	return $rc
168
- }
169
- 
170
--# I'm sorry, but there is no $OCF_DEGRADED_MASTER or similar yet.
171
-+drbd_condition() {
172
-+    local status
173
-+    local rc
174
-+
175
-+    status=$1
176
-+    rc=$status
177
-+
178
-+    if [ $status -ne $OCF_SUCCESS -a $status -ne $OCF_RUNNING_MASTER ]
179
-+    then
180
-+        return $rc
181
-+    fi
182
-+
183
-+    drbd_set_status_variables
184
-+
185
-+    ocf_log info "${OCF_RESKEY_drbd_resource} ${DRBD_ROLE_LOCAL}/${DRBD_DSTATE_LOCAL}/${DRBD_DSTATE_REMOTE} ${DRBD_CSTATE}"
186
-+
187
-+    case "${DRBD_DSTATE_LOCAL}" in
188
-+        UpToDate)
189
-+            case "${DRBD_CSTATE}" in
190
-+                StandAlone)
191
-+                    rc=$OCF_DATA_STANDALONE
192
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} standalone, attempting to reconnect."
193
-+                    do_drbdadm connect ${OCF_RESKEY_drbd_resource}
194
-+                    ;;
195
-+                StartingSyncT | WFBitMapT | WFSyncUUID | SyncTarget | \
196
-+                PausedSyncT)
197
-+                    rc=$OCF_DATA_SYNC
198
-+                    #drbd-overview | grep -A 1 drbd-cgcs | grep sync\'ed | cut -f2,3 -d' '
199
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} syncing"
200
-+                    ;;
201
-+                *)
202
-+                    ;;
203
-+             esac
204
-+            ;;
205
-+        Consistent)
206
-+            case "${DRBD_CSTATE}" in
207
-+                StandAlone)
208
-+                    rc=$OCF_DATA_STANDALONE
209
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} standalone, attempting to reconnect"
210
-+                    do_drbdadm connect ${OCF_RESKEY_drbd_resource}
211
-+                    ;;
212
-+                *)
213
-+                    rc=$OCF_DATA_CONSISTENT
214
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} consistent"
215
-+                    ;;
216
-+            esac
217
-+            ;;
218
-+        Outdated)
219
-+            rc=$OCF_DATA_OUTDATED
220
-+            ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
221
-+            ;;
222
-+        *)
223
-+            case "${DRBD_CSTATE}" in
224
-+                StandAlone)
225
-+                    rc=$OCF_DATA_STANDALONE
226
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} standalone"
227
-+                    ;;
228
-+                StartingSyncT | WFBitMapT | WFSyncUUID | SyncTarget | \
229
-+                PausedSyncT)
230
-+                    rc=$OCF_DATA_SYNC
231
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} sync"
232
-+                    ;;
233
-+                *)
234
-+                    rc=$OCF_DATA_INCONSISTENT
235
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} inconsistent"
236
-+                    ;;
237
-+            esac
238
-+            ;;
239
-+    esac
240
-+
241
-+    if [ $status -eq $OCF_RUNNING_MASTER ]
242
-+    then
243
-+        if [ $rc -eq $OCF_DATA_INCONSISTENT ]
244
-+        then
245
-+            rc=$OCF_RUNNING_MASTER_DATA_INCONSISTENT
246
-+
247
-+        elif [ $rc -eq $OCF_DATA_OUTDATED ]
248
-+        then
249
-+            rc=$OCF_RUNNING_MASTER_DATA_OUTDATED
250
-+
251
-+        elif [ $rc -eq $OCF_DATA_CONSISTENT ]
252
-+        then
253
-+            rc=$OCF_RUNNING_MASTER_DATA_CONSISTENT
254
-+
255
-+        elif [ $rc -eq $OCF_DATA_SYNC ]
256
-+        then
257
-+            rc=$OCF_RUNNING_MASTER_DATA_SYNC
258
-+
259
-+        elif [ $rc -eq $OCF_DATA_STANDALONE ]
260
-+        then
261
-+            rc=$OCF_RUNNING_MASTER_DATA_STANDALONE
262
-+        fi
263
-+    fi
264
-+
265
-+    return $rc
266
-+}
267
-+
268
- drbd_monitor() {
269
- 	local status
270
- 
271
-@@ -501,7 +476,8 @@ drbd_monitor() {
272
- 	drbd_status
273
- 	status=$?
274
- 
275
--	drbd_update_master_score
276
-+	drbd_condition $status
277
-+	status=$?
278
- 
279
- 	return $status
280
- }
281
-@@ -578,7 +554,8 @@ drbd_start() {
282
- 			# "running" already, anyways, right?
283
- 			figure_out_drbd_peer_uname
284
- 			do_drbdadm $DRBD_TO_PEER adjust $DRBD_RESOURCE
285
--			rc=$OCF_SUCCESS
286
-+			drbd_condition $OCF_SUCCESS
287
-+            rc=$?
288
- 			break
289
- 			;;
290
- 		$OCF_NOT_RUNNING)
291
-@@ -606,9 +583,6 @@ drbd_start() {
292
- 		$first_try || sleep 1
293
- 		first_try=false
294
- 	done
295
--	# in case someone does not configure monitor,
296
--	# we must at least call it once after start.
297
--	drbd_update_master_score
298
- 
299
- 	return $rc
300
- }
301
-@@ -642,7 +616,8 @@ drbd_promote() {
302
- 			break
303
- 			;;
304
- 		$OCF_RUNNING_MASTER)
305
--			rc=$OCF_SUCCESS
306
-+			drbd_condition $OCF_SUCCESS
307
-+            rc=$?
308
- 			break
309
- 		esac
310
- 		$first_try || sleep 1
311
-@@ -666,7 +641,8 @@ drbd_demote() {
312
- 		status=$?
313
- 		case "$status" in
314
- 		$OCF_SUCCESS)
315
--			rc=$OCF_SUCCESS
316
-+			drbd_condition $OCF_SUCCESS
317
-+            rc=$?
318
- 			break
319
- 			;;
320
- 		$OCF_NOT_RUNNING)
321
-@@ -718,14 +694,9 @@ drbd_stop() {
322
- 	# outdate myself in drbd on-disk meta data.
323
- 	maybe_outdate_self
324
- 
325
--	# do not let old master scores laying around.
326
--	# they may confuse crm if this node was set to standby.
327
--	remove_master_score
328
--
329
- 	return $rc
330
- }
331
- 
332
--
333
- drbd_notify() {
334
- 	local n_type=$OCF_RESKEY_CRM_meta_notify_type
335
- 	local n_op=$OCF_RESKEY_CRM_meta_notify_operation
336
-@@ -760,7 +731,6 @@ drbd_notify() {
337
- 		# After something has been done is a good time to
338
- 		# recheck our status:
339
- 		drbd_set_status_variables
340
--		drbd_update_master_score
341
- 
342
- 		: == DEBUG == ${DRBD_DSTATE_REMOTE[*]} ==
343
- 		case ${DRBD_DSTATE_REMOTE[*]} in
344
-@@ -793,17 +763,6 @@ ls_stat_is_block_maj_147() {
345
- 	[[ $1 = b* ]] && [[ $5 == 147,* ]]
346
- }
347
- 
348
--check_crm_feature_set()
349
--{
350
--	set -- ${OCF_RESKEY_crm_feature_set//[!0-9]/ }
351
--	local a=${1:-0} b=${2:-0} c=${3:-0}
352
--	
353
--	(( a > 3 )) ||
354
--	(( a == 3 && b > 0 )) ||
355
--	(( a == 3 && b == 0 && c > 0 )) ||
356
--	ocf_log warn "You may be disappointed: This RA is intended for pacemaker 1.0 or better!"
357
--}
358
--
359
- drbd_validate_all () {
360
- 	DRBDADM="drbdadm"
361
- 	DRBDSETUP="drbdsetup"
362
-@@ -821,7 +780,6 @@ drbd_validate_all () {
363
- 	if (( $DRBDADM_VERSION_CODE >= 0x080400 )); then
364
- 		DRBD_HAS_MULTI_VOLUME=true
365
- 	fi
366
--	check_crm_feature_set
367
- 
368
- 	# Check clone and M/S options.
369
- 	meta_expect clone-max -le 2
370
-@@ -890,7 +848,6 @@ drbd_validate_all () {
371
- 			# hm. probably misconfigured constraint somewhere.
372
- 			# sorry. don't retry anywhere.
373
- 			ocf_log err "DRBD resource ${DRBD_RESOURCE} not found in configuration file ${OCF_RESKEY_drbdconf}."
374
--			remove_master_score
375
- 			return $OCF_ERR_INSTALLED
376
- 		fi
377
- 	fi
378
---- a/scripts/drbd
379
-+++ b/scripts/drbd
380
-@@ -4,6 +4,7 @@
381
- # description: Loads and unloads the drbd module
382
- #
383
- # Copyright 2001-2010 LINBIT
384
-+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
385
- #
386
- # Philipp Reisner, Lars Ellenberg
387
- #

+ 0
- 132
drbd-tools/centos/patches/0004-drbdadm-ipaddr-change.patch View File

@@ -1,132 +0,0 @@
1
-Index: git/user/drbdadm_adjust.c
2
-===================================================================
3
---- git.orig/user/drbdadm_adjust.c
4
-+++ git/user/drbdadm_adjust.c
5
-@@ -157,6 +157,7 @@ static int opts_equal(struct context_def
6
- static int addr_equal(struct d_resource* conf, struct d_resource* running)
7
- {
8
- 	int equal;
9
-+    char *peer_addr, *peer_af, *peer_port;
10
- 
11
- 	if (conf->peer == NULL && running->peer == NULL) return 1;
12
- 	if (running->peer == NULL) return 0;
13
-@@ -165,16 +166,29 @@ static int addr_equal(struct d_resource*
14
- 		!strcmp(conf->me->port,           running->me->port) &&
15
- 		!strcmp(conf->me->address_family, running->me->address_family);
16
- 
17
--	if(conf->me->proxy)
18
--		equal = equal &&
19
--			!strcmp(conf->me->proxy->inside_addr, running->peer->address) &&
20
--			!strcmp(conf->me->proxy->inside_port, running->peer->port) &&
21
--			!strcmp(conf->me->proxy->inside_af,   running->peer->address_family);
22
--	else
23
--		equal = equal && conf->peer &&
24
--			!strcmp(conf->peer->address,        running->peer->address) &&
25
--			!strcmp(conf->peer->port,           running->peer->port) &&
26
--			!strcmp(conf->peer->address_family, running->peer->address_family);
27
-+       if(conf->me->proxy) {
28
-+               peer_addr = conf->me->proxy->inside_addr;
29
-+               peer_port = conf->me->proxy->inside_port;
30
-+               peer_af = conf->me->proxy->inside_af;
31
-+       } else {
32
-+               peer_addr = conf->peer->address;
33
-+               peer_port = conf->peer->port;
34
-+               peer_af = conf->peer->address_family;
35
-+       }
36
-+
37
-+       equal = equal && conf->peer &&
38
-+               !strcmp(peer_addr, running->peer->address) &&
39
-+               !strcmp(peer_port, running->peer->port) &&
40
-+               !strcmp(peer_af, running->peer->address_family);
41
-+
42
-+       if (verbose > 2)
43
-+               fprintf(stderr, "Network addresses differ:\n"
44
-+                       "\trunning: %s:%s:%s -- %s:%s:%s\n"
45
-+                       "\t config: %s:%s:%s -- %s:%s:%s\n",
46
-+                       running->me->address_family, running->me->address, running->me->port,
47
-+                       running->peer->address_family, running->peer->address, running->peer->port,
48
-+                       conf->me->address_family, conf->me->address, conf->me->port,
49
-+                       peer_af, peer_addr, peer_port);
50
- 
51
- 	return equal;
52
- }
53
-@@ -690,8 +704,7 @@ int adm_adjust(struct cfg_ctx *ctx)
54
- 	if (ctx->res->me->proxy && can_do_proxy)
55
- 		do_connect |= proxy_reconf(ctx, running);
56
- 
57
--	if (do_connect && running)
58
--		do_disconnect = running->net_options != NULL;
59
-+    do_disconnect = do_connect && running && (running->peer || running->net_options);
60
- 
61
- 	if (do_res_options)
62
- 		schedule_deferred_cmd(adm_set_default_res_options, ctx, "resource-options", CFG_RESOURCE);
63
-@@ -716,8 +729,12 @@ int adm_adjust(struct cfg_ctx *ctx)
64
- 	}
65
- 
66
- 	if (do_connect) {
67
--		if (do_disconnect && ctx->res->peer)
68
--			schedule_deferred_cmd(adm_disconnect, ctx, "disconnect", CFG_NET_PREREQ);
69
-+        /* "disconnect" specifying the end-point addresses currently in-use,
70
-+         * before "connect"ing with the addresses currently in-config-file. */
71
-+        if (do_disconnect) {
72
-+                struct cfg_ctx tmp_ctx = { .res = running, .vol = vol, };
73
-+                schedule_deferred_cmd(adm_disconnect, &tmp_ctx, "disconnect", CFG_NET_PREREQ);
74
-+        }
75
- 		schedule_deferred_cmd(adm_connect, ctx, "connect", CFG_NET);
76
- 		do_net_options = 0;
77
- 	}
78
-Index: git/user/legacy/drbdadm_adjust.c
79
-===================================================================
80
---- git.orig/user/legacy/drbdadm_adjust.c
81
-+++ git/user/legacy/drbdadm_adjust.c
82
-@@ -133,6 +133,7 @@ static int opts_equal(struct d_option* c
83
- static int addr_equal(struct d_resource* conf, struct d_resource* running)
84
- {
85
- 	int equal;
86
-+    char *peer_addr, *peer_af, *peer_port;
87
- 
88
- 	if (conf->peer == NULL && running->peer == NULL) return 1;
89
- 	if (running->peer == NULL) return 0;
90
-@@ -141,18 +142,31 @@ static int addr_equal(struct d_resource*
91
- 		!strcmp(conf->me->port,           running->me->port) &&
92
- 		!strcmp(conf->me->address_family, running->me->address_family);
93
- 
94
--	if(conf->me->proxy)
95
--		equal = equal &&
96
--			!strcmp(conf->me->proxy->inside_addr, running->peer->address) &&
97
--			!strcmp(conf->me->proxy->inside_port, running->peer->port) &&
98
--			!strcmp(conf->me->proxy->inside_af,   running->peer->address_family);
99
--	else
100
--		equal = equal && conf->peer &&
101
--			!strcmp(conf->peer->address,        running->peer->address) &&
102
--			!strcmp(conf->peer->port,           running->peer->port) &&
103
--			!strcmp(conf->peer->address_family, running->peer->address_family);
104
-+    if(conf->me->proxy) {
105
-+            peer_addr = conf->me->proxy->inside_addr;
106
-+            peer_port = conf->me->proxy->inside_port;
107
-+            peer_af = conf->me->proxy->inside_af;
108
-+    } else {
109
-+            peer_addr = conf->peer->address;
110
-+            peer_port = conf->peer->port;
111
-+            peer_af = conf->peer->address_family;
112
-+    }
113
-+
114
-+    equal = equal && conf->peer &&
115
-+            !strcmp(peer_addr, running->peer->address) &&
116
-+            !strcmp(peer_port, running->peer->port) &&
117
-+            !strcmp(peer_af, running->peer->address_family);
118
-+
119
-+    if (verbose > 2)
120
-+            fprintf(stderr, "Network addresses differ:\n"
121
-+                    "\trunning: %s:%s:%s -- %s:%s:%s\n"
122
-+                    "\t config: %s:%s:%s -- %s:%s:%s\n",
123
-+                    running->me->address_family, running->me->address, running->me->port,
124
-+                    running->peer->address_family, running->peer->address, running->peer->port,
125
-+                    conf->me->address_family, conf->me->address, conf->me->port,
126
-+                    peer_af, peer_addr, peer_port);
127
- 
128
--	return equal;
129
-+    return equal;
130
- }
131
- 
132
- static int proto_equal(struct d_resource* conf, struct d_resource* running)

+ 0
- 34
drbd-tools/centos/patches/0005-drbd_reconnect_standby_standalone.patch View File

@@ -1,34 +0,0 @@
1
-Index: git/scripts/drbd.ocf
2
-===================================================================
3
---- git.orig/scripts/drbd.ocf
4
-+++ git/scripts/drbd.ocf
5
-@@ -418,6 +418,29 @@ drbd_condition() {
6
-             rc=$OCF_DATA_OUTDATED
7
-             ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
8
-             ;;
9
-+        Inconsistent)
10
-+            case "${DRBD_CSTATE}" in
11
-+                StandAlone)
12
-+                    rc=$OCF_DATA_STANDALONE
13
-+                    if [ $status -eq $OCF_SUCCESS ]
14
-+                    then
15
-+                        ocf_log info "${OCF_RESKEY_drbd_resource} standby standalone, attempting to reconnect."
16
-+                        do_drbdadm connect ${OCF_RESKEY_drbd_resource}
17
-+                    else
18
-+                        ocf_log info "${OCF_RESKEY_drbd_resource} standalone"
19
-+                    fi
20
-+                    ;;
21
-+                StartingSyncT | WFBitMapT | WFSyncUUID | SyncTarget | \
22
-+                PausedSyncT)
23
-+                    rc=$OCF_DATA_SYNC
24
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} sync"
25
-+                    ;;
26
-+                *)
27
-+                    rc=$OCF_DATA_INCONSISTENT
28
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} inconsistent"
29
-+                    ;;
30
-+            esac
31
-+            ;;
32
-         *)
33
-             case "${DRBD_CSTATE}" in
34
-                 StandAlone)

+ 0
- 54
drbd-tools/centos/patches/0006-avoid-kernel-userspace-version-check.patch View File

@@ -1,55 +0,0 @@
1
-From ea19e3020367cfaf6da20dd690433ee72a24120c Mon Sep 17 00:00:00 2001
2
-From: Don Penney <don.penney@windriver.com>
3
-Date: Mon, 2 May 2016 15:17:54 -0400
4
-Subject: [PATCH 1/1] Avoid kernel/userspace version check
5
-
6
----
7
- user/drbdadm_usage_cnt.c | 32 +-------------------------------
8
- 1 file changed, 1 insertion(+), 31 deletions(-)
9
-
10
-diff --git a/user/drbdadm_usage_cnt.c b/user/drbdadm_usage_cnt.c
11
-index ff6d5c8..c6cb4ad 100644
12
---- a/user/drbdadm_usage_cnt.c
13
-+++ b/user/drbdadm_usage_cnt.c
14
-@@ -244,37 +244,7 @@ static int vcs_ver_cmp(struct vcs_rel *rev1, struct vcs_rel *rev2)
15
- 
16
- void warn_on_version_mismatch(void)
17
- {
18
--	char *msg;
19
--	int cmp;
20
--
21
--	/* get the kernel module version from /proc/drbd */
22
--	vcs_get_current();
23
--
24
--	/* get the userland version from REL_VERSION */
25
--	vcs_get_userland();
26
--
27
--	cmp = vcs_ver_cmp(&userland_version, &current_vcs_rel);
28
--	/* no message if equal */
29
--	if (cmp == 0)
30
--		return;
31
--	if (cmp > 0xffff || cmp < -0xffff)	 /* major version differs! */
32
--		msg = "mixing different major numbers will not work!";
33
--	else if (cmp < 0)		/* userland is older. always warn. */
34
--		msg = "you should upgrade your drbd tools!";
35
--	else if (cmp & 0xff00)		/* userland is newer minor version */
36
--		msg = "please don't mix different DRBD series.";
37
--	else		/* userland is newer, but only differ in sublevel. */
38
--		msg = "preferably kernel and userland versions should match.";
39
--
40
--	fprintf(stderr, "DRBD module version: %u.%u.%u\n"
41
--			"   userland version: %u.%u.%u\n%s\n",
42
--			current_vcs_rel.version.major,
43
--			current_vcs_rel.version.minor,
44
--			current_vcs_rel.version.sublvl,
45
--			userland_version.version.major,
46
--			userland_version.version.minor,
47
--			userland_version.version.sublvl,
48
--			msg);
49
-+	return;
50
- }
51
- 
52
- void add_lib_drbd_to_path(void)
53
-1.8.3.1
54
-

+ 0
- 39
drbd-tools/centos/patches/0007-Update-OCF-to-attempt-connect-in-certain-states.patch View File

@@ -1,40 +0,0 @@
1
-From 5677e262d5b3f5ecc114f1aace4ffd77a7772282 Mon Sep 17 00:00:00 2001
2
-From: Don Penney <don.penney@windriver.com>
3
-Date: Tue, 21 Feb 2017 12:37:02 -0500
4
-Subject: [PATCH] Update OCF to attempt connect in certain states
5
-
6
----
7
- scripts/drbd.ocf | 17 +++++++++++++++--
8
- 1 file changed, 15 insertions(+), 2 deletions(-)
9
-
10
-diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
11
-index 0e26ea9..84332b0 100644
12
---- a/scripts/drbd.ocf
13
-+++ b/scripts/drbd.ocf
14
-@@ -415,8 +415,21 @@ drbd_condition() {
15
-             esac
16
-             ;;
17
-         Outdated)
18
--            rc=$OCF_DATA_OUTDATED
19
--            ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
20
-+            case "${DRBD_CSTATE}" in
21
-+                StandAlone)
22
-+                    rc=$OCF_DATA_STANDALONE
23
-+                    if [ $status -eq $OCF_SUCCESS ]
24
-+                    then
25
-+                        ocf_log info "${OCF_RESKEY_drbd_resource} outdated standalone, attempting to reconnect."
26
-+                        do_drbdadm -- --discard-my-data connect ${OCF_RESKEY_drbd_resource}
27
-+                    else
28
-+                        ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
29
-+                    fi
30
-+                    ;;
31
-+                *)
32
-+                    rc=$OCF_DATA_OUTDATED
33
-+                    ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
34
-+            esac
35
-             ;;
36
-         Inconsistent)
37
-             case "${DRBD_CSTATE}" in
38
-1.8.3.1
39
-

+ 0
- 24
drbd-tools/centos/patches/0008-Increase-short-cmd-timeout-to-15-secs.patch View File

@@ -1,25 +0,0 @@
1
-From 100b44d99b0bcbac92abd2122becbfd88d155e09 Mon Sep 17 00:00:00 2001
2
-From: Don Penney <don.penney@windriver.com>
3
-Date: Wed, 22 Nov 2017 20:45:28 -0500
4
-Subject: [PATCH] Increase short cmd timeout to 15 secs
5
-
6
----
7
- user/drbdadm_main.c | 2 +-
8
- 1 file changed, 1 insertion(+), 1 deletion(-)
9
-
10
-diff --git a/user/drbdadm_main.c b/user/drbdadm_main.c
11
-index b89e91a..19c5a44 100644
12
---- a/user/drbdadm_main.c
13
-+++ b/user/drbdadm_main.c
14
-@@ -1467,7 +1467,7 @@ void m__system(char **argv, int flags, const char *res_name, pid_t *kid, int *fd
15
- 		alarm_raised = 0;
16
- 		switch (flags & SLEEPS_MASK) {
17
- 		case SLEEPS_SHORT:
18
--			timeout = 5;
19
-+			timeout = 15;
20
- 			break;
21
- 		case SLEEPS_LONG:
22
- 			timeout = COMM_TIMEOUT + 1;
23
-1.8.3.1
24
-

Loading…
Cancel
Save