
ceph-disk prepare data OSD parameter contains a new line causing
puppet manifest to fail:
1. $data = generate('/bin/bash','-c',"/bin/readlink -f ${name}")
is expanded together with a new line in:
exec { $ceph_prepare:
command => "/usr/sbin/ceph-disk prepare ${cluster_option}
${cluster_uuid_option} ${uuid_option}
--fs-type xfs --zap-disk ${data} ${journal}"
just before ${journal} is expanded. Puppet reports:
sh: line 1: : command not found
when trying to run '' (default journal value).
2. 'readlink' should be called when running ceph-disk prepare
command, not when the puppet resource is defined. Let
exec's shell call readlink instead of using puppet's
generate() . See also:
ff2b2e6898
Added --verbose and --log-stdout options to log commands executed
by 'ceph-disk prepare' and identify where it fails.
Closes-Bug: 1800889
Change-Id: I6b71147706edb97d5a1e6579924d45b999efe98f
Signed-off-by: Daniel Badea <daniel.badea@windriver.com>
33 lines
998 B
Diff
33 lines
998 B
Diff
From a7400d67bc6c89ea0aa9a408f7f35689924c8a99 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Badea <daniel.badea@windriver.com>
|
|
Date: Wed, 31 Oct 2018 19:29:45 +0000
|
|
Subject: [PATCH] add ceph-disk-prepare-invalid-data-disk-value patch
|
|
|
|
---
|
|
SPECS/puppet-ceph.spec | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec
|
|
index 78e4a1b..f4dc098 100644
|
|
--- a/SPECS/puppet-ceph.spec
|
|
+++ b/SPECS/puppet-ceph.spec
|
|
@@ -15,6 +15,7 @@ Patch0002: 0002-Newton-rebase-fixes.patch
|
|
Patch0003: 0003-Ceph-Jewel-rebase.patch
|
|
Patch0004: 0004-US92424-Add-OSD-support-for-persistent-naming.patch
|
|
Patch0005: 0005-Remove-puppetlabs-apt-as-ceph-requirement.patch
|
|
+Patch0006: 0006-ceph-disk-prepare-invalid-data-disk-value.patch
|
|
|
|
BuildArch: noarch
|
|
|
|
@@ -35,6 +36,7 @@ Community Developed Ceph Module
|
|
%patch0003 -p1
|
|
%patch0004 -p1
|
|
%patch0005 -p1
|
|
+%patch0006 -p1
|
|
|
|
find . -type f -name ".*" -exec rm {} +
|
|
find . -size 0 -exec rm {} +
|
|
--
|
|
1.8.3.1
|
|
|