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@xxxxxxxxxx> --- corosync.spec.in | 2 - man/Makefile.am | 1 - man/corosync-fplay.8 | 66 -------------------------------------------- tools/.gitignore | 1 + tools/Makefile.am | 13 +++++--- tools/corosync-blackbox | 35 ----------------------- tools/corosync-blackbox.sh | 34 ++++++++++++++++++++++ tools/corosync-fplay.c | 51 ---------------------------------- 8 files changed, 43 insertions(+), 160 deletions(-) delete mode 100644 man/corosync-fplay.8 delete mode 100755 tools/corosync-blackbox create mode 100644 tools/corosync-blackbox.sh delete mode 100644 tools/corosync-fplay.c diff --git a/corosync.spec.in b/corosync.spec.in index 1c99d20..eae317d 100644 --- a/corosync.spec.in +++ b/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* diff --git a/man/Makefile.am b/man/Makefile.am index 28936b9..946a9b3 100644 --- a/man/Makefile.am +++ b/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 \ diff --git a/man/corosync-fplay.8 b/man/corosync-fplay.8 deleted file mode 100644 index 37fb91a..0000000 --- a/man/corosync-fplay.8 +++ /dev/null @@ -1,66 +0,0 @@ -.\"/* -.\" * Copyright (C) 2010 Red Hat, Inc. -.\" * -.\" * All rights reserved. -.\" * -.\" * Author: Angus Salkeld <asalkeld@xxxxxxxxxx> -.\" * -.\" * 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 diff --git a/tools/.gitignore b/tools/.gitignore index c63290e..6614c42 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -6,3 +6,4 @@ corosync-quorumtool corosync-notifyd corosync-cmapctl corosync-xmlproc +corosync-blackbox diff --git a/tools/Makefile.am b/tools/Makefile.am index 5cd738b..6e689f6 100644 --- a/tools/Makefile.am +++ b/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 diff --git a/tools/corosync-blackbox b/tools/corosync-blackbox deleted file mode 100755 index 15a97e3..0000000 --- a/tools/corosync-blackbox +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Copyright (c) 2010 Red Hat, Inc. -# -# Authors: Angus Salkeld <asalkeld@xxxxxxxxxx -# -# 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. - -corosync-cmapctl -s runtime.blackbox.dump_state str $(date +%s) -corosync-cmapctl -s runtime.blackbox.dump_flight_data str $(date +%s) -corosync-fplay - diff --git a/tools/corosync-blackbox.sh b/tools/corosync-blackbox.sh new file mode 100644 index 0000000..fb5ce96 --- /dev/null +++ b/tools/corosync-blackbox.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# Copyright (c) 2010 Red Hat, Inc. +# +# Authors: Angus Salkeld <asalkeld@xxxxxxxxxx +# +# 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. + +corosync-cmapctl -s runtime.blackbox.dump_state str $(date +%s) +corosync-cmapctl -s runtime.blackbox.dump_flight_data str $(date +%s) +qb-blackbox "@LOCALSTATEDIR@/lib/corosync/fdata" diff --git a/tools/corosync-fplay.c b/tools/corosync-fplay.c deleted file mode 100644 index a909b56..0000000 --- a/tools/corosync-fplay.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2011 Red Hat, Inc. - * - * All rights reserved. - * - * Author: Angus Salkeld <asalkeld@xxxxxxxxxx> - * - * 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; -} -- 1.7.1 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss