[fence-virt] * Sun Nov 03 2013 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-16 - Drop executable flags of manual page

Ryan McCabe rmccabe at fedoraproject.org
Sun Nov 3 18:03:57 UTC 2013


commit 1aeef05cc393b650e86008702806e77e6e50fb9a
Author: Ryan McCabe <rmccabe at redhat.com>
Date:   Sun Nov 3 13:03:44 2013 -0500

    * Sun Nov 03 2013 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-16
    - Drop executable flags of manual pages
    - Fix for missed libvirtd events
    - Fix for broken systemd service file

 Drop-executable-flag-for-man-pages-finally.patch   |   38 ++++++++
 Drop-executable-flag-for-man-pages.patch           |   35 +++++++
 Fix-using-bad-struct-item-for-auth-algorithm.patch |   38 ++++++++
 ...ump-all-arguments-structure-in-debug-mode.patch |   57 +++++++++++
 fence-virt-Fix-for-missed-libvirtd-events.patch    |   98 ++++++++++++++++++++
 fence-virt.spec                                    |   22 ++++-
 ...fence_xvm-Print-status-when-invoked-with-.patch |   38 ++++++++
 fence_virtd-Fix-broken-systemd-service-file.patch  |   44 +++++++++
 8 files changed, 368 insertions(+), 2 deletions(-)
---
diff --git a/Drop-executable-flag-for-man-pages-finally.patch b/Drop-executable-flag-for-man-pages-finally.patch
new file mode 100644
index 0000000..3c5c93f
--- /dev/null
+++ b/Drop-executable-flag-for-man-pages-finally.patch
@@ -0,0 +1,38 @@
+From 60e14071b7b43df56e023814326334a0768f5097 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny at redhat.com>
+Date: Tue, 4 Dec 2012 22:37:20 +0100
+Subject: [PATCH 07/10] Drop executable flag for man pages (finally)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Accidentally, 8cda792ac510fe3d62bfe29e71004b643ade9e7e did only a part
+of it.
+
+Reported-by: Lon Hohberger <lhh at redhat.com>
+Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
+---
+ man/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/man/Makefile.in b/man/Makefile.in
+index 21dda33..5f748b6 100644
+--- a/man/Makefile.in
++++ b/man/Makefile.in
+@@ -21,11 +21,11 @@ install: all
+ 	if [ ! -d ${DESTDIR}/${mandir}/man8 ]; then \
+ 		install -d ${DESTDIR}/${mandir}/man8 ; \
+ 	fi
+-	install -m655 ${MAN8} ${DESTDIR}/${mandir}/man8
++	install -m644 ${MAN8} ${DESTDIR}/${mandir}/man8
+ 	if [ ! -d ${DESTDIR}/${mandir}/man5 ]; then \
+ 		install -d ${DESTDIR}/${mandir}/man5 ; \
+ 	fi
+-	install -m655 ${MAN5} ${DESTDIR}/${mandir}/man5
++	install -m644 ${MAN5} ${DESTDIR}/${mandir}/man5
+ 
+ 
+ clean:
+-- 
+1.8.3.1
+
diff --git a/Drop-executable-flag-for-man-pages.patch b/Drop-executable-flag-for-man-pages.patch
new file mode 100644
index 0000000..9fa3fd5
--- /dev/null
+++ b/Drop-executable-flag-for-man-pages.patch
@@ -0,0 +1,35 @@
+From 8cda792ac510fe3d62bfe29e71004b643ade9e7e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny at redhat.com>
+Date: Tue, 27 Nov 2012 18:00:31 +0100
+Subject: [PATCH 04/10] Drop executable flag for man pages
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported-by: rpmlint <http://rpmlint.zarb.org/cgi-bin/trac.cgi>
+Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
+---
+ man/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/man/Makefile.in b/man/Makefile.in
+index 1fdde67..21dda33 100644
+--- a/man/Makefile.in
++++ b/man/Makefile.in
+@@ -21,11 +21,11 @@ install: all
+ 	if [ ! -d ${DESTDIR}/${mandir}/man8 ]; then \
+ 		install -d ${DESTDIR}/${mandir}/man8 ; \
+ 	fi
+-	install -m755 ${MAN8} ${DESTDIR}/${mandir}/man8
++	install -m655 ${MAN8} ${DESTDIR}/${mandir}/man8
+ 	if [ ! -d ${DESTDIR}/${mandir}/man5 ]; then \
+ 		install -d ${DESTDIR}/${mandir}/man5 ; \
+ 	fi
+-	install -m755 ${MAN5} ${DESTDIR}/${mandir}/man5
++	install -m655 ${MAN5} ${DESTDIR}/${mandir}/man5
+ 
+ 
+ clean:
+-- 
+1.8.3.1
+
diff --git a/Fix-using-bad-struct-item-for-auth-algorithm.patch b/Fix-using-bad-struct-item-for-auth-algorithm.patch
new file mode 100644
index 0000000..f2cf7af
--- /dev/null
+++ b/Fix-using-bad-struct-item-for-auth-algorithm.patch
@@ -0,0 +1,38 @@
+From 57ffe8bf9fc1c4c533b5e34ae5f14e5fb04c0533 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny at redhat.com>
+Date: Mon, 26 Nov 2012 20:04:08 +0100
+Subject: [PATCH 05/10] Fix using bad struct item for auth algorithm
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
+---
+ server/mcast.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/server/mcast.c b/server/mcast.c
+index de81bac..00a31ab 100644
+--- a/server/mcast.c
++++ b/server/mcast.c
+@@ -447,13 +447,13 @@ mcast_config(config_object_t *config, mcast_options *args)
+ 		   value, sizeof(value)-1) == 0) {
+ 		dbg_printf(1, "Got %s for auth\n", value);
+ 		if (!strcasecmp(value, "none")) {
+-			args->hash = AUTH_NONE;
++			args->auth = AUTH_NONE;
+ 		} else if (!strcasecmp(value, "sha1")) {
+-			args->hash = AUTH_SHA1;
++			args->auth = AUTH_SHA1;
+ 		} else if (!strcasecmp(value, "sha256")) {
+-			args->hash = AUTH_SHA256;
++			args->auth = AUTH_SHA256;
+ 		} else if (!strcasecmp(value, "sha512")) {
+-			args->hash = AUTH_SHA512;
++			args->auth = AUTH_SHA512;
+ 		} else {
+ 			dbg_printf(1, "Unsupported auth: %s\n", value);
+ 			++errors;
+-- 
+1.8.3.1
+
diff --git a/client-dump-all-arguments-structure-in-debug-mode.patch b/client-dump-all-arguments-structure-in-debug-mode.patch
new file mode 100644
index 0000000..83cef5d
--- /dev/null
+++ b/client-dump-all-arguments-structure-in-debug-mode.patch
@@ -0,0 +1,57 @@
+From 5ac1d63528ba4c98ff6a9f5ae9c9579d9034ea6b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny at redhat.com>
+Date: Tue, 4 Dec 2012 23:02:41 +0100
+Subject: [PATCH 08/10] client: dump all arguments structure in debug mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In longer term, there should be a proper split of common/dedicated
+arguments between modes (disjunct fields via union?) and also
+args_print should dump the arguments as per mode.
+
+Signed-off-by: Jan Pokorný <jpokorny at redhat.com>
+---
+ client/options.c | 21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/client/options.c b/client/options.c
+index 27f899d..653fae4 100644
+--- a/client/options.c
++++ b/client/options.c
+@@ -609,18 +609,25 @@ args_print(fence_virt_args_t *args)
+ 	printf("-- args @ %p --\n", args);
+ 	_pr_str(args->domain);
+ 	_pr_int(args->op);
++	_pr_int(args->mode);
++	_pr_int(args->debug);
++	_pr_int(args->timeout);
++	_pr_int(args->delay);
++	_pr_int(args->retr_time);
++	_pr_int(args->flags);
+ 
++	_pr_str(args->net.addr);
++	_pr_str(args->net.ipaddr);
+ 	_pr_str(args->net.key_file);
++	_pr_int(args->net.port);
+ 	_pr_int(args->net.hash);
+-	_pr_str(args->net.addr);
+ 	_pr_int(args->net.auth);
+-	_pr_int(args->net.port);
+-	_pr_int(args->net.ifindex);
+ 	_pr_int(args->net.family);
+-	_pr_int(args->timeout);
+-	_pr_int(args->retr_time);
+-	_pr_int(args->flags);
+-	_pr_int(args->debug);
++	_pr_int(args->net.ifindex);
++
++	_pr_str(args->serial.device);
++	_pr_str(args->serial.speed);
++	_pr_str(args->serial.address);
+ 	printf("-- end args --\n");
+ }
+ 
+-- 
+1.8.3.1
+
diff --git a/fence-virt-Fix-for-missed-libvirtd-events.patch b/fence-virt-Fix-for-missed-libvirtd-events.patch
new file mode 100644
index 0000000..ca95923
--- /dev/null
+++ b/fence-virt-Fix-for-missed-libvirtd-events.patch
@@ -0,0 +1,98 @@
+From 61ab01bb5ccac0cda31989d006693bebbe935025 Mon Sep 17 00:00:00 2001
+From: Ryan McCabe <rmccabe at redhat.com>
+Date: Fri, 13 Sep 2013 15:12:00 -0400
+Subject: [PATCH 10/10] fence-virt: Fix for missed libvirtd events
+
+Fix a bug that caused some libvirtd events to be missed. This bug could
+cause client requests to fail in cases where VMs were either started or live
+migrated to a node after fence_virtd had already started.
+
+Resolves: rhbz#903172
+
+Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
+---
+ server/serial.c      |  6 ++++--
+ server/virt-serial.c | 21 ++++++++++++---------
+ 2 files changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/server/serial.c b/server/serial.c
+index 83b6c88..5803e6c 100644
+--- a/server/serial.c
++++ b/server/serial.c
+@@ -275,7 +275,9 @@ serial_dispatch(listener_context_t c, struct timeval *timeout)
+ 
+ 	n = select(max+1, &rfds, NULL, NULL, timeout);
+ 	if (n < 0) {
+-		perror("select");
++		if (errno == ETIMEDOUT || errno == EINTR || errno == EAGAIN)
++			return 0;
++		dbg_printf(2, "select: %s\n", strerror(errno));
+ 		return n;
+ 	}
+ 
+@@ -306,7 +308,7 @@ serial_dispatch(listener_context_t c, struct timeval *timeout)
+ 			ret = _read_retry(x, &data, sizeof(data), &tv);
+ 
+ 			if (ret != sizeof(data)) {
+-				if (--n)
++				if (--n > 0)
+ 					continue;
+ 				else
+ 					return 0;
+diff --git a/server/virt-serial.c b/server/virt-serial.c
+index 00cb56e..fff38ef 100644
+--- a/server/virt-serial.c
++++ b/server/virt-serial.c
+@@ -432,8 +432,9 @@ event_thread(void *arg)
+ 		dbg_printf(3," * URI: %s\n", args->uri);
+ 	if (args->path)
+ 		dbg_printf(3," * Socket path: %s\n", args->path);
+-	dbg_printf(3," * Mode: %s\n", args->mode?"VMChannel":"Serial");
++	dbg_printf(3," * Mode: %s\n", args->mode ? "VMChannel" : "Serial");
+ 
++top:
+ 	virEventRegisterImpl(myEventAddHandleFunc,
+ 			     myEventUpdateHandleFunc,
+ 			     myEventRemoveHandleFunc,
+@@ -451,14 +452,13 @@ event_thread(void *arg)
+ 
+ 	registerExisting(dconn, args->path, args->mode);
+ 
+-	/* Add 2 callbacks to prove this works with more than just one */
+ 	callback1ret =
+-	    virConnectDomainEventRegister(dconn, myDomainEventCallback1,
+-					  arg, NULL);
++	    virConnectDomainEventRegister(dconn, myDomainEventCallback1, arg, NULL);
+ 
+-	if ((callback1ret == 0)) {
++	if (callback1ret == 0) {
+ 		while (run) {
+-			struct pollfd pfd = {.fd = h_fd,
++			struct pollfd pfd = {
++				.fd = h_fd,
+ 				.events = h_event,
+ 				.revents = 0
+ 			};
+@@ -481,13 +481,16 @@ event_thread(void *arg)
+ 
+ 			if (pfd.revents & POLLHUP) {
+ 				DEBUG0("Reset by peer");
+-				goto out;
++				virConnectDomainEventDeregister(dconn, myDomainEventCallback1);
++				if (dconn && virConnectClose(dconn) < 0)
++					dbg_printf(1, "error closing libvirt connection\n");
++				DEBUG0("Attempting to reinitialize libvirt connection");
++				goto top;
+ 			}
+ 
+ 			if (h_cb) {
+ 				h_cb(0, h_fd,
+-				     myPollEventToEventHandleType(pfd.revents &
+-								  h_event),
++				     myPollEventToEventHandleType(pfd.revents & h_event),
+ 				     h_opaque);
+ 			}
+ 		}
+-- 
+1.8.3.1
+
diff --git a/fence-virt.spec b/fence-virt.spec
index d0c07ef..6756dee 100644
--- a/fence-virt.spec
+++ b/fence-virt.spec
@@ -1,6 +1,6 @@
 Name:		fence-virt
 Version:	0.3.0
-Release:	15%{?dist}
+Release:	16%{?dist}
 Summary:	A pluggable fencing framework for virtual machines
 Group:		System Environment/Base
 License:	GPLv2+
@@ -20,6 +20,13 @@ Patch5: Explicitly-set-delay-to-0.patch
 Patch6: Return-success-if-a-domain-exists-but-is-off.patch
 Patch7: use-bswap_X-instead-of-b_swapX.patch
 Patch8: Fail-properly-if-unable-to-bind-the-liste.patch
+Patch9: fence-virt-Fix-for-missed-libvirtd-events.patch
+Patch10: Drop-executable-flag-for-man-pages.patch 
+Patch11: Fix-using-bad-struct-item-for-auth-algorithm.patch
+Patch12: Drop-executable-flag-for-man-pages-finally.patch
+Patch13: client-dump-all-arguments-structure-in-debug-mode.patch
+Patch14: fence_virt-fence_xvm-Print-status-when-invoked-with-.patch
+Patch15: fence_virtd-Fix-broken-systemd-service-file.patch
 
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
@@ -92,7 +99,13 @@ machines on a desktop.
 %patch6 -p1 -b .Return-success-if-a-domain-exists-but-is-off
 %patch7 -p1 -b .use-bswap_X-instead-of-b_swapX
 %patch8 -p1 -b .Fail-properly-if-unable-to-bind-the-liste
-
+%patch9 -p1 -b .fence-virt-Fix-for-missed-libvirtd-events
+%patch10 -p1 -b .Drop-executable-flag-for-man-pages
+%patch11 -p1 -b .Fix-using-bad-struct-item-for-auth-algorithm
+%patch12 -p1 -b .Drop-executable-flag-for-man-pages-finally
+%patch13 -p1 -b .client-dump-all-arguments-structure-in-debug-mode
+%patch14 -p1 -b .fence_virt-fence_xvm-Print-status-when-invoked-with
+%patch15 -p1 -b .fence_virtd-Fix-broken-systemd-service-file
 
 %build
 ./autogen.sh
@@ -176,6 +189,11 @@ fi
 %{_libdir}/%{name}/libvirt.so
 
 %changelog
+* Sun Nov 03 2013 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-16
+- Drop executable flags of manual pages
+- Fix for missed libvirtd events
+- Fix for broken systemd service file
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.0-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/fence_virt-fence_xvm-Print-status-when-invoked-with-.patch b/fence_virt-fence_xvm-Print-status-when-invoked-with-.patch
new file mode 100644
index 0000000..dea5441
--- /dev/null
+++ b/fence_virt-fence_xvm-Print-status-when-invoked-with-.patch
@@ -0,0 +1,38 @@
+From bf3a1ec00a0f8c25d67a1675f5e4e1bd0e7daabd Mon Sep 17 00:00:00 2001
+From: Ryan McCabe <rmccabe at redhat.com>
+Date: Sun, 3 Nov 2013 12:44:49 -0500
+Subject: [PATCH 1/2] fence_virt/fence_xvm: Print status when invoked with -o
+ status
+
+Previously no status was printed to stdout when fence_virt and fence_xvm
+were invoked with the -o status flag. The exit code of the program was
+the only way to determine the result of the status operation. This
+patch causes fence_virt and fence_xvm to additionally print
+either "Status: ON" or "Status: OFF" when it is able to determine
+the status.
+
+Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
+---
+ client/main.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/client/main.c b/client/main.c
+index 3c72d08..7be4a8e 100644
+--- a/client/main.c
++++ b/client/main.c
+@@ -138,7 +138,12 @@ main(int argc, char **argv)
+ 
+ 	switch(ret) {
+ 	case RESP_OFF:
++		if (args.op == FENCE_STATUS)
++			printf("Status: OFF\n");
++		break;
+ 	case 0:
++		if (args.op == FENCE_STATUS)
++			printf("Status: ON\n");
+ 		break;
+ 	case RESP_FAIL:
+ 		printf("Operation failed\n");
+-- 
+1.8.3.1
+
diff --git a/fence_virtd-Fix-broken-systemd-service-file.patch b/fence_virtd-Fix-broken-systemd-service-file.patch
new file mode 100644
index 0000000..ff64f66
--- /dev/null
+++ b/fence_virtd-Fix-broken-systemd-service-file.patch
@@ -0,0 +1,44 @@
+From 09488e9c03118f6b4431e1c6d7e66e4fca1bdadc Mon Sep 17 00:00:00 2001
+From: Ryan McCabe <rmccabe at redhat.com>
+Date: Sun, 3 Nov 2013 12:49:55 -0500
+Subject: [PATCH 2/2] fence_virtd: Fix broken systemd service file
+
+Fix broken systemd service file caused by the inclusion of
+network.target, which has been removed.
+
+Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
+---
+ fence_virtd.service.in | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/fence_virtd.service.in b/fence_virtd.service.in
+index 62a2491..e69d3d3 100644
+--- a/fence_virtd.service.in
++++ b/fence_virtd.service.in
+@@ -1,7 +1,15 @@
+ [Unit]
+ Description=Fence-Virt system host daemon
+-After=syslog.target network.target libvirt-qmf.service libvirtd.service corosync.service
+-Requires=syslog.target network.target
++
++After=basic.target
++After=network.target
++After=syslog.target
++After=libvirt-qmf.service
++After=libvirtd.service
++After=corosync.service
++
++Requires=basic.target
++Requires=network.target
+ 
+ [Install]
+ WantedBy=multi-user.target
+@@ -11,4 +19,5 @@ Type=forking
+ Restart=on-failure
+ SysVStartPriority=99
+ Environment="FENCE_VIRTD_ARGS=-w"
++
+ # Autogenerated below here
+-- 
+1.8.3.1
+


More information about the scm-commits mailing list