Red Hat Bugzilla – Bug 960993
[sanlock] Monitor and report the lockspace hosts liveness
Last modified: 2013-11-21 06:48:51 EST
Description of problem: Sanlock should provide a way to monitor and report the lockspace hosts liveness. Additional info: An initial analysis has been made and it looks like the new C API will be sanlock_get_hosts which will return a list of active hosts with their status, e.g. alive, failing (killing the pids but not fenced by the watchdog yet), dead. The python bindings will expose the same functionality with a function named get_hosts (sanlock module).
Here is a sequence of commands to test the capability without the need for a separate test program. It uses a shared vg "test" with a shared lv "test". host1,2: service wdmd start host1,2: service sanlock start host1: lvcreate -n test -L1G test sanlock client init -s test:0:/dev/test/test:0 host1: sanlock client add_lockspace -s test:1:/dev/test/test:0 host2: sanlock client add_lockspace -s test:2:/dev/test/test:0 host1: sanlock gets -h 1 s test:1:/dev/test/test:0 h 1 gen 1 timestamp 1137100 LIVE h 2 gen 1 timestamp 1136975 LIVE (Note: exact timestamps will of course vary.) host2: sanlock gets -h 1 s test:1:/dev/test/test:0 h 1 gen 1 timestamp 1137100 LIVE h 2 gen 1 timestamp 1136975 LIVE host2: killall -9 sanlock Continue monitoring host2 from host1 by running sanlock gets. After 80 seconds, host2 should appear in the FAIL state. After 140 seconds, host2 should appear in the DEAD state. host1: sanlock gets -h 1 s test:1:/dev/test/test:0 h 1 gen 1 timestamp 1137573 LIVE h 2 gen 1 timestamp 1137373 FAIL host1: sanlock gets -h 1 s test:1:/dev/test/test:0 h 1 gen 1 timestamp 1137634 LIVE h 2 gen 1 timestamp 1137373 DEAD
sanlock-2.8-1.el6.x86_64, tested according to comment #2.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1632.html