CentOS 7.5 upgrade for puppet-ceph package.

Story: 2003389
Task: 24503

Change-Id: I06ee6bd6563b44c28aff7e23adf0f442466481af
Signed-off-by: chenyan <yan.chen@intel.com>
This commit is contained in:
chenyan 2018-08-24 16:13:37 +08:00
parent a711bc77fa
commit 6f6345c9da
11 changed files with 78 additions and 81 deletions

View File

@ -8,18 +8,18 @@ Subject: [PATCH] Update package versioning for TIS format
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec
index ecde883..7f086c5 100644
index 8cfc8c1..3d7dccf 100644
--- a/SPECS/puppet-ceph.spec
+++ b/SPECS/puppet-ceph.spec
@@ -1,7 +1,7 @@
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Name: puppet-ceph
Version: 2.2.0
Version: 2.4.1
-Release: 1%{?dist}
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
Summary: Community Developed Ceph Module
License: Apache-2.0
License: ASL 2.0
--
1.8.3.1
2.7.4

View File

@ -8,10 +8,10 @@ Subject: [PATCH] Add TIS patches
1 file changed, 4 insertions(+)
diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec
index 7f086c5..771eb26 100644
index 3d7dccf..5b0deea 100644
--- a/SPECS/puppet-ceph.spec
+++ b/SPECS/puppet-ceph.spec
@@ -8,6 +8,8 @@ License: Apache-2.0
@@ -8,6 +8,8 @@ License: ASL 2.0
URL: https://launchpad.net/puppet-ceph
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
@ -23,12 +23,12 @@ index 7f086c5..771eb26 100644
@@ -23,6 +25,8 @@ Community Developed Ceph Module
%prep
%setup -q -n openstack-ceph-%{version}
%setup -q -n openstack-ceph-%{upstream_version}
+%patch0001 -p1
+%patch0002 -p1
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1
2.7.4

View File

@ -8,7 +8,7 @@ Subject: [PATCH] ceph jewel rebase
1 file changed, 2 insertions(+)
diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec
index cd07d2c..90d30d5 100644
index 5b0deea..23e0562 100644
--- a/SPECS/puppet-ceph.spec
+++ b/SPECS/puppet-ceph.spec
@@ -10,6 +10,7 @@ URL: https://launchpad.net/puppet-ceph
@ -20,7 +20,7 @@ index cd07d2c..90d30d5 100644
BuildArch: noarch
@@ -27,6 +28,7 @@ Community Developed Ceph Module
%setup -q -n openstack-ceph-%{version}
%setup -q -n openstack-ceph-%{upstream_version}
%patch0001 -p1
%patch0002 -p1
+%patch0003 -p1
@ -28,5 +28,5 @@ index cd07d2c..90d30d5 100644
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1
2.7.4

View File

@ -8,10 +8,10 @@ Subject: [PATCH] Add OSD support for persistent naming
1 file changed, 2 insertions(+)
diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec
index bb4392d..99e4ac8 100644
index 23e0562..ef82b81 100644
--- a/SPECS/puppet-ceph.spec
+++ b/SPECS/puppet-ceph.spec
@@ -13,6 +13,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_versio
@@ -11,6 +11,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_versio
Patch0001: 0001-Roll-up-TIS-patches.patch
Patch0002: 0002-Newton-rebase-fixes.patch
Patch0003: 0003-Ceph-Jewel-rebase.patch
@ -19,7 +19,7 @@ index bb4392d..99e4ac8 100644
BuildArch: noarch
@@ -31,6 +32,7 @@ Community Developed Ceph Module
@@ -29,6 +30,7 @@ Community Developed Ceph Module
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
@ -28,5 +28,5 @@ index bb4392d..99e4ac8 100644
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1
2.7.4

View File

@ -8,7 +8,7 @@ Subject: [PATCH] meta patch for patch5
1 file changed, 2 insertions(+)
diff --git a/SPECS/puppet-ceph.spec b/SPECS/puppet-ceph.spec
index 66fc8ad..c855fc2 100644
index ef82b81..ad75ea5 100644
--- a/SPECS/puppet-ceph.spec
+++ b/SPECS/puppet-ceph.spec
@@ -12,6 +12,7 @@ Patch0001: 0001-Roll-up-TIS-patches.patch
@ -28,5 +28,5 @@ index 66fc8ad..c855fc2 100644
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1
2.7.4

View File

@ -1,16 +1,16 @@
From d8e6107a98649475b5151289d6440b41f0397746 Mon Sep 17 00:00:00 2001
From ff98c42f0e6ce22969e986933d0a60d73a281a1d Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Tue, 10 Jan 2017 13:31:17 -0500
Subject: [PATCH] Roll up TIS patches
Subject: [PATCH 1/5] Roll up TIS patches
---
manifests/mon.pp | 15 ++++++++++++---
manifests/osd.pp | 33 +++++++++++++++++----------------
manifests/mon.pp | 14 +++++++++++---
manifests/osd.pp | 38 +++++++++++++++++++-------------------
manifests/rgw.pp | 7 +++++++
3 files changed, 36 insertions(+), 19 deletions(-)
3 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/manifests/mon.pp b/manifests/mon.pp
index a6b5712..54f9909 100644
index bc0298c..fa99df5 100644
--- a/manifests/mon.pp
+++ b/manifests/mon.pp
@@ -65,6 +65,8 @@ define ceph::mon (
@ -22,15 +22,7 @@ index a6b5712..54f9909 100644
$exec_timeout = $::ceph::params::exec_timeout,
) {
@@ -78,6 +80,7 @@ define ceph::mon (
$cluster_option = "--cluster ${cluster_name}"
} else {
$cluster_name = 'ceph'
+ $cluster_option = undef
}
# NOTE(aschultz): this is the service title for the mon service. It may be
@@ -154,6 +157,10 @@ test -e \$mon_data/done
@@ -154,6 +156,10 @@ test -e \$mon_data/done
}
}
@ -38,10 +30,10 @@ index a6b5712..54f9909 100644
+ $fsid_option = "--fsid ${fsid}"
+ }
+
Ceph_config<||> ->
Ceph_config<||>
# prevent automatic creation of the client.admin key by ceph-create-keys
exec { "ceph-mon-${cluster_name}.client.admin.keyring-${id}":
@@ -177,7 +184,8 @@ if [ ! -d \$mon_data ] ; then
-> exec { "ceph-mon-${cluster_name}.client.admin.keyring-${id}":
@@ -176,7 +182,8 @@ if [ ! -d \$mon_data ] ; then
--setuser ceph --setgroup ceph \
--mkfs \
--id ${id} \
@ -51,7 +43,7 @@ index a6b5712..54f9909 100644
touch \$mon_data/done \$mon_data/${init} \$mon_data/keyring
chown -h ceph:ceph \$mon_data/done \$mon_data/${init} \$mon_data/keyring
else
@@ -187,7 +195,8 @@ if [ ! -d \$mon_data ] ; then
@@ -186,7 +193,8 @@ if [ ! -d \$mon_data ] ; then
if ceph-mon ${cluster_option} \
--mkfs \
--id ${id} \
@ -61,31 +53,31 @@ index a6b5712..54f9909 100644
touch \$mon_data/done \$mon_data/${init} \$mon_data/keyring
else
rm -fr \$mon_data
@@ -204,7 +213,7 @@ test -d \$mon_data
@@ -203,7 +211,7 @@ test -d \$mon_data
timeout => $exec_timeout,
}->
service { $mon_service:
}
-> service { $mon_service:
- ensure => running,
+ ensure => $service_ensure,
}
# if the service is running before we setup the configs, notify service
diff --git a/manifests/osd.pp b/manifests/osd.pp
index 6c39806..5d3628d 100644
index d24b95e..9b8cd99 100644
--- a/manifests/osd.pp
+++ b/manifests/osd.pp
@@ -52,6 +52,8 @@ define ceph::osd (
$ensure = present,
$journal = undef,
$journal = "''",
$cluster = undef,
+ $cluster_uuid = undef,
+ $uuid = undef,
$exec_timeout = $::ceph::params::exec_timeout,
$selinux_file_context = 'ceph_var_lib_t',
$fsid = $::ceph::profile::params::fsid,
@@ -66,6 +68,14 @@ define ceph::osd (
$cluster_name = 'ceph'
@@ -68,6 +70,14 @@ define ceph::osd (
}
$cluster_option = "--cluster ${cluster_name}"
+ if $cluster_uuid {
+ $cluster_uuid_option = "--cluster-uuid ${cluster_uuid}"
@ -98,26 +90,30 @@ index 6c39806..5d3628d 100644
if $ensure == present {
$ceph_check_udev = "ceph-osd-check-udev-${name}"
@@ -115,22 +125,13 @@ test -z \$(ceph-disk list ${data} | egrep -o '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a
@@ -120,25 +130,15 @@ test -z $(ceph-disk list $(readlink -f ${data}) | egrep -o '[0-9a-f]{8}-([0-9a-f
Exec[$ceph_check_udev] -> Exec[$ceph_prepare]
# ceph-disk: prepare should be idempotent http://tracker.ceph.com/issues/7475
exec { $ceph_prepare:
- command => "/bin/true # comment to satisfy puppet syntax requirements
-set -ex
-if ! test -b ${data} ; then
- mkdir -p ${data}
-disk=$(readlink -f ${data})
-if ! test -b \$disk ; then
- echo \$disk | egrep -e '^/dev' -q -v
- mkdir -p \$disk
- if getent passwd ceph >/dev/null 2>&1; then
- chown -h ceph:ceph ${data}
- chown -h ceph:ceph \$disk
- fi
-fi
-ceph-disk prepare ${cluster_option} ${fsid_option} ${data} ${journal}
-ceph-disk prepare ${cluster_option} ${fsid_option} $(readlink -f ${data}) $(readlink -f ${journal})
-udevadm settle
-",
- unless => "/bin/true # comment to satisfy puppet syntax requirements
-set -ex
-ceph-disk list | grep -E ' *${data}1? .*ceph data, (prepared|active)' ||
-{ test -f ${data}/fsid && test -f ${data}/ceph_fsid && test -f ${data}/magic ;}
-disk=$(readlink -f ${data})
-ceph-disk list | egrep \" *(\${disk}1?|\${disk}p1?) .*ceph data, (prepared|active)\" ||
-{ test -f \$disk/fsid && test -f \$disk/ceph_fsid && test -f \$disk/magic ;}
-",
+
+ command => "/usr/sbin/ceph-disk prepare ${cluster_option} ${cluster_uuid_option} ${uuid_option} --fs-type xfs --zap-disk ${data} ${journal}",
+ # We don't want to erase the disk if:
+ # 1. There is already ceph data on the disk for our cluster AND
@ -125,14 +121,15 @@ index 6c39806..5d3628d 100644
+ # OSD on the disk. We don't want to attempt to re-use an OSD that
+ # had previously been deleted.
+ unless => "/usr/sbin/ceph-disk list | grep -v 'unknown cluster' | grep ' *${data}.*ceph data' | grep 'osd uuid ${uuid}'",
+
logoutput => true,
timeout => $exec_timeout,
}
tag => 'prepare',
diff --git a/manifests/rgw.pp b/manifests/rgw.pp
index da5557e..2a79c07 100644
index 2612785..ebc83ce 100644
--- a/manifests/rgw.pp
+++ b/manifests/rgw.pp
@@ -177,6 +177,13 @@ define ceph::rgw (
@@ -185,6 +185,13 @@ define ceph::rgw (
provider => $::ceph::params::service_provider,
}
# Everything else that is supported by puppet-ceph should run systemd.
@ -147,5 +144,5 @@ index da5557e..2a79c07 100644
Service {
name => "ceph-radosgw@${name}",
--
1.8.3.1
2.7.4

View File

@ -9,7 +9,7 @@ Subject: [PATCH] Newton rebase fixes
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/manifests/mon.pp b/manifests/mon.pp
index 54f9909..41fd8df 100644
index 5f7138f..543d044 100644
--- a/manifests/mon.pp
+++ b/manifests/mon.pp
@@ -100,10 +100,13 @@ define ceph::mon (
@ -30,7 +30,7 @@ index 54f9909..41fd8df 100644
}
diff --git a/manifests/osd.pp b/manifests/osd.pp
index 5d3628d..ef171eb 100644
index 9b8cd99..2187361 100644
--- a/manifests/osd.pp
+++ b/manifests/osd.pp
@@ -56,7 +56,7 @@ define ceph::osd (
@ -41,7 +41,7 @@ index 5d3628d..ef171eb 100644
+ $fsid = undef,
) {
$data = $name
include ::ceph::params
--
1.8.3.1
2.7.4

View File

@ -5,12 +5,12 @@ Subject: [PATCH] ceph jewel rebase
---
manifests/mon.pp | 1 +
manifests/rgw.pp | 34 +++++++++++++++++++++++++---------
manifests/rgw.pp | 33 +++++++++++++++++++++++++--------
manifests/rgw/keystone.pp | 6 +++---
3 files changed, 29 insertions(+), 12 deletions(-)
3 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/manifests/mon.pp b/manifests/mon.pp
index 41fd8df..acc112e 100644
index 543d044..ad92061 100644
--- a/manifests/mon.pp
+++ b/manifests/mon.pp
@@ -107,6 +107,7 @@ define ceph::mon (
@ -22,10 +22,10 @@ index 41fd8df..acc112e 100644
}
diff --git a/manifests/rgw.pp b/manifests/rgw.pp
index 2a79c07..d7af122 100644
index ebc83ce..56fb4a8 100644
--- a/manifests/rgw.pp
+++ b/manifests/rgw.pp
@@ -185,23 +185,39 @@ define ceph::rgw (
@@ -193,23 +193,40 @@ define ceph::rgw (
status => "systemctl status ceph-radosgw",
}
} else {
@ -35,6 +35,7 @@ index 2a79c07..d7af122 100644
+ before => Service["radosgw-${name}"],
+ }
+ }
+
Service {
- name => "ceph-radosgw@${name}",
- enable => $rgw_enable,
@ -47,8 +48,6 @@ index 2a79c07..d7af122 100644
}
- service { $rgw_service:
- ensure => $rgw_ensure,
- tag => ['ceph-radosgw']
+ #for RHEL/CentOS7, systemctl needs to reload to pickup the ceph-radosgw init file
+ if (($::operatingsystem == 'RedHat' or $::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '7') >= 0))
+ {
@ -57,11 +56,12 @@ index 2a79c07..d7af122 100644
+ }
+ }
+ service { "radosgw-${name}":
+ ensure => $rgw_ensure,
ensure => $rgw_ensure,
- tag => ['ceph-radosgw']
+ tag => ['radosgw']
}
- Ceph_config<||> -> Service<| tag == 'ceph-radosgw' |>
- Ceph_config<||> ~> Service<| tag == 'ceph-radosgw' |>
+ Ceph_config<||> -> Service["radosgw-${name}"]
Package<| tag == 'ceph' |> -> File['/var/lib/ceph/radosgw']
Package<| tag == 'ceph' |> -> File[$log_file]
@ -75,7 +75,7 @@ index 2a79c07..d7af122 100644
+ Ceph::Pool<||> -> Service["radosgw-${name}"]
}
diff --git a/manifests/rgw/keystone.pp b/manifests/rgw/keystone.pp
index e17e4e1..72a0554 100644
index 8351177..c371fd0 100644
--- a/manifests/rgw/keystone.pp
+++ b/manifests/rgw/keystone.pp
@@ -148,7 +148,7 @@ define ceph::rgw::keystone (
@ -106,5 +106,5 @@ index e17e4e1..72a0554 100644
ceph_config {
"client.${name}/nss_db_path": ensure => absent;
--
1.8.3.1
2.7.4

View File

@ -12,18 +12,18 @@ associated with udev link.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manifests/osd.pp b/manifests/osd.pp
index ef171eb..b9deea3 100644
index 2187361..d9cf5b1 100644
--- a/manifests/osd.pp
+++ b/manifests/osd.pp
@@ -59,7 +59,7 @@ define ceph::osd (
$fsid = undef,
) {
@@ -61,7 +61,7 @@ define ceph::osd (
include ::ceph::params
- $data = $name
+ $data = generate('/bin/bash','-c',"/bin/readlink -f ${name}")
if $cluster {
$cluster_option = "--cluster ${cluster}"
$cluster_name = $cluster
--
2.9.0
2.7.4

View File

@ -9,17 +9,17 @@ We will never install apt or puppet-apt, so this requirement cannot be fulfilled
1 file changed, 1 deletion(-)
diff --git a/metadata.json b/metadata.json
index 4175278..39d8c82 100644
index 14d2f37..27b78e3 100644
--- a/metadata.json
+++ b/metadata.json
@@ -47,7 +47,6 @@
],
"description": "Installs and configures Ceph.",
@@ -8,7 +8,6 @@
"project_page": "https://launchpad.net/puppet-ceph",
"issues_url": "https://bugs.launchpad.net/puppet-ceph",
"dependencies": [
- {"name":"puppetlabs/apt","version_requirement":">=2.0.0 <3.0.0"},
{"name":"puppetlabs/apache","version_requirement":">=1.4.1 <2.0.0"},
{"name":"puppetlabs/concat","version_requirement":">=1.2.1 <3.0.0"},
{"name":"puppetlabs/inifile","version_requirement":">=1.0.0 <2.0.0"},
--
1.8.3.1
2.7.4

View File

@ -1 +1 @@
mirror:Source/puppet-ceph-2.2.0-1.el7.src.rpm
mirror:Source/puppet-ceph-2.4.1-1.el7.src.rpm