* [Cluster-devel] conga/ricci/modules/cluster/clumon/src/common ...
@ 2007-10-10 18:19 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2007-10-10 18:19 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-10-10 18:19:30
Modified files:
ricci/modules/cluster/clumon/src/common: Cluster.cpp
Log message:
Rest of fix for 326571
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/common/Cluster.cpp.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.6.4.1&r2=1.6.4.2
--- conga/ricci/modules/cluster/clumon/src/common/Cluster.cpp 2007/10/10 18:10:37 1.6.4.1
+++ conga/ricci/modules/cluster/clumon/src/common/Cluster.cpp 2007/10/10 18:19:30 1.6.4.2
@@ -69,36 +69,20 @@
unsigned int
Cluster::votes()
{
- cman_handle_t ch = cman_init(NULL);
- if (ch != NULL) {
- cman_node_t this_node;
- int ret;
+ FILE *fp;
- ret = cman_get_node(ch, CMAN_NODEID_US, &this_node);
- cman_finish(ch);
- if (ret == 0) {
- FILE *fp = fopen("/proc/cluster/nodes", "r");
- if (fp != NULL) {
- char buf[4096];
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- int nodeid = -1;
- int votes = -1;
-
- if (!strncmp("Node", buf, 4)) {
- /* header */
- continue;
- }
- ret = sscanf(buf, "%d %d %*d %*c %*s\n", &nodeid, &votes);
- if (ret != 2)
- continue;
- if (nodeid == this_node.cn_nodeid) {
- fclose(fp);
- return (votes);
- }
- }
+ fp = fopen("/proc/cluster/status", "r");
+ if (fp != NULL) {
+ char buf[4096];
+ int votes = -1;
+
+ while (fgets(buf, sizeof(buf), fp) != NULL) {
+ if (sscanf(buf, "Total_votes: %d\n", &votes) == 1) {
fclose(fp);
+ return (votes);
}
}
+ fclose(fp);
}
unsigned int votes = 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] conga/ricci/modules/cluster/clumon/src/common ...
@ 2008-07-03 14:55 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2008-07-03 14:55 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2008-07-03 14:55:52
Modified files:
ricci/modules/cluster/clumon/src/common: ClusterMonitor.cpp
Log message:
Fix bz453600
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/common/ClusterMonitor.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.2&r2=1.2.2.3
--- conga/ricci/modules/cluster/clumon/src/common/ClusterMonitor.cpp 2008/01/17 17:38:38 1.2.2.2
+++ conga/ricci/modules/cluster/clumon/src/common/ClusterMonitor.cpp 2008/07/03 14:55:51 1.2.2.3
@@ -42,6 +42,8 @@
try {
ClientSocket sock(_sock_path);
+ sock.nonblocking(true);
+
if(sock.send("GET").size())
throw int();
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] conga/ricci/modules/cluster/clumon/src/common ...
@ 2008-07-03 14:58 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2008-07-03 14:58 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2008-07-03 14:58:12
Modified files:
ricci/modules/cluster/clumon/src/common: ClusterMonitor.cpp
Log message:
Fix a bug that caused cluster-snmp to hang snmpd
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/common/ClusterMonitor.cpp.diff?cvsroot=cluster&r1=1.6&r2=1.7
--- conga/ricci/modules/cluster/clumon/src/common/ClusterMonitor.cpp 2008/01/02 20:47:36 1.6
+++ conga/ricci/modules/cluster/clumon/src/common/ClusterMonitor.cpp 2008/07/03 14:58:12 1.7
@@ -42,6 +42,8 @@
try {
ClientSocket sock(_sock_path);
+ sock.nonblocking(true);
+
if(sock.send("GET").size())
throw int();
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-03 14:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10 18:19 [Cluster-devel] conga/ricci/modules/cluster/clumon/src/common rmccabe
-- strict thread matches above, loose matches on Subject: below --
2008-07-03 14:55 rmccabe
2008-07-03 14:58 rmccabe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).