cluster: RHEL6 - rgmanager: Make clustat -f not query CCS/objdb

Fabio M. Di Nitto fabbione at fedoraproject.org
Fri May 27 06:01:57 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c614d2337c2a94b31bc672f70c45df6fbfe65640
Commit:        c614d2337c2a94b31bc672f70c45df6fbfe65640
Parent:        56c104a110e1a716d32d5fab8d1d811e401279f5
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Tue Jul 6 10:33:01 2010 -0400
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Fri May 27 07:46:52 2011 +0200

rgmanager: Make clustat -f not query CCS/objdb

clustat -f queries ccs by default, which is a
fairly sizeable performance hit in some configurations.

Signed-off-by: Lon Hohberger <lhh at redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 rgmanager/src/utils/clustat.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rgmanager/src/utils/clustat.c b/rgmanager/src/utils/clustat.c
index b64d474..2b47306 100644
--- a/rgmanager/src/utils/clustat.c
+++ b/rgmanager/src/utils/clustat.c
@@ -973,7 +973,7 @@ xml_cluster_status(cman_cluster_t *ci, int qs,
 
 
 static cluster_member_list_t *
-build_member_list(cman_handle_t ch, int *lid)
+build_member_list(cman_handle_t ch, int *lid, int fast)
 {
 	cluster_member_list_t *all, *part;
 	cman_node_t *m;
@@ -986,7 +986,7 @@ build_member_list(cman_handle_t ch, int *lid)
 
 	part = get_member_list(ch);
 
-	if (root && (all = ccs_member_list())) {
+	if (!fast && root && (all = ccs_member_list())) {
 
 		/* See if our config has anyone missed.  If so, flag
 		   them as missing from the config file */
@@ -1176,7 +1176,7 @@ main(int argc, char **argv)
 
 	while (1) {
 		qs = cman_is_quorate(ch);
-		membership = build_member_list(ch, &local_node_id);
+		membership = build_member_list(ch, &local_node_id, fast);
 		
 		if (!member_name)
 			rgs = rg_state_list(local_node_id, fast);


More information about the cluster-commits mailing list