Quellcode durchsuchen

Remove corosync-fplay

Libqb now ships with qb-blackbox command doing same job as
corosync-fplay. It doesn't make sense to maintain two versions of same
utility so corosync-fplay can go. corosync-blackbox command now calls
directly qb-blackbox.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Jan Friesse vor 13 Jahren
Ursprung
Commit
ab328942cc
7 geänderte Dateien mit 10 neuen und 127 gelöschten Zeilen
  1. 0 2
      corosync.spec.in
  2. 0 1
      man/Makefile.am
  3. 0 66
      man/corosync-fplay.8
  4. 1 0
      tools/.gitignore
  5. 8 5
      tools/Makefile.am
  6. 1 2
      tools/corosync-blackbox.sh
  7. 0 51
      tools/corosync-fplay.c

+ 0 - 2
corosync.spec.in

@@ -143,7 +143,6 @@ fi
 %{_sbindir}/corosync-keygen
 %{_sbindir}/corosync-cmapctl
 %{_sbindir}/corosync-cfgtool
-%{_sbindir}/corosync-fplay
 %{_sbindir}/corosync-cpgtool
 %{_sbindir}/corosync-quorumtool
 %{_sbindir}/corosync-notifyd
@@ -185,7 +184,6 @@ fi
 %{_mandir}/man8/corosync-keygen.8*
 %{_mandir}/man8/corosync-cfgtool.8*
 %{_mandir}/man8/corosync-cpgtool.8*
-%{_mandir}/man8/corosync-fplay.8*
 %{_mandir}/man8/corosync-notifyd.8*
 %{_mandir}/man8/corosync-quorumtool.8*
 %{_mandir}/man5/corosync.conf.5*

+ 0 - 1
man/Makefile.am

@@ -123,7 +123,6 @@ dist_man_MANS 		= corosync.conf.5 \
 			  corosync-keygen.8 \
 			  corosync-cfgtool.8 \
 			  corosync-cpgtool.8 \
-			  corosync-fplay.8 \
 			  corosync-notifyd.8 \
 			  corosync-quorumtool.8 \
 			  corosync_overview.8 \

+ 0 - 66
man/corosync-fplay.8

@@ -1,66 +0,0 @@
-.\"/*
-.\" * Copyright (C) 2010 Red Hat, Inc.
-.\" *
-.\" * All rights reserved.
-.\" *
-.\" * Author: Angus Salkeld <asalkeld@redhat.com>
-.\" *
-.\" * This software licensed under BSD license, the text of which follows:
-.\" *
-.\" * Redistribution and use in source and binary forms, with or without
-.\" * modification, are permitted provided that the following conditions are met:
-.\" *
-.\" * - Redistributions of source code must retain the above copyright notice,
-.\" *   this list of conditions and the following disclaimer.
-.\" * - Redistributions in binary form must reproduce the above copyright notice,
-.\" *   this list of conditions and the following disclaimer in the documentation
-.\" *   and/or other materials provided with the distribution.
-.\" * - Neither the name of Red Hat, Inc. nor the names of its
-.\" *   contributors may be used to endorse or promote products derived from this
-.\" *   software without specific prior written permission.
-.\" *
-.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-.\" * THE POSSIBILITY OF SUCH DAMAGE.
-.\" */
-.TH COROSYNC-FPLAY 8 2010-05-30
-.SH NAME
-corosync-fplay \- Display "flight data" from the corosync "blackbox".
-.SH SYNOPSIS
-.B "corosync-fplay"
-.SH DESCRIPTION
-.B corosync-fplay
-Print out the logs (including debug logs) that were recorded before the last corosync crash.
-.SH EXAMPLES
-.TP
-Get info to help developers diagnose a crash.
-.br
-$ corosync-fplay 
-.br
-Starting replay: head [74205] tail [0]
-.br
-rec=[1] Log Message=Corosync Cluster Engine ('1.2.1'): started and ready to provide service.
-.br
-[...]
-.br
-rec=[2607] Log Message=Delivering MCAST message with seq a to pending delivery queue
-.br
-rec=[2608] Log Message=downlist received left_list: 2
-.br
-rec=[2609] Log Message=chosen downlist from node r(0) ip(192.168.100.11) 
-.br
-Finishing replay: records found [2609]
-.br
-.SH SEE ALSO
-.BR corosync_overview (8),
-.SH AUTHOR
-Angus Salkeld
-.PP

+ 1 - 0
tools/.gitignore

@@ -6,3 +6,4 @@ corosync-quorumtool
 corosync-notifyd
 corosync-cmapctl
 corosync-xmlproc
+corosync-blackbox

+ 8 - 5
tools/Makefile.am

@@ -33,7 +33,7 @@ MAINTAINERCLEANFILES    = Makefile.in
 INCLUDES       		= -I$(top_builddir)/include  -I$(top_srcdir)/include \
                           -I$(top_builddir)/include/corosync
 
-sbin_PROGRAMS		= corosync-fplay corosync-cfgtool \
+sbin_PROGRAMS		= corosync-cfgtool \
 			  corosync-keygen \
 			  corosync-cpgtool corosync-quorumtool \
 			  corosync-notifyd corosync-cmapctl
@@ -47,15 +47,18 @@ endif
 corosync-xmlproc: corosync-xmlproc.sh
 	sed -e 's#@''DATADIR@#${datadir}#g' $< > $@
 
-EXTRA_DIST		= $(bin_SCRIPTS) corosync-xmlproc.sh corosync-notifyd.sysconfig.example
+corosync-blackbox: corosync-blackbox.sh
+	sed -e 's#@''LOCALSTATEDIR@#${localstatedir}#g' $< > $@
+
+
+EXTRA_DIST		= $(bin_SCRIPTS) corosync-xmlproc.sh corosync-notifyd.sysconfig.example \
+                          corosync-blackbox.sh
 
 COMMON_OPTS		= -L../lib -L../common_lib -Wl,-rpath,../common_lib
 
 corosync_cmapctl_LDFLAGS= $(COMMON_OPTS)
 corosync_cmapctl_LDADD	= -lcorosync_common -lcmap $(LIBQB_LIBS)
 
-corosync_fplay_LDADD	= $(LIBQB_LIBS)
-
 corosync_cfgtool_LDFLAGS= $(COMMON_OPTS)
 corosync_cfgtool_LDADD	= -lcfg $(LIBQB_LIBS)
 
@@ -76,5 +79,5 @@ lint:
 	-splint $(LINT_FLAGS) $(DBUS_CFLAGS) $(INCLUDES) $(CFLAGS) *.c
 
 clean-local:
-	rm -f corosync-xmlproc
+	rm -f corosync-xmlproc corosync-blackbox
 

+ 1 - 2
tools/corosync-blackbox → tools/corosync-blackbox.sh

@@ -31,5 +31,4 @@
 
 corosync-cmapctl -s runtime.blackbox.dump_state str $(date +%s)
 corosync-cmapctl -s runtime.blackbox.dump_flight_data str $(date +%s)
-corosync-fplay
-
+qb-blackbox "@LOCALSTATEDIR@/lib/corosync/fdata"

+ 0 - 51
tools/corosync-fplay.c

@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2011 Red Hat, Inc.
- *
- * All rights reserved.
- *
- * Author: Angus Salkeld <asalkeld@redhat.com>
- *
- * This software licensed under BSD license, the text of which follows:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * - Neither the name of the MontaVista Software, Inc. nor the names of its
- *   contributors may be used to endorse or promote products derived from this
- *   software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include <qb/qbdefs.h>
-#include <qb/qblog.h>
-
-int main (void)
-{
-	qb_log_init("fplay", LOG_USER, LOG_INFO);
-
-	qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD,
-			  QB_LOG_FILTER_FILE, __FILE__, LOG_INFO);
-	qb_log_format_set(QB_LOG_STDERR, "%f:%l [%p] %b");
-	qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_ENABLED, QB_FALSE);
-	qb_log_ctl(QB_LOG_STDERR, QB_LOG_CONF_ENABLED, QB_TRUE);
-
-	qb_log_blackbox_print_from_file(LOCALSTATEDIR "/lib/corosync/fdata");
-	return 0;
-}