cluster: STABLE3 - cman: remove the -f option from cman_tool nodes

Christine Caulfield chrissie@fedoraproject.org
Fri Mar 6 10:46:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a92fe992a644c5a06e82bba395d589ec449f9ee6
Commit:        a92fe992a644c5a06e82bba395d589ec449f9ee6
Parent:        a54949644f498bd426e3f3ef0c3deafb02a8836b
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Fri Mar 6 10:45:45 2009 +0000
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Fri Mar 6 10:45:45 2009 +0000

cman: remove the -f option from cman_tool nodes

It doesn't do anything useful any more.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 cman/cman_tool/cman_tool.h |    1 -
 cman/cman_tool/main.c      |   24 ------------------------
 cman/man/cman_tool.8       |    5 -----
 3 files changed, 0 insertions(+), 30 deletions(-)

diff --git a/cman/cman_tool/cman_tool.h b/cman/cman_tool/cman_tool.h
index 78958b9..bad814a 100644
--- a/cman/cman_tool/cman_tool.h
+++ b/cman/cman_tool/cman_tool.h
@@ -89,7 +89,6 @@ struct commandline
 	int clustername_opt;
 	int wait_opt;
 	int wait_quorate_opt;
-	int fence_opt;
 	int addresses_opt;
 	int noconfig_opt;
 	int nosetpri_opt;
diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c
index 50a8f05..2ccf8ce 100644
--- a/cman/cman_tool/main.c
+++ b/cman/cman_tool/main.c
@@ -102,7 +102,6 @@ static void print_usage(int subcmd)
 
 	if (!subcmd || subcmd == OP_NODES) {
 		printf("nodes              Show local record of cluster nodes\n");
-		printf("  -f                 Also show when node was last fenced\n");
 		printf("  -a                 Also show node address(es)\n");
 		printf("  -n <nodename>      Only show information for specific node\n");
 		printf("  -F <format>        Specify output format (see man page)\n");
@@ -342,7 +341,6 @@ static int get_format_opt(const char *opt)
 static void print_node(commandline_t *comline, cman_handle_t h, int *format, struct cman_node *node)
 {
 	char member_type;
-	struct tm *ftime;
 	struct tm *jtime;
 	int numaddrs;
 	struct cman_node_address addrs[MAX_INTERFACES];
@@ -393,24 +391,6 @@ static void print_node(commandline_t *comline, cman_handle_t h, int *format, str
 		       node->cn_incarnation, jstring, node->cn_name);
 	}
 
-	if (comline->fence_opt && !comline->format_opts) {
-		char agent[255];
-		uint64_t fence_time;
-		int fenced;
-
-		if (!cman_get_fenceinfo(h, node->cn_nodeid, &fence_time, &fenced, agent)) {
-			if (fence_time) {
-				time_t fence_time_t = (time_t)fence_time;
-				ftime = localtime(&fence_time_t);
-				strftime(jstring, sizeof(jstring), "%F %H:%M:%S", ftime);
-				printf("       Last fenced:   %-15s by %s\n", jstring, agent);
-			}
-			if (!node->cn_member && node->cn_incarnation && !fenced) {
-				printf("       Node has not been fenced since it went down\n");
-			}
-		}
-	}
-
 	if (comline->addresses_opt || comline->format_opts) {
 		if (!cman_get_node_addrs(h, node->cn_nodeid, MAX_INTERFACES, &numaddrs, addrs) &&
 		    numaddrs)
@@ -783,10 +763,6 @@ static void decode_arguments(int argc, char *argv[], commandline_t *comline)
 			comline->multicast_addr = strdup(optarg);
 			break;
 
-		case 'f':
-			comline->fence_opt = 1;
-			break;
-
 		case 'a':
 			comline->addresses_opt = 1;
 			break;
diff --git a/cman/man/cman_tool.8 b/cman/man/cman_tool.8
index 2825396..46a78d8 100644
--- a/cman/man/cman_tool.8
+++ b/cman/man/cman_tool.8
@@ -294,11 +294,6 @@ If you don't want to use these services or have not installed openais then
 this switch will disable them.
 .SH "NODES" OPTIONS
 .TP
-.I -f
-Shows the date/time the node was last fenced (if it has bee fenced), and also
-the fence system that was used.
-.br
-.TP
 .I -a
 Shows the IP address(es) the nodes are communicating on.
 .br



More information about the Cluster-cvs mailing list