integ/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/0010-Format-DRBD-resource-cpu-mask-to-support-64-or-larger-cpus.patch
Dan Voiculeasa 9311089520 Add debian package for puppet-drbd
This package is 3rdparty. Get latest release which is 0.5.2.
Not much difference between 0.3.1 release used on CentOS and 0.5.2.

Did build puppet-drbd-0.5.2 + starlingx patches (adapted from
CentOS7). Adapted all patches.
Adapt patch 0001. Keep 0002->0010.
Did build an iso.

Story: 2009101
Task: 43379
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: Ifa748c2ba7ca0cddb7d829c88e852247929f549e
2021-09-28 12:42:32 +03:00

44 lines
1.5 KiB
Diff

From 65b4c4ca7da29d4d91f3d61c4dd1f59fb06aeada Mon Sep 17 00:00:00 2001
From: Jim Gauld <james.gauld@windriver.com>
Date: Wed, 28 Oct 2020 17:09:20 -0400
Subject: [PATCH] Format DRBD resource cpu-mask to support 64 or larger cpus
This changes the input format of DRBD resource config option
cpu-mask so it is correctly parsed in the kernel. The underlying
bitmap_parse routine expects large hex values delimited every 8
characters with a comma.
e.g., On large cpu systems, we would see the following kern.log :
2020-10-13T20:55:34.079 controller-0 kernel: warning [ 269.423462] drbd
drbd-dockerdistribution: Overflow in bitmap_parse(300000003), truncating
to 64 bits
This resulted in drbd_w_* tasks affined to individual cores instead of
platform cores.
Signed-off-by: Jim Gauld <james.gauld@windriver.com>
---
templates/header.res.erb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/templates/header.res.erb b/templates/header.res.erb
index df52544..6ac837b 100644
--- a/templates/header.res.erb
+++ b/templates/header.res.erb
@@ -31,7 +31,11 @@ resource <%= @name %> {
<% if @cpumask -%>
options {
- cpu-mask <%= @cpumask %>;
+<%# To support 64 cpu systems or larger, need to format cpu-mask string
+with surrounding double quotes. Also must delimit the hex string in
+8 character groups starting from the right. This prevents DRBD kernel
+module bitmap_parse() routine from truncating input at 64 bits. -%>
+ cpu-mask "<%= @cpumask.reverse.scan(/.{1,8}/).join(',').reverse %>";
}
<% end -%>
--
1.8.3.1