diff --git a/corosync.spec.in b/corosync.spec.in index 6ff3e227..282ef2bc 100644 --- a/corosync.spec.in +++ b/corosync.spec.in @@ -1,507 +1,508 @@ @ALPHATAG@ @NUMCOMM@ @DIRTY@ # Conditionals # Invoke "rpmbuild --without " or "rpmbuild --with " # to disable or enable specific features %bcond_with testagents %bcond_with watchdog %bcond_with monitoring %bcond_with snmp %bcond_with dbus %bcond_with rdma %bcond_with systemd %bcond_with upstart %bcond_with xmlconf %bcond_with runautogen %bcond_with qdevices %bcond_with qnetd %global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}} %global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces Version: @version@ Release: 1%{?gitver}%{?dist} License: BSD Group: System Environment/Base URL: http://corosync.github.io/corosync/ Source0: http://build.clusterlabs.org/corosync/releases/%{name}-%{version}%{?gittarver}.tar.gz # Runtime bits Requires: corosynclib = %{version}-%{release} Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Conflicts: openais <= 0.89, openais-devel <= 0.89 # Build bits BuildRequires: groff BuildRequires: libqb-devel BuildRequires: nss-devel BuildRequires: zlib-devel %if %{with runautogen} BuildRequires: autoconf automake libtool %endif %if %{with monitoring} BuildRequires: libstatgrab-devel %endif %if %{with rdma} BuildRequires: libibverbs-devel librdmacm-devel %endif %if %{with snmp} BuildRequires: net-snmp-devel %endif %if %{with dbus} BuildRequires: dbus-devel %endif %if %{with systemd} BuildRequires: systemd-units Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %endif %if %{with xmlconf} Requires: libxslt %endif %if %{with qdevices} || %{with qnetd} Requires: nss-tools %endif %if %{with qnetd} BuildRequires: sed %endif BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %prep %setup -q -n %{name}-%{version}%{?gittarver} %build %if %{with runautogen} ./autogen.sh %endif %if %{with rdma} export ibverbs_CFLAGS=-I/usr/include/infiniband \ export ibverbs_LIBS=-libverbs \ export rdmacm_CFLAGS=-I/usr/include/rdma \ export rdmacm_LIBS=-lrdmacm \ %endif %{configure} \ %if %{with testagents} --enable-testagents \ %endif %if %{with watchdog} --enable-watchdog \ %endif %if %{with monitoring} --enable-monitoring \ %endif %if %{with snmp} --enable-snmp \ %endif %if %{with dbus} --enable-dbus \ %endif %if %{with rdma} --enable-rdma \ %endif %if %{with systemd} --enable-systemd \ %endif %if %{with upstart} --enable-upstart \ %endif %if %{with xmlconf} --enable-xmlconf \ %endif %if %{with qdevices} --enable-qdevices \ %endif %if %{with qnetd} --enable-qnetd \ %endif --with-initddir=%{_initrddir} \ --with-systemddir=%{_unitdir} \ --with-upstartdir=%{_sysconfdir}/init \ --with-tmpfilesdir=%{_tmpfilesdir} make %{_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %if %{with dbus} mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf %endif ## tree fixup # drop static libs rm -f %{buildroot}%{_libdir}/*.a rm -f %{buildroot}%{_libdir}/*.la # drop docs and html docs for now rm -rf %{buildroot}%{_docdir}/* # /etc/sysconfig/corosync-notifyd mkdir -p %{buildroot}%{_sysconfdir}/sysconfig install -m 644 tools/corosync-notifyd.sysconfig.example \ %{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd # /etc/sysconfig/corosync install -m 644 init/corosync.sysconfig.example \ %{buildroot}%{_sysconfdir}/sysconfig/corosync %if %{with qdevices} # /etc/sysconfig/corosync-qdevice install -m 644 init/corosync-qdevice.sysconfig.example \ %{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice %endif %if %{with qnetd} # /etc/sysconfig/corosync-qnetd install -m 644 init/corosync-qnetd.sysconfig.example \ %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd %if %{with systemd} sed -i -e 's/^#User=/User=/' \ %{buildroot}%{_unitdir}/corosync-qnetd.service sed -i -e 's/root/coroqnetd/g' \ %{buildroot}%{_tmpfilesdir}/corosync-qnetd.conf %else sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \ %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd %endif %endif %clean rm -rf %{buildroot} %description This package contains the Corosync Cluster Engine Executive, several default APIs and libraries, default configuration files, and an init script. %post %if %{with systemd} && 0%{?systemd_post:1} %systemd_post corosync.service %else if [ $1 -eq 1 ]; then /sbin/chkconfig --add corosync || : fi %endif %preun %if %{with systemd} && 0%{?systemd_preun:1} %systemd_preun corosync.service %else if [ $1 -eq 0 ]; then /sbin/service corosync stop &>/dev/null || : /sbin/chkconfig --del corosync || : fi %endif %postun %if %{with systemd} && 0%{?systemd_postun:1} %systemd_postun %endif %files %defattr(-,root,root,-) %doc LICENSE SECURITY %{_sbindir}/corosync %{_sbindir}/corosync-keygen %{_sbindir}/corosync-cmapctl %{_sbindir}/corosync-cfgtool %{_sbindir}/corosync-cpgtool %{_sbindir}/corosync-quorumtool %{_sbindir}/corosync-notifyd %{_bindir}/corosync-blackbox %if %{with xmlconf} %{_bindir}/corosync-xmlproc %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example %dir %{_datadir}/corosync %{_datadir}/corosync/xml2conf.xsl %{_mandir}/man8/corosync-xmlproc.8* %{_mandir}/man5/corosync.xml.5* %endif %dir %{_sysconfdir}/corosync %dir %{_sysconfdir}/corosync/uidgid.d %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu %config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd %config(noreplace) %{_sysconfdir}/sysconfig/corosync %config(noreplace) %{_sysconfdir}/logrotate.d/corosync %if %{with dbus} %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf %endif %if %{with snmp} %{_datadir}/snmp/mibs/COROSYNC-MIB.txt %endif %if %{with systemd} %{_unitdir}/corosync.service %{_unitdir}/corosync-notifyd.service %dir %{_datadir}/corosync %{_datadir}/corosync/corosync %{_datadir}/corosync/corosync-notifyd %else %{_initrddir}/corosync %{_initrddir}/corosync-notifyd %endif %if %{with upstart} %{_sysconfdir}/init/corosync.conf %{_sysconfdir}/init/corosync-notifyd.conf %endif %dir %{_localstatedir}/lib/corosync %dir %{_localstatedir}/log/cluster %{_mandir}/man8/corosync_overview.8* %{_mandir}/man8/corosync.8* %{_mandir}/man8/corosync-blackbox.8* %{_mandir}/man8/corosync-cmapctl.8* %{_mandir}/man8/corosync-keygen.8* %{_mandir}/man8/corosync-cfgtool.8* %{_mandir}/man8/corosync-cpgtool.8* %{_mandir}/man8/corosync-notifyd.8* %{_mandir}/man8/corosync-quorumtool.8* %{_mandir}/man5/corosync.conf.5* %{_mandir}/man5/votequorum.5* %{_mandir}/man8/cmap_keys.8* # optional testagent rpm # %if %{with testagents} %package -n corosync-testagents Summary: The Corosync Cluster Engine Test Agents Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description -n corosync-testagents This package contains corosync test agents. %files -n corosync-testagents %defattr(755,root,root,-) %{_datadir}/corosync/tests/mem_leak_test.sh %{_datadir}/corosync/tests/net_breaker.sh %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh %{_datadir}/corosync/tests/shm_leak_audit.sh %{_bindir}/cpg_test_agent %{_bindir}/sam_test_agent %{_bindir}/votequorum_test_agent %endif # library # %package -n corosynclib Summary: The Corosync Cluster Engine Libraries Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %description -n corosynclib This package contains corosync libraries. %files -n corosynclib %defattr(-,root,root,-) %doc LICENSE %{_libdir}/libcfg.so.* %{_libdir}/libcpg.so.* %{_libdir}/libcmap.so.* %{_libdir}/libtotem_pg.so.* %{_libdir}/libquorum.so.* %{_libdir}/libvotequorum.so.* %{_libdir}/libsam.so.* %{_libdir}/libcorosync_common.so.* %post -n corosynclib -p /sbin/ldconfig %postun -n corosynclib -p /sbin/ldconfig %package -n corosynclib-devel Summary: The Corosync Cluster Engine Development Kit Group: Development/Libraries Requires: corosynclib = %{version}-%{release} Requires: pkgconfig Provides: corosync-devel = %{version} Obsoletes: corosync-devel < 0.92-7 %description -n corosynclib-devel This package contains include files and man pages used to develop using The Corosync Cluster Engine APIs. %files -n corosynclib-devel %defattr(-,root,root,-) %doc LICENSE %dir %{_includedir}/corosync/ %{_includedir}/corosync/corodefs.h %{_includedir}/corosync/cfg.h %{_includedir}/corosync/cmap.h %{_includedir}/corosync/corotypes.h %{_includedir}/corosync/cpg.h %{_includedir}/corosync/hdb.h %{_includedir}/corosync/sam.h %{_includedir}/corosync/quorum.h %{_includedir}/corosync/votequorum.h %dir %{_includedir}/corosync/totem/ %{_includedir}/corosync/totem/totem.h %{_includedir}/corosync/totem/totemip.h %{_includedir}/corosync/totem/totempg.h %{_libdir}/libcfg.so %{_libdir}/libcpg.so %{_libdir}/libcmap.so %{_libdir}/libtotem_pg.so %{_libdir}/libquorum.so %{_libdir}/libvotequorum.so %{_libdir}/libsam.so %{_libdir}/libcorosync_common.so %{_libdir}/pkgconfig/*.pc %{_mandir}/man3/cpg_*3* %{_mandir}/man3/quorum_*3* %{_mandir}/man3/votequorum_*3* %{_mandir}/man3/sam_*3* %{_mandir}/man8/cpg_overview.8* %{_mandir}/man8/votequorum_overview.8* %{_mandir}/man8/sam_overview.8* %{_mandir}/man3/cmap_*3* %{_mandir}/man8/cmap_overview.8* %{_mandir}/man8/quorum_overview.8* # optional qdevices # %if %{with qdevices} %package -n corosync-qdevice Summary: The Corosync Cluster Engine Qdevice Group: System Environment/Base Requires: corosync Requires: nss-tools %if %{with systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %endif %description -n corosync-qdevice This package contains the Corosync Cluster Engine Qdevice, script for creating NSS certificates and an init script. %post -n corosync-qdevice %if %{with systemd} && 0%{?systemd_post:1} %systemd_post corosync-qdevice.service %else if [ $1 -eq 1 ]; then /sbin/chkconfig --add corosync-qdevice || : fi %endif %preun -n corosync-qdevice %if %{with systemd} && 0%{?systemd_preun:1} %systemd_preun corosync-qdevice.service %else if [ $1 -eq 0 ]; then /sbin/service corosync-qdevice stop &>/dev/null || : /sbin/chkconfig --del corosync-qdevice || : fi %endif %postun -n corosync-qdevice %if %{with systemd} && 0%{?systemd_postun:1} %systemd_postun %endif %files -n corosync-qdevice %defattr(-,root,root,-) %dir %{_sysconfdir}/corosync/qdevice %dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net %dir %{_localstatedir}/run/corosync-qdevice %{_sbindir}/corosync-qdevice %{_sbindir}/corosync-qdevice-net-certutil %{_sbindir}/corosync-qdevice-tool %config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice %if %{with systemd} %{_unitdir}/corosync-qdevice.service %dir %{_datadir}/corosync %{_datadir}/corosync/corosync-qdevice %else %{_initrddir}/corosync-qdevice %endif %{_mandir}/man8/corosync-qdevice-tool.8* %{_mandir}/man8/corosync-qdevice-net-certutil.8* +%{_mandir}/man8/corosync-qdevice.8* %endif # optional qnetd # %if %{with qnetd} %package -n corosync-qnetd Summary: The Corosync Cluster Engine Qdevice Network Daemon Group: System Environment/Base Requires: nss-tools Requires(pre): shadow-utils %if %{with systemd} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %endif %description -n corosync-qnetd This package contains the Corosync Cluster Engine Qdevice Network Daemon, script for creating NSS certificates and an init script. %pre -n corosync-qnetd getent group coroqnetd >/dev/null || groupadd -r coroqnetd getent passwd coroqnetd >/dev/null || \ useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd exit 0 %post -n corosync-qnetd %if %{with systemd} && 0%{?systemd_post:1} %systemd_post corosync-qnetd.service %else if [ $1 -eq 1 ]; then /sbin/chkconfig --add corosync-qnetd || : fi %endif %preun -n corosync-qnetd %if %{with systemd} && 0%{?systemd_preun:1} %systemd_preun corosync-qnetd.service %else if [ $1 -eq 0 ]; then /sbin/service corosync-qnetd stop &>/dev/null || : /sbin/chkconfig --del corosync-qnetd || : fi %endif %postun -n corosync-qnetd %if %{with systemd} && 0%{?systemd_postun:1} %systemd_postun %endif %files -n corosync-qnetd %defattr(-,root,root,-) %dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd %dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/run/corosync-qnetd %{_bindir}/corosync-qnetd %{_bindir}/corosync-qnetd-certutil %{_bindir}/corosync-qnetd-tool %config(noreplace) %{_sysconfdir}/sysconfig/corosync-qnetd %if %{with systemd} %{_unitdir}/corosync-qnetd.service %dir %{_datadir}/corosync %{_datadir}/corosync/corosync-qnetd %{_tmpfilesdir}/corosync-qnetd.conf %else %{_initrddir}/corosync-qnetd %endif %{_mandir}/man8/corosync-qnetd-tool.8* %{_mandir}/man8/corosync-qnetd-certutil.8* %{_mandir}/man8/corosync-qnetd.8* %endif %changelog * @date@ Autotools generated version - @version@-1-@numcomm@.@alphatag@.@dirty@ - Autotools generated version diff --git a/man/Makefile.am b/man/Makefile.am index cff2a563..d9c94919 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,189 +1,190 @@ # Copyright (c) 2004 MontaVista Software, Inc. # Copyright (c) 2009, 2012, 2014 Red Hat, Inc. # # Authors: Steven Dake (sdake@redhat.com) # Fabio M. Di Nitto (fdinitto@redhat.com) # # All rights reserved. # # 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. MAINTAINERCLEANFILES = Makefile.in xml_man = corosync-xmlproc.8 \ corosync.xml.5 INDEX_HTML = index.html autogen_man = cpg_context_get.3 \ cpg_context_set.3 \ cpg_dispatch.3 \ cpg_fd_get.3 \ cpg_finalize.3 \ cpg_initialize.3 \ cpg_join.3 \ cpg_leave.3 \ cpg_local_get.3 \ cpg_mcast_joined.3 \ cpg_model_initialize.3 \ cpg_zcb_mcast_joined.3 \ cpg_zcb_alloc.3 \ cpg_zcb_free.3 \ cpg_membership_get.3 \ cpg_iteration_finalize.3 \ cpg_iteration_initialize.3 \ cpg_iteration_next.3 \ quorum_initialize.3 \ quorum_finalize.3 \ quorum_fd_get.3 \ quorum_dispatch.3 \ quorum_context_get.3 \ quorum_context_set.3 \ quorum_getquorate.3 \ quorum_trackstart.3 \ quorum_trackstop.3 \ votequorum_dispatch.3 \ votequorum_fd_get.3 \ votequorum_context_get.3 \ votequorum_context_set.3 \ votequorum_finalize.3 \ votequorum_getinfo.3 \ votequorum_initialize.3 \ votequorum_setexpected.3 \ votequorum_setvotes.3 \ votequorum_trackstart.3 \ votequorum_trackstop.3 \ votequorum_qdevice_register.3 \ votequorum_qdevice_unregister.3 \ votequorum_qdevice_update.3 \ votequorum_qdevice_master_wins.3 \ votequorum_qdevice_poll.3 \ sam_data_getsize.3 \ sam_data_restore.3 \ sam_data_store.3 \ sam_finalize.3 \ sam_hc_callback_register.3 \ sam_hc_send.3 \ sam_initialize.3 \ sam_mark_failed.3 \ sam_register.3 \ sam_start.3 \ sam_stop.3 \ sam_warn_signal_set.3 \ cmap_context_get.3 \ cmap_dec.3 \ cmap_iter_init.3 \ cmap_get.3 \ cmap_inc.3 \ cmap_set.3 \ cmap_iter_next.3 \ cmap_delete.3 \ cmap_iter_finalize.3 \ cmap_finalize.3 \ cmap_dispatch.3 \ cmap_initialize.3 \ cmap_track_add.3 \ cmap_context_set.3 \ cmap_fd_get.3 \ cmap_track_delete.3 autogen_common = ipc_common.sh.errors EXTRA_DIST = $(INDEX_HTML) \ $(xml_man) \ $(autogen_man:%=%.in) \ $(autogen_common) man_MANS = $(autogen_man) dist_man_MANS = corosync.conf.5 \ votequorum.5 \ corosync.8 \ corosync-cmapctl.8 \ corosync-blackbox.8 \ corosync-keygen.8 \ corosync-cfgtool.8 \ corosync-cpgtool.8 \ corosync-notifyd.8 \ corosync-quorumtool.8 \ corosync_overview.8 \ cpg_overview.8 \ quorum_overview.8 \ votequorum_overview.8 \ sam_overview.8 \ cmap_overview.8 \ cmap_keys.8 if INSTALL_XMLCONF dist_man_MANS += $(xml_man) endif if BUILD_QNETD dist_man_MANS += corosync-qnetd-tool.8 \ corosync-qnetd-certutil.8 \ corosync-qnetd.8 endif if BUILD_QDEVICES dist_man_MANS += corosync-qdevice-tool.8 \ - corosync-qdevice-net-certutil.8 + corosync-qdevice-net-certutil.8 \ + corosync-qdevice.8 endif HTML_DOCS = $(dist_man_MANS:%=%.html) $(man_MANS:%=%.html) # developer man page generation %.3: %.3.in $(autogen_common) @echo Generating $@ man page && \ rm -f $@-t-t $@-t $@ && \ date="$$(LC_ALL=C date "+%F")" && \ awk "{print}(\$$1 ~ /@COMMONIPCERRORS@/){exit 0}" ${top_srcdir}/man/$@.in > $@-t-t && \ cat ${top_srcdir}/man/$(autogen_common) >> $@-t-t && \ awk -v p=0 "(\$$1 ~ /@COMMONIPCERRORS@/){p = 1} {if(p==1)print}" ${top_srcdir}/man/$@.in >> $@-t-t && \ cat $@-t-t | \ sed -e 's#@BUILDDATE@#'$$date'#g' \ -e 's#@COMMONIPCERRORS@##g' \ > $@-t && \ rm -f $@-t-t && \ mv $@-t $@ clean-local: rm -rf $(HTML_DOCS) $(autogen_man) if BUILD_HTML_DOCS %.html: % $(GROFF) -mandoc -Thtml $^ > $@ install-data-local: $(INSTALL) -d $(DESTDIR)/${docdir}/html $(INSTALL) -m 644 ${srcdir}/$(INDEX_HTML) $(HTML_DOCS) $(DESTDIR)/${docdir}/html/ uninstall-local: cd $(DESTDIR)/${docdir}/html && rm -f $(INDEX_HTML) $(HTML_DOCS) rmdir $(DESTDIR)/${docdir}/html 2> /dev/null || : all-local: $(HTML_DOCS) endif diff --git a/man/corosync-qdevice.8 b/man/corosync-qdevice.8 new file mode 100644 index 00000000..6d89051e --- /dev/null +++ b/man/corosync-qdevice.8 @@ -0,0 +1,317 @@ +.\"/* +.\" * Copyright (C) 2016 Red Hat, Inc. +.\" * +.\" * All rights reserved. +.\" * +.\" * Author: Jan Friesse +.\" * +.\" * 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-QDEVICE 8 2016-06-29 +.SH NAME +corosync-qdevice \- QDevice daemon +.SH SYNOPSIS +.B "corosync-qdevice [-dfh] [-S option=value[,option2=value2,...]]" + +.SH DESCRIPTION +.B corosync-qdevice +is daemon running on each node of of cluster and being able to provide configured +number of votes to +quorum subsystem based on third-party arbiter decision. It's primary use +is to allow sustain more node failures than standard quorum would allow. It's +recommended for even-node clusters and very recommended for 2 node cluster. +.SH OPTIONS +.TP +.B -d +Forcefully turn on debug information without need to change corosync.conf. +.TP +.B -f +Do not daemonize and run on foreground. +.TP +.B -h +Show short help +.TP +.B -S +Set advanced settings described in it's own section. This option +shouldn't be generally used because most of the options are +not safe to change. +.SH CONFIGURATION +.B corosync-qdevice +reads it's configuration from corosync.conf file. + +Main configuration is within +.B quorum.device +subdirective. Each model also has it's own configuration within +equally named subdirective. +.TP +.B model +Specifies model to be used. This parameter is required. +.B corosync-qdevice +is modular and it's able to support multiple different models. Model basically +defines what type of arbiter is used. Currently only +.I net +is supported. +.TP +.B timeout +Specifies how often should +.B corosync-qdevice +call votequorum_poll function. It's also used by net model to adjust +hearbeat timeout. It's usually not recommended to change this value. +Default is 10000. +.TP +.B sync_timeout +Specifies how often should +.B corosync-qdevice +call votequorum_poll function during sync phase. It's usually not recommended to change this value. +Default is 30000. +.B votes +Number of votes provided to cluster by qdevice. Default is (number_of_nodes - 1) or generally +sum(votes per node) - 1. +.PP +Within +.B quorum.device.net +subdirective is configuration for model net. +.TP +.B tls +Can be one of +.I on, off or required +values and specifies if tls should be used. +.I on +value means connection should be tried with TLS but it's not fatal +error if server doesn't advertise TLS support and then non tls is used. +.I off +is used when TLS is not required and it's then not even tried. This is also +only one mode which doesn't need properly initialized NSS database. +.I required +means TLS is absolutelly required and if server doesn't support TLS, qdevice +exits with error message. Default is on. +.TP +.B host +Specifies IP address or host name of qnetd server to be used. This parameter +is required. +.TP +.B port +Specifies TCP port of qnetd server. Default is 5403. +.TP +.B algorithm +Decision algorithm. Can be one of the +.I ffsplit +or +.I lms +values (actually there are also +.I test +and +.I 2nodelms +, both of them mainly for developers and shouldn't be generally used). Description of +what algorithm means and how algorithms differs is in it's own section. +Default value is ffsplit. +.TP +.B tie-breaker +can be one of +.I lowest +, +.I highest +or valid_node_id (number) values. It's used as a fallback if qdevice has to solve two +exactly same quality partitions. +.I lowest +means partition with lowest node id is choosen. +.I highest +means partition with highest node is choosen. And valid_node_id means partition +where node with given node id is member is choosen. +.TP +.B connect_timeout +Timeout when +.B corosync-qdevice +is trying to connect to +.B corosync-qnetd +host. Default is 0.8 * quorum.sync_timeout. +.TP +.B force_ip_version +can be one of +.I 0|4|6 +and allows forcing using given IP version. +.I 0 +(default value) means IPv6 is prefered and IPv4 should be used as fallback. + +.PP +Logging configuration is within +.B logging +directive. +.B corosync-qdevice +parses and supports most of the options with exception to +.B to_logfile +, +.B logfile +and +.B logfile_priority. +.B logger_subsys +sub-directive can be also used if +.B subsys +is set to QDEVICE. + +.PP +For +.B corosync-qdevice +to work correctly, +.B nodelist +directive has to be used and properly configured. Also net model require +.B totem.cluster_name +option to be set. + +.SH MODEL NET TLS CONFIGURATION +For model net to make TLS work it's required to create NSS database, import Qnetd +CA certificate, and get/distribute valid client certificate. + +If pcs is used following steps are not needed because pcs does them automatically. + +.B corosync-qdevice-net-certutil +is tool to perform required actions semi-automatically. Please consult help output of +it and its man page. For first time configuration it may make sense to start with +.B -Q +option. + +If TLS is not required just edit corosync.conf file and set +.B quorum.device.net.tls +to +.I off +value. + +.SH MODEL NET ALGORITHMS +Algorithm is used to change behavior of how +.B corosync-qnetd +provides vote to given node/partition. Currently there are two algorithms supported. +.TP +.B ffsplit +Make sense only for clusters with even number of nodes. It provides exactly one +vote to partition with higher number of active nodes. If there are two exactly same partitions, +it provides it's vote to partition where more clients are connected to qnetd +server. If also this number equals, tie-breaker is used. It's able to transition +it's vote if currently active partition partitioned and non-active partition +still has at least 50% of active nodes. Because of this, vote is not provided +if qnetd connection is not active. + +For use this algorithm it's required to set number of votes per node to 1 (default) +and qdevice number of votes has to be also 1. This is achieved by setting +.B quorum.device.votes +key in corosync.conf file to 1. +.TP +.B lms +Last-man-standing. If the node is the only one left in the cluster that can see the +qnetd server then we return a vote. + +If more than one node can see the qnetd server but some nodes can't +see each other then we divide the cluster up into 'partitions' based on +their ring_id and return a vote to nodes in the partition that contains +a nominated nodeid. (lowest, highest, etc). For LMS to work, number +of qdevice votes has to be set to default (so just delete +.B quorum.device.votes +key from corosync.conf). + +.SH ADVANCED SETTINGS +Set by using +.B -S +option. At the end of description in braces is default value. Options +beginning with +.B net_ +prefix are specific to model net. +.TP +.B lock_file +Lock file location. (/var/run/corosync-qdevice/corosync-qdevice.pid) +.TP +.B local_socket_file +Internal IPC socket file location. (/var/run/corosync-qdevice/corosync-qdevice.sock) +.TP +.B local_socket_backlog +Parameter passed to listen syscall. (10) +.TP +.B max_cs_try_again +How many times retry to call corosync function which returned CS_ERR_TRY_AGAIN. (10) +.TP +.B votequorum_device_name +Name used for qdevice register. (Qdevice) +.TP +.B ipc_max_clients +Maximum allowed simultaneous IPC clients. (10) +.TP +.B ipc_max_receive_size +Maximum size of message received by IPC client. (4096) +.TP +.B ipc_max_send_size +Maximum size of message allowed to send to IPC client. (65536) +.TP +.B master_wins +Force enable/disable master wins. (default is model) +.TP +.B net_nss_db_dir +NSS database directory. (/etc/corosync/qdevice/net/nssdb) +.TP +.B net_initial_msg_receive_size +Initial (used during connection parameters negotiation) +maximum size of receive buffer for message (maximum +allowed message size received from qnetd). (32768) +.TP +.B net_initial_msg_send_size +Initial (used during connection parameters negotiation) +maximum size of one send buffer (message) to be send to server. (32768) +.TP +.B net_min_msg_send_size +Minimum required size of one send buffer (message) to be send to server. (32768) +.TP +.B net_max_msg_receive_size +Maximum allowed size of receive buffer for message sent by server. (16777216) +.TP +.B net_max_send_buffers +Maximum number of send buffers. (10) +.TP +.B net_nss_qnetd_cn +Canonical name of qnetd server certificate. (Qnetd Server) +.TP +.B net_nss_client_cert_nickname +NSS nickname of qdevice client certificate. (Cluster Cert) +.TP +.B net_heartbeat_interval_min +Minimal heartbeat timeout accepted by client in ms. (1000) +.TP +.B net_heartbeat_interval_max +Maximal heartbeat timeout accepted by client in ms. (120000) +.TP +.B net_min_connect_timeout +Minimal connection timeout accepted by client in ms. (1000) +.TP +.B net_max_connect_timeout +Maximal connection timeout accepted by client in ms. (120000) +.TP +.B net_test_algorithm_enabled +Enable test algorithm. (if built with --enable-debug on, otherwise off) +.SH SEE ALSO +.BR corosync-qdevice-tool (8) +.BR corosync-qdevice-certutil (8) +.BR corosync-qnetd (8) +.BR corosync.conf (5) +.SH AUTHOR +Jan Friesse +.PP diff --git a/man/corosync-qnetd.8 b/man/corosync-qnetd.8 index cc32383f..06d46db1 100644 --- a/man/corosync-qnetd.8 +++ b/man/corosync-qnetd.8 @@ -1,223 +1,228 @@ .\"/* .\" * Copyright (C) 2016 Red Hat, Inc. .\" * .\" * All rights reserved. .\" * .\" * Author: Jan Friesse .\" * .\" * 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-QNETD 8 2016-06-28 +.TH COROSYNC-QNETD 8 2016-06-29 .SH NAME corosync-qnetd \- QNet daemon .SH SYNOPSIS .B "corosync-qnetd [-46dfhv] [-l listen_addr] [-p listen_port] [-s tls] .B [-c client_cert_required] [-m max_clients] [-S option=value[,option2=value2,...]]" .SH DESCRIPTION .B corosync-qnetd is daemon running outside of cluster and being able to provide vote to .B corosync-qdevice model net. It's designed to support multiple clusters and be almost configuration and state free. New clusters are handled dynamically and no configuration file exists. It's also able to (recommended) run as non root user. Connection between .B corosync-qdevice model net client can be optionally TLS with client certificate checking. Communication protocol between server and client is designed to be very simple and allow backward compatibility. .SH OPTIONS .TP .B -4 and it's counterpart .B -6 are used to force to use only IPv4 or IPv6. Default is to listen on both addresses. .TP .B -d Turn on debug information. By default priority of messages forwarded into syslog is not bumped so for most of deployments debug messages are simply thrown. To bump up priority use .B -d parameter twice. .TP +.B -f +Do not daemonize and run on foreground. +.TP .B -h Show short help .TP .B -v Show version and supported communication protocol messages/options. .TP .B -l IP address to listen on. By default daemon listen on any address (wildcard). .TP .B -p TCP port to listen on. Default port is 5403. .TP .B -s Determines if TLS should be used and can be one of .I on/off/required values (default is .I on ). .I on means TLS is enabled but client is not required to start TLS, .I off means TLS is completely disabled, and .I required means TLS is required. .I on and .I required requires NSS database to be properly initialized by running a .B corosync-qnetd-certutil command. .TP .B -c can be set to .I on/off value. Option make sense only if TLS is enabled. When .B -c is .I on client is required to send it's client certificate (default). .TP .B -m Maximum simultaneous clients. Default is 0 what means no limit. .TP .B -S Set advanced settings described in it's own section. This option shouldn't be generally used because most of the options are not safe to change. .SH UNPRIVILEGED USER CONFIGURATION It's generally recommended to be running .B corosync-qnetd as non root user. If you get package from distribution it's highly possible packager made hard work for you. If installation is performed from source code, few steps has to be taken. First it's needed to create unprivileged user/group. Following commands can be used (execute as root): .nf # groupadd -r coroqnetd # useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd .fi Next step is to set correct owner to /etc/corosync/qnetd and /var/run/corosync-qnetd directories. .nf # chown -R coroqnetd:coroqnetd /etc/corosync/qnetd /var/run/corosync-qnetd .fi Some systems has /var/run directory on tmpfs file system which gets discarded after reboot. Solution is to use initscript which takes care of /var/run/corosync-qnetd creating and set correct owner and permissions or for systems with systemd, it's possible to use tmpfile.d configuration file (installed by default if systemd is enabled during corosync compilation). Last step is to make sure .B corosync-qnetd is really executed as unpriviliged user. For initscript it's enough to set line COROSYNC_QNETD_RUNAS in /etc/(sysconfig|default)/corosync-qnetd file. If file is not already installed, use one provided in corosync source code (init/corosync-qnetd.sysconfig.example). For systemd overwrite/copy corosync-qnetd.service unit file and uncomment/change "User=" directive. .SH TLS CONFIGURATION -For TLS to work it's required to create NSS database. +For TLS to work it's required to create NSS database. If pcs is used following +steps are not needed because pcs does them automatically. + .B corosync-qnetd-certutil is tool to perform required actions automatically. Just execute: .nf # corosync-qnetd-certutil -i .fi If TLS is not required just edit /etc/(sysconfig|default)/corosync-qnetd or systemd unit file and add parameter .B -s .I off proper place. .SH ADVANCED SETTINGS Set by using .B -S option. At the end of description in braces is default value. .TP .B listen_backlog Parameter passed to listen syscall. (10) .TP .B max_client_send_buffers Maximum number of send buffers for one client. (32) .TP .B max_client_send_size Maximum size of one send buffer (message) to be send to client. (32768) .TP .B max_client_receive_size Maximum size of receive buffer for client message (maximum allowed message size received by client). (32768) .TP .B nss_db_dir NSS database directory. (/etc/corosync/qnetd/nssdb) .TP .B cert_nickname NSS nickname of qnetd server certificate. (QNetd Cert) .TP .B heartbeat_interval_min Minimal heartbeat timeout accepted by server in ms. (1000) .TP .B heartbeat_interval_max Maximal heartbeat timeout accepted by server in ms. (120000) .TP .B dpd_enabled Dead peer detection enabled. (on) .TP .B dpd_interval How often DPD algorithm detects dead peers in ms. (10000) .TP .B lock_file Lock file location. (/var/run/corosync-qnetd/corosync-qnetd.pid) .TP .B local_socket_file Internal IPC socket file location. (/var/run/corosync-qnetd/corosync-qnetd.sock) .TP .B local_socket_backlog Parameter passed to listen syscall. (10) .TP .B ipc_max_clients Maximum allowed simultaneous IPC clients. (10) .TP .B ipc_max_receive_size Maximum size of message received by IPC client. (4096) .TP .B ipc_max_send_size Maximum size of message allowed to send to IPC client. (10485760) .SH SEE ALSO .BR corosync-qnetd-tool (8) .BR corosync-qnetd-certutil (8) .BR corosync-qdevice (8) .SH AUTHOR Jan Friesse .PP