From: Lon Hohberger <lhh@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] Don't show offline + estranged members
Date: Wed, 06 Feb 2008 14:46:10 -0500 [thread overview]
Message-ID: <1202327170.21504.79.camel@ayanami.boston.devel.redhat.com> (raw)
In-Reply-To: <663105.26031202325901042.JavaMail.root@ottmail>
This patch prevents the 'clustat' utility from showing members which:
* are not part of the configuration, and
* offline/dead/etc.
-- Lon
Index: clustat.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/utils/clustat.c,v
retrieving revision 1.38
diff -u -r1.38 clustat.c
--- clustat.c 10 Dec 2007 18:11:56 -0000 1.38
+++ clustat.c 6 Feb 2008 19:34:35 -0000
@@ -719,6 +719,10 @@
void
txt_member_state(cman_node_t *node, int nodesize)
{
+ /* If it's down and not in cluster.conf, don't show it */
+ if ((node->cn_member & (FLAG_NOCFG | FLAG_UP)) == FLAG_NOCFG)
+ return;
+
printf(" %-*.*s ", nodesize, nodesize, node->cn_name);
printf("%4d ", node->cn_nodeid);
@@ -754,6 +758,10 @@
void
xml_member_state(cman_node_t *node)
{
+ /* If it's down and not in cluster.conf, don't show it */
+ if ((node->cn_member & (FLAG_NOCFG | FLAG_UP)) == FLAG_NOCFG)
+ return;
+
printf(" <node name=\"%s\" state=\"%d\" local=\"%d\" "
"estranged=\"%d\" rgmanager=\"%d\" rgmanager_master=\"%d\" "
"qdisk=\"%d\" nodeid=\"0x%08x\"/>\n",
parent reply other threads:[~2008-02-06 19:46 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <663105.26031202325901042.JavaMail.root@ottmail>]
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=1202327170.21504.79.camel@ayanami.boston.devel.redhat.com \
--to=lhh@redhat.com \
/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 NNTP newsgroup(s).