cluster/cman qdisk/score.c qdisk/disk.h qdisk/ ...
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh at sourceware.org 2007-02-21 20:22:54
Modified files:
cman/qdisk : score.c disk.h score.h main.c cman/man : qdisk.5 qdiskd.8 cman/init.d : qdiskd
Log message:
Resolves: 229338
* Makes zero-heuristic mode work (#229338)
General (small) fixes:
* Add time stamp to status file
* Hush stdout/stderr from init script
* Give lots of information in status file if debug mode is enabled
Fixes for clusters with long failover times (e.g. 2+ minutes):
* Enable status file generation during initialization loop
* Allow termination (e.g. service qdiskd stop) during initialization loop
* Add tunables for clusters with long failure detection times (e.g. 2+ minutes)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/score.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.4.1&r2=1.2.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.2&r2=1.4.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/score.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.4.1&r2=1.2.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.4&r2=1.4.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/man/qdisk.5.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.2&r2=1.3.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/man/qdiskd.8.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/init.d/qdiskd.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.4.1
cman/qdisk/score.c +15 -0
@@ -143,6 +143,7 @@ *score =0 ; *maxscore =0 ; +printf ("max = %d\n" , max);/* Allow operation w/o any heuristics */ if (!max) { *score = *maxscore =1 ;
@@ -332,6 +333,20 @@/** +Call this if no heuristics are set to run in master-wins mode +*/ +int +fudge_scoring (void ) +{ +pthread_mutex_lock (&sc_lock); + _score = _maxscore =1 ; +pthread_mutex_unlock (&sc_lock); + +return 0 ; +} + + +/** Loop for the scoring thread. */ void *
cman/qdisk/disk.h +4 -0
@@ -240,6 +240,9 @@int qc_writes;int qc_interval;int qc_tko; +int qc_tko_up; +int qc_upgrade_wait; +int qc_master_wait;int qc_votes;int qc_scoremin;int qc_sched;
@@ -247,6 +250,7 @@disk_node_state_t qc_disk_status;disk_node_state_t qc_status;int qc_master;/* Master?! */ +int _pad_;run_flag_t qc_flags;cman_handle_t qc_ch;char *qc_device;
cman/qdisk/score.h +7 -0
@@ -59,4 +59,11 @@*/ int get_my_score (int *score,int *maxscore); +/* +Set score + maxscore to 1. Call if no heuristics are present +to enable master-wins mode +*/ +int fudge_scoring (void ); + +#endif
cman/qdisk/main.c +130 -22
299 lines not on this page · raw message
cman/man/qdisk.5 +22 -2
@@ -1,4 +1,4 @@ -.TH "QDisk" "21" "Jan 2007" "" "Cluster Quorum Disk" +.TH "QDisk" "5" "20 Feb 2007" "" "Cluster Quorum Disk" .SH "NAME" QDisk 1.2 \- a disk-based quorum daemon for CMAN / Linux-Cluster .SH "1. Overview"
@@ -205,7 +205,7 @@ .in 9 \fIinterval\fP\fB="\fP1\fB"\fP .in 12 -This is the frequency of read/write cycles +This is the frequency of read/write cycles, in seconds. .in 9 \fItko\fP\fB="\fP10\fB"\fP
@@ -213,6 +213,26 @@ This is the number of cycles a node must miss in order to be declared dead. .in 9 +\fItko_up\fP\fB="\fPX\fB"\fP +.in 12 +This is the number of cycles a node must be seen in order to be declared +online. Default is \fBfloor(tko/2)\fP. + +.in 9 +\fIupgrade_wait\fP\fB="\fP2\fB"\fP +.in 12 +This is the number of cycles a node must wait before initiating a bid +for master status after heuristic scoring becomes sufficient. The +default is 2. This can not be set to 0, and should not exceed \fBtko\fP. + +.in 9 +\fImaster_wait\fP\fB="\fPX\fB"\fP +.in 12 +This is the number of cycles a node must wait for votes before declaring +itself master after making a bid. Default is \fBfloor(tko/3)\fP. +This can not be less than 2 and should not exceed \fBtko\fP. + +.in 9 \fIvotes\fP\fB="\fP3\fB"\fP .in 12 This is the number of votes the quorum daemon advertises to CMAN when it
cman/man/qdiskd.8 +5 -0
@@ -15,6 +15,11 @@ Run in the foreground (do not fork / daemonize). .IP "\-d" Enable debug output. +.IP "\-Q" +Close stdin/out/err immediately before doing validations. This +is primarily for use when being called from an init script. Using +this option will stop all output, and can not be used with the -d +option. .SH "SEE ALSO" mkqdisk(8), qdisk(5), cman(5)
cman/init.d/qdiskd +1 -1
@@ -19,7 +19,7 @@ # See how we were called. case "$1" in start) - action "Starting the Quorum Disk Daemon:" qdiskd + action "Starting the Quorum Disk Daemon:" qdiskd -Q rtrn=$? [ $rtrn = 0 ] && touch $LOCK_FILE ;;