Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package resource-agents

New release includes an upstream patch for IPv6addr agent problem
reported in #1034280 and refreshes existing patches.

[ Reason ]
Patch fixes a bug where IPv6addr agent does not work correctly in
some situations.

[ Impact ]
Specific agent might not work reliably.

[ Tests ]
IPv6addr is currently not covered by autopkgtest, so only
manual tests.

[ Risks ]
The code change is small and does does not affect other agents
so the risk should be low.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
Already uploaded to unstable as I did not realize it was
a key package due to some dependency.

unblock resource-agents/1:4.12.0-2


diff -Nru resource-agents-4.12.0/debian/changelog 
resource-agents-4.12.0/debian/changelog
--- resource-agents-4.12.0/debian/changelog     2023-01-26 00:44:32.000000000 
+0100
+++ resource-agents-4.12.0/debian/changelog     2023-04-13 21:43:52.000000000 
+0200
@@ -1,3 +1,10 @@
+resource-agents (1:4.12.0-2) unstable; urgency=medium
+
+  * debian/patches: add IPv6addr-delay.patch (Closes: #1034280)
+  * debian/patches: refresh patches offsets
+
+ -- Valentin Vidic <vvi...@debian.org>  Thu, 13 Apr 2023 21:43:52 +0200
+
 resource-agents (1:4.12.0-1) unstable; urgency=medium
 
   * New upstream version 4.12.0
diff -Nru resource-agents-4.12.0/debian/patches/01_docbook_patch.patch 
resource-agents-4.12.0/debian/patches/01_docbook_patch.patch
--- resource-agents-4.12.0/debian/patches/01_docbook_patch.patch        
2020-12-14 15:52:50.000000000 +0100
+++ resource-agents-4.12.0/debian/patches/01_docbook_patch.patch        
2023-04-13 21:40:59.000000000 +0200
@@ -3,9 +3,8 @@
 Last-Update: 2011-10-20
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-diff -ruN ClusterLabs-resource-agents-dc69db5.orig/doc/man/Makefile.am 
ClusterLabs-resource-agents-dc69db5/doc/man/Makefile.am
---- ClusterLabs-resource-agents-dc69db5.orig/doc/man/Makefile.am       
2012-10-05 19:27:22.000000000 +0000
-+++ ClusterLabs-resource-agents-dc69db5/doc/man/Makefile.am    2012-10-09 
11:20:26.009849098 +0000
+--- a/doc/man/Makefile.am
++++ b/doc/man/Makefile.am
 @@ -26,7 +26,7 @@
  
  CLEANFILES              = $(man_MANS) $(xmlfiles) metadata-*.xml
diff -Nru resource-agents-4.12.0/debian/patches/gitignore.patch 
resource-agents-4.12.0/debian/patches/gitignore.patch
--- resource-agents-4.12.0/debian/patches/gitignore.patch       2022-04-06 
22:06:34.000000000 +0200
+++ resource-agents-4.12.0/debian/patches/gitignore.patch       2023-04-13 
21:41:02.000000000 +0200
@@ -8,7 +8,7 @@
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/.gitignore
 +++ b/.gitignore
-@@ -122,7 +122,6 @@
+@@ -123,7 +123,6 @@
  MISC_ERRORS
  cscope.files
  cscope.out
@@ -16,7 +16,7 @@
  updates
  logs
  
-@@ -134,8 +133,6 @@
+@@ -135,8 +134,6 @@
  *.gz
  *.xz
  *.sed
diff -Nru resource-agents-4.12.0/debian/patches/IPv6addr-delay.patch 
resource-agents-4.12.0/debian/patches/IPv6addr-delay.patch
--- resource-agents-4.12.0/debian/patches/IPv6addr-delay.patch  1970-01-01 
01:00:00.000000000 +0100
+++ resource-agents-4.12.0/debian/patches/IPv6addr-delay.patch  2023-04-13 
21:41:03.000000000 +0200
@@ -0,0 +1,69 @@
+From 729aec1924a700bcadbcf77ae4351da9acbd8c3e Mon Sep 17 00:00:00 2001
+From: Richard Fuchs <rfu...@sipwise.com>
+Date: Thu, 30 Mar 2023 07:37:02 -0400
+Subject: [PATCH] IPv6addr: expect ping/pong delay
+
+Under heavy network load, the echo response to an echo request that was
+just sent may not immediately be available for reading, with
+recvmsg(MSG_DONTWAIT) failing with EAGAIN. This leads to occasional
+false positive "not running" events.
+
+This wraps the recvmsg() within a poll() loop with a short timeout (10
+ms) and retries reading the echo response up to 3 times, in case poll()
+was interrupted by some other event (e.g. EINTR).
+
+Closes #1855
+---
+ heartbeat/IPv6addr.c | 25 +++++++++++++++++++++----
+ 1 file changed, 21 insertions(+), 4 deletions(-)
+
+--- a/heartbeat/IPv6addr.c
++++ b/heartbeat/IPv6addr.c
+@@ -104,6 +104,7 @@
+ #include <syslog.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <poll.h>
+ #include <clplumbing/cl_log.h>
+ 
+ 
+@@ -606,6 +607,8 @@
+       struct iovec                    iov;
+       u_char                          packet[MINPACKSIZE];
+       struct msghdr                   msg;
++      int                             i;
++      struct pollfd                   pfd;
+ 
+       if ((icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) == -1) {
+               return -1;
+@@ -644,12 +647,26 @@
+       msg.msg_control = NULL;
+       msg.msg_controllen = 0;
+ 
+-      ret = recvmsg(icmp_sock, &msg, MSG_DONTWAIT);
+-      if (0 >= ret) {
+-              return -1;
++      for (i = 0; i < 3; i++) {
++              pfd.fd = icmp_sock;
++              pfd.events = POLLIN;
++              pfd.revents = 0;
++              ret = poll(&pfd, 1, 10);
++
++              if (ret < 1)
++                      continue;
++
++              ret = recvmsg(icmp_sock, &msg, MSG_DONTWAIT);
++              if (ret > 0)
++                      return 0;
++              if (ret == 0)
++                      break;
++
++              if (errno != EAGAIN && errno != EWOULDBLOCK && errno != EINTR)
++                      break;
+       }
+       
+-      return 0;
++      return -1;
+ }
+ 
+ static void usage(const char* self)
diff -Nru resource-agents-4.12.0/debian/patches/ipv6-linux-only 
resource-agents-4.12.0/debian/patches/ipv6-linux-only
--- resource-agents-4.12.0/debian/patches/ipv6-linux-only       2022-04-06 
22:06:29.000000000 +0200
+++ resource-agents-4.12.0/debian/patches/ipv6-linux-only       2023-04-13 
21:41:01.000000000 +0200
@@ -6,7 +6,7 @@
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/configure.ac
 +++ b/configure.ac
-@@ -802,8 +802,8 @@
+@@ -807,8 +807,8 @@
  dnl ************************************************************************
  dnl * Check for netinet/icmp6.h to enable the IPv6addr resource agent
  AC_CHECK_HEADERS(netinet/icmp6.h,[],[],[#include <sys/types.h>])
diff -Nru resource-agents-4.12.0/debian/patches/reproducible.patch 
resource-agents-4.12.0/debian/patches/reproducible.patch
--- resource-agents-4.12.0/debian/patches/reproducible.patch    2022-04-06 
22:06:37.000000000 +0200
+++ resource-agents-4.12.0/debian/patches/reproducible.patch    2023-04-13 
21:41:02.000000000 +0200
@@ -8,7 +8,7 @@
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/configure.ac
 +++ b/configure.ac
-@@ -829,7 +829,7 @@
+@@ -834,7 +834,7 @@
          CFLAGS="$CFLAGS -g"
        enable_fatal_warnings=no
  else
diff -Nru resource-agents-4.12.0/debian/patches/series 
resource-agents-4.12.0/debian/patches/series
--- resource-agents-4.12.0/debian/patches/series        2023-01-26 
00:43:36.000000000 +0100
+++ resource-agents-4.12.0/debian/patches/series        2023-04-13 
21:40:35.000000000 +0200
@@ -6,3 +6,4 @@
 gitignore.patch
 reproducible.patch
 var-run.patch
+IPv6addr-delay.patch

Reply via email to