Fix exec check which restricts ceph-prepare execution

Minor patch update to the command that checks to see if an OSD should be
erased.

The recent bug fix attempts to perform command expansion within a
literal string. This will always fail and cause the OSD to be
reformatted.

Change the single quotes to double quotes to allow the command expansion
to execute successfully.

Change-Id: I522207e7e5f7a428fb3a962ab6a13574f73bb3c9
Related-Bug: #1800889
Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
Robert Church 2018-11-07 00:41:17 -05:00
parent c4617d4c4b
commit 2994a26b9e
2 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
TIS_PATCH_VER=5 TIS_PATCH_VER=6

View File

@ -1,4 +1,4 @@
From 90e9f692040a804f74bd32a8032a34b0f1e31ae9 Mon Sep 17 00:00:00 2001 From 5d8f3dd5d18d611151b4658c5c876e8a3ad8fe51 Mon Sep 17 00:00:00 2001
From: Daniel Badea <daniel.badea@windriver.com> From: Daniel Badea <daniel.badea@windriver.com>
Date: Wed, 31 Oct 2018 16:28:45 +0000 Date: Wed, 31 Oct 2018 16:28:45 +0000
Subject: [PATCH] ceph-disk prepare invalid data disk value Subject: [PATCH] ceph-disk prepare invalid data disk value
@ -35,7 +35,7 @@ by 'ceph-disk prepare' and identify where it fails.
1 file changed, 3 insertions(+), 3 deletions(-) 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/manifests/osd.pp b/manifests/osd.pp diff --git a/manifests/osd.pp b/manifests/osd.pp
index d9cf5b1..53709bb 100644 index d9cf5b1..889d28a 100644
--- a/manifests/osd.pp --- a/manifests/osd.pp
+++ b/manifests/osd.pp +++ b/manifests/osd.pp
@@ -61,7 +61,7 @@ define ceph::osd ( @@ -61,7 +61,7 @@ define ceph::osd (
@ -59,10 +59,10 @@ index d9cf5b1..53709bb 100644
# OSD on the disk. We don't want to attempt to re-use an OSD that # OSD on the disk. We don't want to attempt to re-use an OSD that
# had previously been deleted. # had previously been deleted.
- unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep ' *${data}.*ceph data' | grep 'osd uuid ${uuid}'", - unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep ' *${data}.*ceph data' | grep 'osd uuid ${uuid}'",
+ unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep ' *$(readlink -f ${data}).*ceph data' | grep 'osd uuid ${uuid}'", + unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep \" *$(readlink -f ${data}).*ceph data\" | grep 'osd uuid ${uuid}'",
logoutput => true, logoutput => true,
timeout => $exec_timeout, timeout => $exec_timeout,
-- --
1.8.3.1 2.16.5