1 From 30ae8c86d9471980a0058823d6593e7548e19506 Mon Sep 17 00:00:00 2001
2 From: Don Penney <don.penney@windriver.com>
3 Date: Thu, 15 Jun 2017 17:34:30 -0400
4 Subject: [PATCH] Add disk by-path test
7 manifests/resource/up.pp | 14 +++++++++++++-
8 1 file changed, 13 insertions(+), 1 deletion(-)
10 diff --git a/manifests/resource/up.pp b/manifests/resource/up.pp
11 index 3e2fdac..ea379a8 100644
12 --- a/manifests/resource/up.pp
13 +++ b/manifests/resource/up.pp
14 @@ -8,6 +8,17 @@ define drbd::resource::up (
19 + # Ensure disk by-path link exists
20 + exec { "test disk by-path for ${name}":
21 + command => "udevadm settle",
22 + unless => "test -e ${disk}",
23 + before => Service['drbd'],
25 + Exec['modprobe drbd']
29 # create metadata on device, except if resource seems already initalized.
30 # drbd is very tenacious about asking for aproval if there is data on the
32 @@ -18,6 +29,7 @@ define drbd::resource::up (
33 before => Service['drbd'],
35 Exec['modprobe drbd'],
36 + Exec["test disk by-path for ${name}"],
37 Concat["/etc/drbd.d/${name}.res"],
39 notify => Service['drbd'],
40 @@ -35,7 +47,7 @@ define drbd::resource::up (
41 notify => Service['drbd'],
44 - exec { "reuse existing DRBD resoure ${name}":
45 + exec { "reuse existing DRBD resource ${name}":
46 command => "drbdadm adjust ${name}",
47 onlyif => "test -e ${disk} && (drbdadm show-gi ${name} | grep 'meta-data: need apply-al')",
48 before => Service['drbd'],