diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0011-Fix-DRBD-cephmon-resize.patch b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0011-Fix-DRBD-cephmon-resize.patch new file mode 100644 index 000000000..14e8d91d8 --- /dev/null +++ b/config/puppet-modules/puppet-drbd-0.3.1/centos/files/0011-Fix-DRBD-cephmon-resize.patch @@ -0,0 +1,47 @@ +From 8106a9787d86901d4ed927838503ebe08bf2adcb Mon Sep 17 00:00:00 2001 +From: Felipe Sanches Zanoni +Date: Mon, 14 Feb 2022 12:01:30 -0500 +Subject: [PATCH] Fix DRBD cephmon resize + +--- + manifests/resource/up.pp | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp +index 11cf7ee..8d2f901 100644 +--- a/manifests/resource/up.pp ++++ b/manifests/resource/up.pp +@@ -19,18 +19,29 @@ define drbd::resource::up ( + ], + } + ++ # Ensure DRBD metadata is clear ++ exec { "apply-al DRBD metadata for ${name}": ++ command => "drbdadm apply-al ${name}", ++ onlyif => "drbdadm dump-md ${name} 2>&1 | egrep 'please apply-al'", ++ before => Service['drbd'], ++ require => [ ++ Exec['modprobe drbd'] ++ ], ++ } ++ + # create metadata on device, except if resource seems already initalized. + # drbd is very tenacious about asking for aproval if there is data on the + # volume already. + exec { "initialize DRBD metadata for ${name}": + command => "yes yes | drbdadm create-md ${name} -W--peer-max-bio-size=128k", +- onlyif => "test -e ${disk}", ++ onlyif => "test -e ${disk} && ! drbdadm dstate ${name}", + unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(PausedSync|Sync|Connected|WFConnection|StandAlone|Verify)') || (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", + before => Service['drbd'], + require => [ + Exec['modprobe drbd'], + Exec["test disk by-path for ${name}"], + Concat["/etc/drbd.d/${name}.res"], ++ Exec["apply-al DRBD metadata for ${name}"] + ], + notify => Service['drbd'], + } +-- +2.29.2 + diff --git a/config/puppet-modules/puppet-drbd-0.3.1/centos/puppet-drbd.spec b/config/puppet-modules/puppet-drbd-0.3.1/centos/puppet-drbd.spec index 3afec784f..78e9a4459 100644 --- a/config/puppet-modules/puppet-drbd-0.3.1/centos/puppet-drbd.spec +++ b/config/puppet-modules/puppet-drbd-0.3.1/centos/puppet-drbd.spec @@ -22,6 +22,7 @@ Patch0007: 0007-Add-disk-by-path-test.patch Patch0008: 0008-CGTS-7953-support-for-new-drbd-resources.patch Patch0009: 0009-drbd-slow-before-swact.patch Patch0010: 0010-Format-DRBD-resource-cpu-mask-to-support-64-or-larger-cpus.patch +Patch0011: 0011-Fix-DRBD-cephmon-resize.patch BuildArch: noarch @@ -55,6 +56,7 @@ find . \( -name spec -o -name ext \) | xargs rm -rf %patch0008 -p1 %patch0009 -p1 %patch0010 -p1 +%patch0011 -p1 %install rm -rf %{buildroot} diff --git a/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/0011-Fix-DRBD-cephmon-resize.patch b/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/0011-Fix-DRBD-cephmon-resize.patch new file mode 100644 index 000000000..14e8d91d8 --- /dev/null +++ b/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/0011-Fix-DRBD-cephmon-resize.patch @@ -0,0 +1,47 @@ +From 8106a9787d86901d4ed927838503ebe08bf2adcb Mon Sep 17 00:00:00 2001 +From: Felipe Sanches Zanoni +Date: Mon, 14 Feb 2022 12:01:30 -0500 +Subject: [PATCH] Fix DRBD cephmon resize + +--- + manifests/resource/up.pp | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp +index 11cf7ee..8d2f901 100644 +--- a/manifests/resource/up.pp ++++ b/manifests/resource/up.pp +@@ -19,18 +19,29 @@ define drbd::resource::up ( + ], + } + ++ # Ensure DRBD metadata is clear ++ exec { "apply-al DRBD metadata for ${name}": ++ command => "drbdadm apply-al ${name}", ++ onlyif => "drbdadm dump-md ${name} 2>&1 | egrep 'please apply-al'", ++ before => Service['drbd'], ++ require => [ ++ Exec['modprobe drbd'] ++ ], ++ } ++ + # create metadata on device, except if resource seems already initalized. + # drbd is very tenacious about asking for aproval if there is data on the + # volume already. + exec { "initialize DRBD metadata for ${name}": + command => "yes yes | drbdadm create-md ${name} -W--peer-max-bio-size=128k", +- onlyif => "test -e ${disk}", ++ onlyif => "test -e ${disk} && ! drbdadm dstate ${name}", + unless => "drbdadm dump-md ${name} || (drbdadm cstate ${name} | egrep -q '^(PausedSync|Sync|Connected|WFConnection|StandAlone|Verify)') || (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')", + before => Service['drbd'], + require => [ + Exec['modprobe drbd'], + Exec["test disk by-path for ${name}"], + Concat["/etc/drbd.d/${name}.res"], ++ Exec["apply-al DRBD metadata for ${name}"] + ], + notify => Service['drbd'], + } +-- +2.29.2 + diff --git a/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/series b/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/series index 3490631fa..5e8ee8474 100644 --- a/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/series +++ b/config/puppet-modules/puppet-drbd-0.5.2/debian/patches/series @@ -8,3 +8,4 @@ 0008-CGTS-7953-support-for-new-drbd-resources.patch 0009-drbd-slow-before-swact.patch 0010-Format-DRBD-resource-cpu-mask-to-support-64-or-larger-cpus.patch +0011-Fix-DRBD-cephmon-resize.patch