diff --git a/.fence-virt.metadata b/.fence-virt.metadata index ba18ab3..3f290e0 100644 --- a/.fence-virt.metadata +++ b/.fence-virt.metadata @@ -1 +1 @@ -5936d188ef359c4fdf34f87be05d250e59f29db9 SOURCES/fence-virt-0.4.0.tar.bz2 +540229f58381acc068de79ef37e5208e22180559 SOURCES/fence-virt-1.0.0.tar.bz2 diff --git a/.gitignore b/.gitignore index 90b9f24..a47ebeb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/fence-virt-0.4.0.tar.bz2 +SOURCES/fence-virt-1.0.0.tar.bz2 diff --git a/SOURCES/bz1624110-1-harden-fPIE.patch b/SOURCES/bz1624110-1-harden-fPIE.patch deleted file mode 100644 index 2d5d19c..0000000 --- a/SOURCES/bz1624110-1-harden-fPIE.patch +++ /dev/null @@ -1,147 +0,0 @@ -diff -uNr a/client/Makefile.in b/client/Makefile.in ---- a/client/Makefile.in 2017-06-05 20:24:36.000000000 +0200 -+++ b/client/Makefile.in 2019-04-09 15:04:01.910270557 +0200 -@@ -24,7 +24,7 @@ - `xml2-config --cflags` - - # nss sucks in way too much stuff --LIBS+=-lnss3 `xml2-config --libs` -+LIBS+=-lnss3 `xml2-config --libs` -Wl,-z,now - - TARGETS=${TARGET} - -@@ -40,7 +40,16 @@ - ln -snf $^ $@ - - fence_virt: ${fence_virt_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -L../common -lfence_virt -+ $(CC) $(CFLAGS) -o $@ $^ -shared $(LIBS) -L../common -lfence_virt -+ -+mcast.o: mcast.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ -+options.o: options.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ -+serial.o: serial.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) - - %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES) -diff -uNr a/common/Makefile.in b/common/Makefile.in ---- a/common/Makefile.in 2017-06-05 20:24:36.000000000 +0200 -+++ b/common/Makefile.in 2019-04-09 15:07:17.456815023 +0200 -@@ -24,6 +24,18 @@ - libfence_virt.a: ${libfence_virt_a_SOURCE:.c=.o} - ar rc $@ $^ - -+fdops.o: fdops.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ -+ip_lookup.o: ip_lookup.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ -+mcast.o: mcast.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ -+tcp.o: tcp.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ - %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES) - -diff -uNr a/config/Makefile.in b/config/Makefile.in ---- a/config/Makefile.in 2017-06-05 20:24:36.000000000 +0200 -+++ b/config/Makefile.in 2019-04-09 13:53:38.538444645 +0200 -@@ -42,7 +42,7 @@ - $(LEX) -oconfig.c config.l - - %.o: %.c -- $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES) -+ $(CC) $(CFLAGS) -fPIE -c -o $@ $^ $(INCLUDES) - - clean: - rm -f ${TARGETS} *~ *.o testprog config.tab.c config.tab.h config.c -diff -uNr a/Makefile.top.in b/Makefile.top.in ---- a/Makefile.top.in 2017-06-05 20:24:36.000000000 +0200 -+++ b/Makefile.top.in 2019-04-09 15:17:52.488438333 +0200 -@@ -2,7 +2,9 @@ - CXX=@CXX@ - - CFLAGS=@CFLAGS@ --CFLAGS+=-fPIC -Wall -Wformat=2 -Wstrict-prototypes -Wshadow -D_GNU_SOURCE -+CFLAGS+=-Wall -Wformat=2 -Wstrict-prototypes -Wshadow -D_GNU_SOURCE -+CXXFLAGS=@CXXFLAGS@ -+CXXFLAGS+=-Wall -Wformat=2 -Wstrict-prototypes -Wshadow -D_GNU_SOURCE - - LEX=@LEX@ - YACC=@YACC@ -diff -uNr a/server/Makefile.in b/server/Makefile.in ---- a/server/Makefile.in 2017-06-05 20:24:36.000000000 +0200 -+++ b/server/Makefile.in 2019-04-09 15:11:51.692932810 +0200 -@@ -32,7 +32,7 @@ - XML_LIBS=`xml2-config --libs` - INCLUDES=-I../include `nss-config --cflags` `nspr-config --cflags` `xml2-config --cflags` - --LIBS+=-L../common -lfence_virt -Wl,-wrap,syslog,-wrap,closelog -lpthread -luuid -+LIBS+=-L../common -lfence_virt -Wl,-z,now,-wrap,syslog,-wrap,closelog -lpthread -luuid - - MODULE_PATH=${libdir}/${PACKAGE_NAME} - -@@ -150,37 +150,46 @@ - all: ${TARGETS} ${MODULES} - - fence_virtd: ${fence_virtd_SOURCES:.c=.o} ${fence_virtd_cxx_SOURCES:.cpp=.opp} -- $(CXX) -o $@ $^ $(MAIN_LIBS) $(LIBS) -+ $(CXX) $(CXXFLAGS) -o $@ $^ $(MAIN_LIBS) $(LIBS) - - multicast.so: ${multicast_so_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS) -+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -shared $(NSS_LIBS) - - libvirt.so: ${libvirt_so_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) -+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) - - libvirt-qmf.so: ${libvirt_qmf_so_SOURCES:.c=.o} ${libvirt_qmf_cxx_so_SOURCES:.cpp=.opp} -- $(CXX) -o $@ $^ $(LIBS) -shared $(VIRT_QPID) -+ $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) -shared $(VIRT_QPID) - - pm-fence.so: ${pm_fence_so_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -shared $(PACEMAKER_LIBS) -+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -shared $(PACEMAKER_LIBS) - - cpg.so: ${cpg_so_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) $(XML_LIBS) $(COROSYNC_LIBS) -+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) $(XML_LIBS) $(COROSYNC_LIBS) - - null.so: ${null_so_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -shared -+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -shared - - serial.so: ${serial_so_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) $(XML_LIBS) -+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS) $(UUID_LIBS) $(XML_LIBS) - - tcp.so: ${tcp_so_SOURCES:.c=.o} -- $(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS) -+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -shared $(NSS_LIBS) -+ -+cpg-virt.o: cpg-virt.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ -+virt.o: virt.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ -+virt-serial.o: virt-serial.c -+ $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) - - %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES) - - %.opp: %.cpp -- $(CXX) $(CFLAGS) -c -o $@ $^ $(INCLUDES) -+ $(CXX) $(CXXFLAGS) -c -o $@ $^ $(INCLUDES) - - install: all - if [ ! -d ${DESTDIR}/${sbindir} ]; then \ diff --git a/SOURCES/bz1624110-2-fence_virt-fix-coredump.patch b/SOURCES/bz1624110-2-fence_virt-fix-coredump.patch deleted file mode 100644 index 0e74386..0000000 --- a/SOURCES/bz1624110-2-fence_virt-fix-coredump.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -uNr a/client/Makefile.in b/client/Makefile.in ---- a/client/Makefile.in 2019-04-10 11:06:55.428378274 +0200 -+++ b/client/Makefile.in 2019-04-10 13:02:54.734002880 +0200 -@@ -40,16 +40,7 @@ - ln -snf $^ $@ - - fence_virt: ${fence_virt_SOURCES:.c=.o} -- $(CC) $(CFLAGS) -o $@ $^ -shared $(LIBS) -L../common -lfence_virt -- --mcast.o: mcast.c -- $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -- --options.o: options.c -- $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -- --serial.o: serial.c -- $(CC) $(CFLAGS) -fPIC -c -o $@ $^ $(INCLUDES) -+ $(CC) $(CFLAGS) -pie -o $@ $^ $(LIBS) -L../common -lfence_virt - - %.o: %.c - $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES) diff --git a/SOURCES/bz1668357-fence_virt-dont-report-success-incorrect-parameter.patch b/SOURCES/bz1668357-fence_virt-dont-report-success-incorrect-parameter.patch deleted file mode 100644 index 6c541f9..0000000 --- a/SOURCES/bz1668357-fence_virt-dont-report-success-incorrect-parameter.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 83e507cd236c304ce6b95b2ba52d3894f8002dc8 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Fri, 9 Nov 2018 13:10:29 +0100 -Subject: [PATCH] fence_virt: dont report success for incorrect parameters - ---- - client/main.c | 2 +- - client/options.c | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/client/main.c b/client/main.c -index 8e94093..a3135e3 100644 ---- a/client/main.c -+++ b/client/main.c -@@ -112,7 +112,7 @@ main(int argc, char **argv) - args.mode = MODE_VSOCK; - - if (args.flags & F_ERR) { -- if (args.op != FENCE_VALIDATEALL) -+ if (args.op != FENCE_VALIDATEALL) - args_usage(argv[0], my_options, (argc == 1)); - exit(1); - } -diff --git a/client/options.c b/client/options.c -index a3f321b..4b5ed56 100644 ---- a/client/options.c -+++ b/client/options.c -@@ -904,6 +904,7 @@ args_get_stdin(const char *optstr, fence_virt_args_t *args) - "parse warning: " - "illegal variable '%s' on line %d\n", name, - line); -+ args->flags |= F_ERR; - continue; - } - diff --git a/SOURCES/bz1766993-fence_virtd-1-fix-segfault-no-domains.patch b/SOURCES/bz1766993-fence_virtd-1-fix-segfault-no-domains.patch deleted file mode 100644 index a746ba4..0000000 --- a/SOURCES/bz1766993-fence_virtd-1-fix-segfault-no-domains.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 36367a99eb803a7941f6cbfd6086e7a71bf91e21 Mon Sep 17 00:00:00 2001 -From: Andrew Price -Date: Tue, 29 Oct 2019 11:27:06 +0000 -Subject: [PATCH] fence_virtd: Fix segfault in vl_get when no domains are found - -If virConnectListAllDomains() returns 0 on every iteration, the loop -will end with a vl == NULL and the pointer dereference in the qsort() -call will result in a segfault. Check for NULL on completion of the loop -to guard against that. - -Signed-off-by: Andrew Price ---- - server/virt.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/server/virt.c b/server/virt.c -index 9710791..ed08e0c 100644 ---- a/server/virt.c -+++ b/server/virt.c -@@ -128,6 +128,9 @@ virt_list_t *vl_get(virConnectPtr *vp, int vp_count, int my_id) - - _free_dom_list(dom_list, ret); - } -+ /* No domains found */ -+ if (!vl) -+ return NULL; - - /* We have all the locally running domains & states now */ - /* Sort */ diff --git a/SOURCES/bz1766993-fence_virtd-2-return-mainloop-on-interrupt.patch b/SOURCES/bz1766993-fence_virtd-2-return-mainloop-on-interrupt.patch deleted file mode 100644 index 152d8f3..0000000 --- a/SOURCES/bz1766993-fence_virtd-2-return-mainloop-on-interrupt.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 958c0035aa6a69149c1a0fa218863c26e755d9e6 Mon Sep 17 00:00:00 2001 -From: Ryan McCabe -Date: Fri, 19 Jan 2018 11:04:22 -0500 -Subject: [PATCH] fence_virtd: Return control to main loop on select - interruption - -Return control to the dispatch loop if select is interrupted by a -signal. The code that retried the select without breaking out of the -dispatch loop caused the daemon to not be able to be killed cleanly. - -Resolves: https://github.com/ClusterLabs/fence-virt/issues/10 - -Signed-off-by: Ryan McCabe ---- - server/mcast.c | 9 +++++++-- - server/serial.c | 9 ++++++--- - server/tcp.c | 9 +++++++-- - 4 files changed, 28 insertions(+), 9 deletions(-) - -diff --git a/server/mcast.c b/server/mcast.c -index 0336823..e103675 100644 ---- a/server/mcast.c -+++ b/server/mcast.c -@@ -350,9 +350,14 @@ mcast_dispatch(listener_context_t c, struct timeval *timeout) - FD_ZERO(&rfds); - FD_SET(info->mc_sock, &rfds); - -- n = _select_retry((info->mc_sock)+1, &rfds, NULL, NULL, timeout); -- if (n <= 0) -+ n = select((info->mc_sock)+1, &rfds, NULL, NULL, timeout); -+ if (n <= 0) { -+ if (errno == EINTR || errno == EAGAIN) -+ n = 0; -+ else -+ dbg_printf(2, "select: %s\n", strerror(errno)); - return n; -+ } - - slen = sizeof(sin); - len = recvfrom(info->mc_sock, &data, sizeof(data), 0, -diff --git a/server/serial.c b/server/serial.c -index 70eb22b..23d143d 100644 ---- a/server/serial.c -+++ b/server/serial.c -@@ -272,9 +272,12 @@ serial_dispatch(listener_context_t c, struct timeval *timeout) - if (info->wake_fd > max) - max = info->wake_fd; - -- n = _select_retry(max+1, &rfds, NULL, NULL, timeout); -- if (n < 0) { -- dbg_printf(2, "select: %s\n", strerror(errno)); -+ n = select(max+1, &rfds, NULL, NULL, timeout); -+ if (n <= 0) { -+ if (errno == EINTR || errno == EAGAIN) -+ n = 0; -+ else -+ dbg_printf(2, "select: %s\n", strerror(errno)); - return n; - } - -diff --git a/server/tcp.c b/server/tcp.c -index 09366b7..bbd347e 100644 ---- a/server/tcp.c -+++ b/server/tcp.c -@@ -278,9 +278,14 @@ tcp_dispatch(listener_context_t c, struct timeval *timeout) - FD_ZERO(&rfds); - FD_SET(info->listen_sock, &rfds); - -- n = _select_retry(info->listen_sock + 1, &rfds, NULL, NULL, timeout); -- if (n <= 0) -+ n = select(info->listen_sock + 1, &rfds, NULL, NULL, timeout); -+ if (n <= 0) { -+ if (errno == EINTR || errno == EAGAIN) -+ n = 0; -+ else -+ dbg_printf(2, "select: %s\n", strerror(errno)); - return n; -+ } - - client_fd = accept(info->listen_sock, NULL, NULL); - if (client_fd < 0) { diff --git a/SPECS/fence-virt.spec b/SPECS/fence-virt.spec index 5d0d64c..378092b 100644 --- a/SPECS/fence-virt.spec +++ b/SPECS/fence-virt.spec @@ -1,117 +1,58 @@ -Name: fence-virt -Version: 0.4.0 -Release: 9%{?dist} -Summary: A pluggable fencing framework for virtual machines -Group: System Environment/Base -License: GPLv2+ +############################################################################### +############################################################################### +## +## Copyright (C) 2019 Red Hat, Inc. All rights reserved. +## +## This copyrighted material is made available to anyone wishing to use, +## modify, copy, or redistribute it subject to the terms and conditions +## of the GNU General Public License v.2. +## +############################################################################### +############################################################################### + +Name: fence-virt +Summary: A pluggable fencing framework for virtual machines +Version: 1.0.0 +Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +License: GPLv2+ +Group: System Environment/Base +URL: https://github.com/ClusterLabs/fence-virt +Source0: %{name}-%{version}%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.bz2 %if 0%{?rhel} ExclusiveArch: i686 x86_64 %endif -URL: http://fence-virt.sourceforge.net -Source0: http://people.redhat.com/rmccabe/fence-virt/%{name}-%{version}.tar.bz2 -Patch0: bz1624110-1-harden-fPIE.patch -Patch1: bz1624110-2-fence_virt-fix-coredump.patch -Patch2: bz1668357-fence_virt-dont-report-success-incorrect-parameter.patch -Patch3: bz1766993-fence_virtd-1-fix-segfault-no-domains.patch -Patch4: bz1766993-fence_virtd-2-return-mainloop-on-interrupt.patch - -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +%if 0%{?suse_version} +%define nss_devel mozilla-nss-devel +%define nspr_devel mozilla-nspr-devel +%define systemd_units systemd +%else +%define nss_devel nss-devel +%define nspr_devel nspr-devel +%define systemd_units systemd-units +%endif -BuildRequires: corosynclib-devel libvirt-devel -BuildRequires: automake autoconf libxml2-devel nss-devel nspr-devel -BuildRequires: flex bison libuuid-devel +BuildRequires: gcc +BuildRequires: corosynclib-devel libvirt-devel +BuildRequires: automake autoconf libtool libxml2-devel %{nss_devel} %{nspr_devel} +BuildRequires: flex bison libuuid-devel -BuildRequires: systemd-units -Requires(post): systemd-sysv systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +BuildRequires: systemd-units +Requires(post): systemd-sysv systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units Conflicts: fence-agents < 3.0.5-2 - -%description -Fencing agent for virtual machines. - - -%package -n fence-virtd -Summary: Daemon which handles requests from fence-virt -Group: System Environment/Base - -%description -n fence-virtd -This package provides the host server framework, fence_virtd, -for fence_virt. The fence_virtd host daemon is resposible for -processing fencing requests from virtual machines and routing -the requests to the appropriate physical machine for action. - - -%package -n fence-virtd-multicast -Summary: Multicast listener for fence-virtd -Group: System Environment/Base -Requires: fence-virtd - -%description -n fence-virtd-multicast -Provides multicast listener capability for fence-virtd. - - -%package -n fence-virtd-serial -Summary: Serial VMChannel listener for fence-virtd -Group: System Environment/Base -Requires: libvirt >= 0.6.2 -Requires: fence-virtd - -%description -n fence-virtd-serial -Provides serial VMChannel listener capability for fence-virtd. - -%package -n fence-virtd-tcp -Summary: TCP listener for fence-virtd -Group: System Environment/Base -Requires: fence-virtd - -%description -n fence-virtd-tcp -Provides TCP listener capability for fence-virtd. - - -%package -n fence-virtd-libvirt -Summary: Libvirt backend for fence-virtd -Group: System Environment/Base -Requires: libvirt >= 0.6.0 -Requires: fence-virtd - -%description -n fence-virtd-libvirt -Provides fence_virtd with a connection to libvirt to fence -virtual machines. Useful for running a cluster of virtual -machines on a desktop. - - -%package -n fence-virtd-cpg -Summary: CPG/libvirt backend for fence-virtd -Group: System Environment/Base -Requires: corosynclib -Requires: fence-virtd - -%description -n fence-virtd-cpg -Provides fence_virtd with a connection to libvirt to fence -virtual machines. Uses corosync CPG to keep track of VM -locations to allow for non-local VMs to be fenced when VMs -are located on corosync cluster nodes. - - %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -F1 -%patch3 -p1 -%patch4 -p1 +%autosetup -p1 %build ./autogen.sh %{configure} --disable-libvirt-qmf-plugin --enable-cpg-plugin make %{?_smp_mflags} - %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} @@ -120,30 +61,19 @@ make install DESTDIR=%{buildroot} mkdir -p %{buildroot}/%{_unitdir}/ install -m 0644 fence_virtd.service %{buildroot}/%{_unitdir}/ -%clean -rm -rf %{buildroot} - - -%files -%defattr(-,root,root,-) -%doc COPYING TODO README -%{_sbindir}/fence_virt -%{_sbindir}/fence_xvm -%{_mandir}/man8/fence_virt.* -%{_mandir}/man8/fence_xvm.* - +rm -f %{buildroot}/%{_libdir}/%{name}/*.*a %post ccs_update_schema > /dev/null 2>&1 ||: # https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd -if [ $1 -eq 1 ] ; then - # Initial installation +if [ $1 -eq 1 ]; then + # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %preun # https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd -if [ $1 -eq 0 ] ; then +if [ $1 -eq 0 ]; then # Package removal, not upgrade /bin/systemctl --no-reload disable fence_virtd.service &> /dev/null || : /bin/systemctl stop fence_virtd.service &> /dev/null || : @@ -152,12 +82,11 @@ fi %postun # https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd /bin/systemctl daemon-reload &> /dev/null || : -if [ $1 -ge 1 ] ; then +if [ $1 -ge 1 ]; then # Package upgrade, not uninstall /bin/systemctl try-restart fence_virtd.service &> /dev/null || : fi - %triggerun -- fence_virtd < 0.3.0-1 # https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Packages_migrating_to_a_systemd_unit_file_from_a_SysV_initscript /usr/bin/systemd-sysv-convert --save fence_virtd &> /dev/null || : @@ -165,37 +94,91 @@ fi /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl try-restart fence_virtd.service &> /dev/null || : +%description +Fencing agent for virtual machines. + +%files +%doc COPYING TODO README +%{_sbindir}/fence_virt +%{_sbindir}/fence_xvm +%{_mandir}/man8/fence_virt.* +%{_mandir}/man8/fence_xvm.* +%package -n fence-virtd +Summary: Daemon which handles requests from fence-virt +Group: System Environment/Base +%description -n fence-virtd +This package provides the host server framework, fence_virtd, +for fence_virt. The fence_virtd host daemon is resposible for +processing fencing requests from virtual machines and routing +the requests to the appropriate physical machine for action. %files -n fence-virtd -%defattr(-,root,root,-) %{_sbindir}/fence_virtd %{_unitdir}/fence_virtd.service %config(noreplace) %{_sysconfdir}/fence_virt.conf %dir %{_libdir}/%{name} +%{_libdir}/%{name}/vsock.so %{_mandir}/man5/fence_virt.conf.* %{_mandir}/man8/fence_virtd.* +%package -n fence-virtd-multicast +Summary: Multicast listener for fence-virtd +Group: System Environment/Base +Requires: fence-virtd +%description -n fence-virtd-multicast +Provides multicast listener capability for fence-virtd. %files -n fence-virtd-multicast -%defattr(-,root,root,-) %{_libdir}/%{name}/multicast.so +%package -n fence-virtd-serial +Summary: Serial VMChannel listener for fence-virtd +Group: System Environment/Base +Requires: libvirt >= 0.6.2 +Requires: fence-virtd +%description -n fence-virtd-serial +Provides serial VMChannel listener capability for fence-virtd. %files -n fence-virtd-serial -%defattr(-,root,root,-) %{_libdir}/%{name}/serial.so +%package -n fence-virtd-tcp +Summary: TCP listener for fence-virtd +Group: System Environment/Base +Requires: fence-virtd +%description -n fence-virtd-tcp +Provides TCP listener capability for fence-virtd. %files -n fence-virtd-tcp -%defattr(-,root,root,-) %{_libdir}/%{name}/tcp.so +%package -n fence-virtd-libvirt +Summary: Libvirt backend for fence-virtd +Group: System Environment/Base +Requires: libvirt >= 0.6.0 +Requires: fence-virtd +%description -n fence-virtd-libvirt +Provides fence_virtd with a connection to libvirt to fence +virtual machines. Useful for running a cluster of virtual +machines on a desktop. %files -n fence-virtd-libvirt -%defattr(-,root,root,-) -%{_libdir}/%{name}/libvirt.so +%{_libdir}/%{name}/virt.so +%package -n fence-virtd-cpg +Summary: CPG/libvirt backend for fence-virtd +Group: System Environment/Base +Requires: corosynclib +Requires: fence-virtd +%description -n fence-virtd-cpg +Provides fence_virtd with a connection to libvirt to fence +virtual machines. Uses corosync CPG to keep track of VM +locations to allow for non-local VMs to be fenced when VMs +are located on corosync cluster nodes. %files -n fence-virtd-cpg -%defattr(-,root,root,-) %{_libdir}/%{name}/cpg.so %changelog +* Wed Mar 11 2020 Oyvind Albrigtsen - 1.0.0-1 +- Rebase to fence-virt-1.0.0 + Resolves: rhbz#1774394 + * Thu Jan 30 2020 Oyvind Albrigtsen - 0.4.0-9 - fence_virtd: fix segfault when no domains are found Resolves: rhbz#1766993