@@ -305,3 +305,79 @@ Feature: configure sbd delay start correctly
305305 And Property "priority" in "rsc_defaults" is "0"
306306 And Cluster property "priority-fencing-delay" is "0"
307307 And Parameter "pcmk_delay_max" not configured in "stonith-sbd"
308+
309+ @clean
310+ Scenario : Check and fix sbd-related timeout values for disk-based sbd
311+ Given Cluster service is "stopped" on "hanode1"
312+ Given Cluster service is "stopped" on "hanode2"
313+ When Run "crm cluster init -y" on "hanode1"
314+ Then Cluster service is "started" on "hanode1"
315+ When Run "crm cluster join -c hanode1 -y" on "hanode2"
316+ Then Cluster service is "started" on "hanode2"
317+ When Run "crm cluster init sbd -s /dev/sda1 -y" on "hanode1"
318+ Then Service "sbd" is "started" on "hanode1"
319+ And Service "sbd" is "started" on "hanode2"
320+ # check /etc/sysconf/sbd consistency
321+ When Run "sed -i 's/SBD_DELAY_START=.*/SBD_DELAY_START=" no"/' /etc/sysconfig/sbd" on "hanode2"
322+ When Try "crm sbd configure show"
323+ Then Expected "/etc/sysconfig/sbd is not consistent across cluster nodes" in stderr
324+ When Try "crm cluster health sbd"
325+ Then Expected "/etc/sysconfig/sbd is not consistent across cluster nodes" in stderr
326+ When Run "sed -i 's/SBD_DELAY_START=.*/SBD_DELAY_START=71/' /etc/sysconfig/sbd" on "hanode2"
327+ When Run "crm cluster health sbd" on "hanode1"
328+ Then Expected "SBD: Check sbd timeout configuration: OK" in stdout
329+ # check sbd disk metadata
330+ When Run "sbd -1 15 -4 16 -d /dev/sda1 create" on "hanode1"
331+ When Try "crm sbd configur show disk_metadata" on "hanode1"
332+ Then Expected "It's recommended that msgwait(now 16) >= 2*watchdog timeout(now 15)" in stderr
333+ When Try "crm cluster health sbd" on "hanode1"
334+ Then Expected "It's recommended that msgwait(now 16) >= 2*watchdog timeout(now 15)" in stderr
335+ When Run "crm cluster health sbd --fix" on "hanode1"
336+ Then Expected "SBD: Check sbd timeout configuration: OK" in stdout
337+ # check SBD_DELAY_START
338+ When Run "sed -i 's/SBD_DELAY_START=.*/SBD_DELAY_START=40/' /etc/sysconfig/sbd" on "hanode1"
339+ When Run "sed -i 's/SBD_DELAY_START=.*/SBD_DELAY_START=40/' /etc/sysconfig/sbd" on "hanode2"
340+ When Try "crm sbd configure show" on "hanode1"
341+ Then Expected "It's recommended that SBD_DELAY_START is set to 71, now is 40" in stderr
342+ When Try "crm cluster health sbd" on "hanode1"
343+ Then Expected "It's recommended that SBD_DELAY_START is set to 71, now is 40" in stderr
344+ When Run "crm cluster health sbd --fix" on "hanode1"
345+ Then Expected "SBD: Check sbd timeout configuration: OK" in stdout
346+ # check stonith-timeout
347+ When Run "crm configure property stonith-timeout=50" on "hanode1"
348+ When Try "crm sbd configure show" on "hanode1"
349+ Then Expected "It's recommended that stonith-timeout is set to 71, now is 50" in stderr
350+ When Try "crm cluster health sbd" on "hanode1"
351+ Then Expected "It's recommended that stonith-timeout is set to 71, now is 50" in stderr
352+ When Run "crm cluster health sbd --fix" on "hanode1"
353+ Then Expected "SBD: Check sbd timeout configuration: OK" in stdout
354+ # Adjust token timeout in corosync.conf
355+ When Run "sed -i 's/token: .*/token: 10000/' /etc/corosync/corosync.conf" on "hanode1"
356+ When Run "sed -i 's/token: .*/token: 10000/' /etc/corosync/corosync.conf" on "hanode2"
357+ When Run "corosync-cfgtool -R" on "hanode1"
358+ When Try "crm sbd configure show" on "hanode1"
359+ Then Expected "It's recommended that SBD_DELAY_START is set to 82, now is 71" in stderr
360+ When Try "crm cluster health sbd" on "hanode1"
361+ Then Expected "It's recommended that SBD_DELAY_START is set to 82, now is 71" in stderr
362+ When Run "crm cluster health sbd --fix" on "hanode1"
363+ Then Expected "SBD: Check sbd timeout configuration: OK" in stdout
364+
365+ @clean
366+ Scenario : Check and fix sbd-related timeout values for diskless sbd
367+ Given Cluster service is "stopped" on "hanode1"
368+ Given Cluster service is "stopped" on "hanode2"
369+ When Run "crm cluster init -y" on "hanode1"
370+ Then Cluster service is "started" on "hanode1"
371+ When Run "crm cluster join -c hanode1 -y" on "hanode2"
372+ Then Cluster service is "started" on "hanode2"
373+ When Run "crm cluster init sbd -S -y" on "hanode1"
374+ Then Service "sbd" is "started" on "hanode1"
375+ And Service "sbd" is "started" on "hanode2"
376+ # Delete stonith-watchdog-timeout
377+ When Delete property "stonith-watchdog-timeout" from cluster
378+ When Try "crm sbd configure show" on "hanode1"
379+ Then Expected "It's recommended that stonith-watchdog-timeout is set to 30, now is not set" in stderr
380+ When Try "crm cluster health sbd" on "hanode1"
381+ Then Expected "It's recommended that stonith-watchdog-timeout is set to 30, now is not set" in stderr
382+ When Run "crm cluster health sbd --fix" on "hanode1"
383+ Then Expected "SBD: Check sbd timeout configuration: OK" in stdout
0 commit comments