cluster/cman qdisk/score.h qdisk/score.c qdisk ...
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh at sourceware.org 2007-01-22 22:50:12
Modified files:
cman/qdisk : score.h score.c Makefile main.c disk.h clulog.c
cman/man : qdisk.5 mkqdisk.8
Added files:
cman/qdisk : daemon_init.c
Log message:
Resolves bugzillas: #213533, #216092, #220211, #223002, #223234/#223240
Detailed comments:
* Lock in memory to prevent being swapped out
* Turn on RR scheduling for main + score threads
* Let qdiskd wait for CMAN to start
* Add option to qdiskd to stop CMAN if qdisk device is not available
* Make qdisk interval timings more accurate
* Add option to reboot node if qdiskd detects internal hang > failure time (e.g. interval*tko, in seconds)
* Add per-heuristic tko counts for unreliable heuristics (e.g. ping packets)
* Remove nodes from quorate mask immediately on eviction
* Update man pages with better examples
* Don't let >1 instance of qdiskd be started
* Clarify logging output.
* Improve data in status_file.
* Allow qdiskd to run with no defined heuristics (master-always-wins mode).
* Make fencing of nodes optional (default = on).
* Make sure CMAN is running before we try to talk to it at each point.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/daemon_init.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/score.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.4.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/score.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.4.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.6&r2=1.6.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.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/disk.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4&r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/clulog.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.4.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/man/qdisk.5.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/man/mkqdisk.8.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.6.1
cman/qdisk/score.h +3 -1
@@ -32,7 +32,9 @@char * program;int score;int available; +int tko;int interval; +int misses;pid_t childpid;time_t nextrun; };
@@ -50,7 +52,7 @@/* Start the thread which runs the scoring applets */ -int start_score_thread (struct h_data *h,int count); +int start_score_thread (qd_ctx *ctx,struct h_data *h,int count);/* Get our score + maxscore
cman/qdisk/score.c +83 -10
168 lines not on this page · raw message
cman/qdisk/Makefile +1 -1
@@ -28,7 +28,7 @@ install ${TARGET} ${sbindir} qdiskd: disk.o crc32.o disk_util.o main.o score.o bitmap.o clulog.o \ - gettid.o proc.o ../lib/libcman.a + gettid.o proc.o daemon_init.o ../lib/libcman.a gcc -o $@ $^ -lpthread -L../lib -L${ccslibdir} -lccs mkqdisk: disk.o crc32.o disk_util.o \
cman/qdisk/main.c +420 -47
736 lines not on this page · raw message
cman/qdisk/disk.h +7 -1
@@ -67,7 +67,11 @@typedef enum { -RF_REBOOT =0x1 /* Reboot if we go from master->none */ +RF_REBOOT =0x1 ,/* Reboot if we go from master->none */ +RF_STOP_CMAN =0x2 , +RF_DEBUG =0x4 , +RF_PARANOID =0x8 , +RF_ALLOW_KILL =0x10 }run_flag_t ;
@@ -237,6 +241,8 @@int qc_tko;int qc_votes;int qc_scoremin; +int qc_sched; +int qc_sched_prio;disk_node_state_t qc_disk_status;disk_node_state_t qc_status;int qc_master;/* Master?! */
cman/qdisk/clulog.c +1 -6
@@ -20,8 +20,6 @@/** @file * Library routines for communicating with the logging daemon. * -* $Id: clulog.c,v 1.2 2006/05/19 14:41:35 lhh Exp $ -* * Author: Jeff Moyer <[email protected]> */ #include <stdio.h>
@@ -50,8 +48,6 @@#include <string.h> -static const char *version __attribute__ ((unused)) = "$Revision: 1.2 $"; -#ifdef DEBUG #include <assert.h> #define Dprintf(fmt,args...) printf(fmt,##args)
@@ -135,7 +131,7 @@ }pthread_mutex_unlock (&log_mutex); -return "local4" ; +return "daemon" ; }
@@ -156,7 +152,6 @@for (; facilitynames[x].c_name; x++) {if (strcmp (facilityname, facilitynames[x].c_name))continue ; - syslog_facility = facilitynames[x].c_val;break ; }
cman/man/qdisk.5 +116 -17
207 lines not on this page · raw message
cman/man/mkqdisk.8 +8 -3
@@ -13,11 +13,16 @@ .IP "\-c device \-l label" Initialize a new cluster quorum disk. This will destroy all data on the given device. If a cluster is currently using that device as a quorum disk, the -entire cluster will malfunction. Do not ru +entire cluster will malfunction. Do not run this on an active cluster when +qdiskd is running. Only one device on the SAN should ever have the given +label; using multiple different devices is currently not supported (it is +expected a RAID array is used for quorum disk redundancy). The label can be +any textual string up to 127 characters - and is therefore enough space to hold +a UUID created with uuidgen(1). .IP "\-f label" -Find the cluster quorum disk with the given label and display information about it.. +Find the cluster quorum disk with the given label and display information about it. .IP "\-L" Display information on all accessible cluster quorum disks. .SH "SEE ALSO" -qdisk(5) qdiskd(8) +qdisk(5), qdiskd(8), uuidgen(1)