public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: pcaulfield@sourceware.org
To: lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvmd-cman.c
Date: Thu, 24 Aug 2006 12:45:00 -0000 [thread overview]
Message-ID: <20060824124506.26553.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: pcaulfield@sourceware.org 2006-08-24 12:45:05
Modified files:
. : WHATS_NEW
daemons/clvmd : clvmd-cman.c
Log message:
Stop clvmd complaining about nodes that have left the cluster
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.430&r2=1.431
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-cman.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14
--- LVM2/WHATS_NEW 2006/08/21 12:54:51 1.430
+++ LVM2/WHATS_NEW 2006/08/24 12:45:04 1.431
@@ -5,6 +5,7 @@
Add mirror options to man pages.
Prevent mirror renames.
Move CMDLIB code into separate file and record whether static build.
+ Stop clvmd complaining about nodes that have left the cluster
Version 2.02.09 - 17th August 2006
==================================
--- LVM2/daemons/clvmd/clvmd-cman.c 2006/03/21 10:31:08 1.13
+++ LVM2/daemons/clvmd/clvmd-cman.c 2006/08/24 12:45:05 1.14
@@ -137,7 +137,7 @@
if (cman_send_data(c_handle, buf, msglen, 0, CLUSTER_PORT_CLVMD, nodeid) <= 0)
{
- log_error(errtext);
+ log_error(errtext);
}
return msglen;
}
@@ -152,16 +152,18 @@
/* Call a callback routine for each node is that known (down means not running a clvmd) */
static int _cluster_do_node_callback(struct local_client *client,
- void (*callback) (struct local_client *, char *,
- int))
+ void (*callback) (struct local_client *, char *,
+ int))
{
int i;
int somedown = 0;
for (i = 0; i < _get_num_nodes(); i++) {
- callback(client, (char *)&nodes[i].cn_nodeid, node_updown[nodes[i].cn_nodeid]);
- if (!node_updown[nodes[i].cn_nodeid])
- somedown = -1;
+ if (nodes[i].cn_member) {
+ callback(client, (char *)&nodes[i].cn_nodeid, node_updown[nodes[i].cn_nodeid]);
+ if (!node_updown[nodes[i].cn_nodeid])
+ somedown = -1;
+ }
}
return somedown;
}
@@ -205,7 +207,7 @@
static struct local_client *cman_client;
static int _cluster_fd_callback(struct local_client *fd, char *buf, int len, char *csid,
- struct local_client **new_client)
+ struct local_client **new_client)
{
/* Save this for data_callback */
@@ -243,7 +245,7 @@
max_updown_nodes);
} else {
log_error
- ("Realloc failed. Node status for clvmd will be wrong. quitting\n");
+ ("Realloc failed. Node status for clvmd will be wrong. quitting\n");
exit(999);
}
}
@@ -297,35 +299,36 @@
return;
}
- /* Not enough room for new nodes list ? */
- if (num_nodes > count_nodes && nodes) {
- free(nodes);
- nodes = NULL;
- }
+ /* Not enough room for new nodes list ? */
+ if (num_nodes > count_nodes && nodes) {
+ free(nodes);
+ nodes = NULL;
+ }
- if (nodes == NULL) {
- count_nodes = num_nodes + 10; /* Overallocate a little */
+ if (nodes == NULL) {
+ count_nodes = num_nodes + 10; /* Overallocate a little */
nodes = malloc(count_nodes * sizeof(struct cman_node));
- if (!nodes) {
- log_error("Unable to allocate nodes array\n");
- exit(5);
- }
+ if (!nodes) {
+ log_error("Unable to allocate nodes array\n");
+ exit(5);
}
+ }
status = cman_get_nodes(c_handle, count_nodes, &retnodes, nodes);
if (status < 0) {
- log_error("Unable to get node details");
- exit(6);
- }
+ log_error("Unable to get node details");
+ exit(6);
+ }
- if (node_updown == NULL) {
- node_updown =
- (int *) malloc(sizeof(int) *
- max(num_nodes, max_updown_nodes));
- memset(node_updown, 0,
- sizeof(int) * max(num_nodes, max_updown_nodes));
- }
+ if (node_updown == NULL) {
+ node_updown =
+ (int *) malloc(sizeof(int) *
+ max(num_nodes, max_updown_nodes));
+ memset(node_updown, 0,
+ sizeof(int) * max(num_nodes, max_updown_nodes));
}
+}
+
/* Convert a node name to a CSID */
static int _csid_from_name(char *csid, char *name)
next reply other threads:[~2006-08-24 12:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-24 12:45 pcaulfield [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-05-09 7:20 ccaulfield
2008-04-01 15:01 ccaulfield
2008-03-25 10:42 ccaulfield
2007-05-02 8:23 pcaulfield
2007-04-23 14:55 pcaulfield
2006-10-06 10:06 pcaulfield
2006-03-21 10:31 pcaulfield
2005-01-26 9:30 pcaulfield
2004-09-30 14:18 pcaulfield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060824124506.26553.qmail@sourceware.org \
--to=pcaulfield@sourceware.org \
--cc=lvm2-cvs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).