bac46cc0e0
This work is part of Debian integration effort. This work only affects debian. We package the same version of ceph for both CentOS and Debian. Since we know the puppet-ceph module on CentOS is supposed to work, use this on Debian also to reduce testing and possible issues. Patches were copied from CentOS and not touched. Drop one patch to metadata.json, we know we have some work to do in that area to clear puppet warnings, but will be done part of a generic clearing puppet warnings effort. The sources need to be patched to work with debhelper-compat 13, which we don't care now. There are some integration issues, but testing so far revealed that during a puppet replay for aio manifest ceph data and ceph journal partitions were created. Story: 2009101 Task: 43431 Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com> Change-Id: I90adc736ea52e6c4f9946520156f53e572c224cc
111 lines
4.0 KiB
Diff
111 lines
4.0 KiB
Diff
From c9a5520620d313c08e7f751f3469ec5f4c220486 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Badea <daniel.badea@windriver.com>
|
|
Date: Thu, 23 Mar 2017 08:04:31 +0000
|
|
Subject: [PATCH] ceph jewel rebase
|
|
|
|
---
|
|
manifests/mon.pp | 1 +
|
|
manifests/rgw.pp | 33 +++++++++++++++++++++++++--------
|
|
manifests/rgw/keystone.pp | 6 +++---
|
|
3 files changed, 29 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/manifests/mon.pp b/manifests/mon.pp
|
|
index b3458d6..17cb925 100644
|
|
--- a/manifests/mon.pp
|
|
+++ b/manifests/mon.pp
|
|
@@ -106,6 +106,7 @@ define ceph::mon (
|
|
start => "service ceph start mon.${id}",
|
|
stop => "service ceph stop mon.${id}",
|
|
status => "service ceph status mon.${id}",
|
|
+ enable => $mon_enable,
|
|
}
|
|
}
|
|
|
|
diff --git a/manifests/rgw.pp b/manifests/rgw.pp
|
|
index ebc83ce..56fb4a8 100644
|
|
--- a/manifests/rgw.pp
|
|
+++ b/manifests/rgw.pp
|
|
@@ -193,23 +193,40 @@ define ceph::rgw (
|
|
status => "systemctl status ceph-radosgw",
|
|
}
|
|
} else {
|
|
+ if $rgw_enable {
|
|
+ file { "${rgw_data}/sysvinit":
|
|
+ ensure => present,
|
|
+ before => Service["radosgw-${name}"],
|
|
+ }
|
|
+ }
|
|
+
|
|
Service {
|
|
- name => "ceph-radosgw@${name}",
|
|
- enable => $rgw_enable,
|
|
+ name => "radosgw-${name}",
|
|
+ start => 'service radosgw start',
|
|
+ stop => 'service radosgw stop',
|
|
+ status => 'service radosgw status',
|
|
+ provider => $::ceph::params::service_provider,
|
|
}
|
|
}
|
|
|
|
- service { $rgw_service:
|
|
+ #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))
|
|
+ {
|
|
+ exec { 'systemctl-reload-from-rgw': #needed for the new init file
|
|
+ command => '/usr/bin/systemctl daemon-reload',
|
|
+ }
|
|
+ }
|
|
+ service { "radosgw-${name}":
|
|
ensure => $rgw_ensure,
|
|
- tag => ['ceph-radosgw']
|
|
+ tag => ['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]
|
|
File['/var/lib/ceph/radosgw']
|
|
-> File[$rgw_data]
|
|
- -> Service<| tag == 'ceph-radosgw' |>
|
|
- File[$log_file] -> Service<| tag == 'ceph-radosgw' |>
|
|
- Ceph::Pool<||> -> Service<| tag == 'ceph-radosgw' |>
|
|
+ -> Service["radosgw-${name}"]
|
|
+ File[$log_file] -> Service["radosgw-${name}"]
|
|
+ Ceph::Pool<||> -> Service["radosgw-${name}"]
|
|
}
|
|
diff --git a/manifests/rgw/keystone.pp b/manifests/rgw/keystone.pp
|
|
index 8351177..c371fd0 100644
|
|
--- a/manifests/rgw/keystone.pp
|
|
+++ b/manifests/rgw/keystone.pp
|
|
@@ -148,7 +148,7 @@ define ceph::rgw::keystone (
|
|
exec { "${name}-nssdb-ca":
|
|
command => "/bin/true # comment to satisfy puppet syntax requirements
|
|
set -ex
|
|
-wget --no-check-certificate ${rgw_keystone_url}/v2.0/certificates/ca -O - |
|
|
+wget --no-check-certificate ${rgw_keystone_url}/${rgw_keystone_version}/certificates/ca -O - |
|
|
openssl x509 -pubkey | certutil -A -d ${nss_db_path} -n ca -t \"TCu,Cu,Tuw\"
|
|
",
|
|
unless => "/bin/true # comment to satisfy puppet syntax requirements
|
|
@@ -161,7 +161,7 @@ certutil -d ${nss_db_path} -L | grep ^ca
|
|
exec { "${name}-nssdb-signing":
|
|
command => "/bin/true # comment to satisfy puppet syntax requirements
|
|
set -ex
|
|
-wget --no-check-certificate ${rgw_keystone_url}/v2.0/certificates/signing -O - |
|
|
+wget --no-check-certificate ${rgw_keystone_url}/${rgw_keystone_version}/certificates/signing -O - |
|
|
openssl x509 -pubkey | certutil -A -d ${nss_db_path} -n signing_cert -t \"P,P,P\"
|
|
",
|
|
unless => "/bin/true # comment to satisfy puppet syntax requirements
|
|
@@ -176,7 +176,7 @@ certutil -d ${nss_db_path} -L | grep ^signing_cert
|
|
-> File[$nss_db_path]
|
|
-> Exec["${name}-nssdb-ca"]
|
|
-> Exec["${name}-nssdb-signing"]
|
|
- ~> Service<| tag == 'ceph-radosgw' |>
|
|
+ ~> Service<| tag == 'radosgw' |>
|
|
} else {
|
|
ceph_config {
|
|
"client.${name}/nss_db_path": ensure => absent;
|
|
--
|
|
2.7.4
|
|
|