9311089520
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
52 lines
1.5 KiB
Diff
52 lines
1.5 KiB
Diff
From 30ae8c86d9471980a0058823d6593e7548e19506 Mon Sep 17 00:00:00 2001
|
|
From: Don Penney <don.penney@windriver.com>
|
|
Date: Thu, 15 Jun 2017 17:34:30 -0400
|
|
Subject: [PATCH] Add disk by-path test
|
|
|
|
---
|
|
manifests/resource/up.pp | 14 +++++++++++++-
|
|
1 file changed, 13 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp
|
|
index 3e2fdac..ea379a8 100644
|
|
--- a/manifests/resource/up.pp
|
|
+++ b/manifests/resource/up.pp
|
|
@@ -8,6 +8,17 @@ define drbd::resource::up (
|
|
$mountpoint,
|
|
$automount,
|
|
) {
|
|
+
|
|
+ # Ensure disk by-path link exists
|
|
+ exec { "test disk by-path for ${name}":
|
|
+ command => "udevadm settle",
|
|
+ unless => "test -e ${disk}",
|
|
+ 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.
|
|
@@ -18,6 +29,7 @@ define drbd::resource::up (
|
|
before => Service['drbd'],
|
|
require => [
|
|
Exec['modprobe drbd'],
|
|
+ Exec["test disk by-path for ${name}"],
|
|
Concat["/etc/drbd.d/${name}.res"],
|
|
],
|
|
notify => Service['drbd'],
|
|
@@ -35,7 +47,7 @@ define drbd::resource::up (
|
|
notify => Service['drbd'],
|
|
}
|
|
|
|
- exec { "reuse existing DRBD resoure ${name}":
|
|
+ exec { "reuse existing DRBD resource ${name}":
|
|
command => "drbdadm adjust ${name}",
|
|
onlyif => "test -e ${disk} && (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')",
|
|
before => Service['drbd'],
|
|
--
|
|
1.8.3.1
|
|
|