[fence-virt] * Wed Jul 10 2013 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-14 - Fail properly when unable to bind th
Ryan McCabe
rmccabe at fedoraproject.org
Wed Jul 10 21:40:37 UTC 2013
commit 0a4814f1cc2037b47f14d3f5282af2c308599a3e
Author: Ryan McCabe <rmccabe at redhat.com>
Date: Wed Jul 10 17:40:21 2013 -0400
* Wed Jul 10 2013 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-14
- Fail properly when unable to bind the TCP listener socket.
- Resolves: rhbz#814515
Fail-properly-if-unable-to-bind-the-liste.patch | 38 +++++++++++++++++++++++
fence-virt.spec | 8 ++++-
2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/Fail-properly-if-unable-to-bind-the-liste.patch b/Fail-properly-if-unable-to-bind-the-liste.patch
new file mode 100644
index 0000000..43ce526
--- /dev/null
+++ b/Fail-properly-if-unable-to-bind-the-liste.patch
@@ -0,0 +1,38 @@
+From 04710b40794fb31e9cd70c4a205decf6b40206fd Mon Sep 17 00:00:00 2001
+From: Ryan McCabe <rmccabe at redhat.com>
+Date: Wed, 10 Jul 2013 17:31:21 -0400
+Subject: [PATCH] fence-virt: Fail properly if unable to bind the listener
+ socket
+
+Bail out properly in multicast mode if we're unable to bind the TCP
+listener socket.
+
+Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
+---
+ client/mcast.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/client/mcast.c b/client/mcast.c
+index ddc1a9c..9ad48ae 100644
+--- a/client/mcast.c
++++ b/client/mcast.c
+@@ -313,11 +313,14 @@ mcast_fence_virt(fence_virt_args_t *args)
+ if (lfd < 0) {
+ printf("Failed to listen: %s\n", strerror(errno));
+ usleep(args->retr_time * 100000);
+- --attempts;
+- continue;
++ if (--attempts > 0)
++ continue;
+ }
+ } while (0);
+
++ if (lfd < 0)
++ return -1;
++
+ gettimeofday(&tv, NULL);
+ seqno = (uint32_t)tv.tv_usec;
+
+--
+1.8.3.1
+
diff --git a/fence-virt.spec b/fence-virt.spec
index ccba7e2..c6a7d37 100644
--- a/fence-virt.spec
+++ b/fence-virt.spec
@@ -1,6 +1,6 @@
Name: fence-virt
Version: 0.3.0
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: A pluggable fencing framework for virtual machines
Group: System Environment/Base
License: GPLv2+
@@ -19,6 +19,7 @@ Patch4: Fix-typo-in-fence_virt-8-man-page.patch
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
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@@ -90,6 +91,7 @@ machines on a desktop.
%patch5 -p1 -b .Explicitly-set-delay-to-0
%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
%build
@@ -174,6 +176,10 @@ fi
%{_libdir}/%{name}/libvirt.so
%changelog
+* Wed Jul 10 2013 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-14
+- Fail properly when unable to bind the TCP listener socket.
+- Resolves: rhbz#814515
+
* Tue May 07 2013 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-13
- Rebuild
More information about the scm-commits
mailing list