Merge "Add debian support for puppet-ceph"

This commit is contained in:
Zuul 2021-11-04 17:15:11 +00:00 committed by Gerrit Code Review
commit 32bc1aa383
7 changed files with 242 additions and 0 deletions

View File

@ -0,0 +1,10 @@
---
debver: 3.1.1-1
debname: puppet-module-ceph
dl_path:
name: puppet-module-ceph-debian-3.1.1-1.tar.gz
url: https://salsa.debian.org/openstack-team/puppet/puppet-module-ceph/-/archive/debian/3.1.1-1/puppet-module-ceph-debian-3.1.1-1.tar.gz
md5sum: abbb478a9dd85ba8b628296668459dec
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -0,0 +1,92 @@
From 6a7e54f768b4f28a69ed5948a60765c10d5a4840 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 1/5] Roll up TIS patches
---
manifests/mon.pp | 13 ++++++++++---
manifests/osd.pp | 9 +++++++++
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/manifests/mon.pp b/manifests/mon.pp
index f8dad43..cbf753a 100644
--- a/manifests/mon.pp
+++ b/manifests/mon.pp
@@ -65,6 +65,8 @@ define ceph::mon (
$authentication_type = 'cephx',
$key = undef,
$keyring = undef,
+ $fsid = undef,
+ $service_ensure = 'running',
$exec_timeout = $ceph::params::exec_timeout,
) {
@@ -115,6 +117,9 @@ define ceph::mon (
if $key and $keyring {
fail("key (set to ${key}) and keyring (set to ${keyring}) are mutually exclusive")
}
+ if $fsid {
+ $fsid_option = "--fsid ${fsid}"
+ }
if $key {
$keyring_path = "/tmp/ceph-mon-keyring-${id}"
@@ -176,7 +181,8 @@ if [ ! -d \$mon_data ] ; then
--setuser ceph --setgroup ceph \
--mkfs \
--id ${id} \
- --keyring ${keyring_path} ; then
+ --keyring ${keyring_path} \
+ ${fsid_option} ; then
touch \$mon_data/done \$mon_data/${init} \$mon_data/keyring
chown -h ceph:ceph \$mon_data/done \$mon_data/${init} \$mon_data/keyring
else
@@ -186,7 +192,8 @@ if [ ! -d \$mon_data ] ; then
if ceph-mon ${cluster_option} \
--mkfs \
--id ${id} \
- --keyring ${keyring_path} ; then
+ --keyring ${keyring_path} \
+ ${fsid_option} ; then
touch \$mon_data/done \$mon_data/${init} \$mon_data/keyring
else
rm -fr \$mon_data
@@ -203,7 +210,7 @@ test -d \$mon_data
timeout => $exec_timeout,
}
-> service { $mon_service:
- ensure => running,
+ ensure => $service_ennsure,
}
# if the service is running before we setup the configs, notify service
diff --git a/manifests/osd.pp b/manifests/osd.pp
index ac44a2c..7de3a53 100644
--- a/manifests/osd.pp
+++ b/manifests/osd.pp
@@ -70,6 +70,8 @@ define ceph::osd (
$ensure = present,
$journal = undef,
$cluster = undef,
+ $cluser_uuid = undef,
+ $uuid = undef,
$bluestore_wal = undef,
$bluestore_db = undef,
$store_type = undef,
@@ -91,6 +93,13 @@ define ceph::osd (
}
$cluster_option = "--cluster ${cluster_name}"
+ if $cluster_uuid {
+ $cluster_uuid_option = "--cluster-uuid ${cluster_uuid}"
+ }
+ if $uuid {
+ $uuid_option = "--os-uuid ${uuid}"
+ }
+
if $store_type {
$osd_type = "--${store_type}"
} else {
--
2.30.2

View File

@ -0,0 +1,47 @@
From e45ab36e8ea77500f80abd2f96cca2c6cf3a4b66 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Tue, 7 Feb 2017 15:49:02 -0500
Subject: [PATCH 2/5] Newton rebase fixes
---
manifests/mon.pp | 9 ++++++---
manifests/osd.pp | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/manifests/mon.pp b/manifests/mon.pp
index cbf753a..eb5c125 100644
--- a/manifests/mon.pp
+++ b/manifests/mon.pp
@@ -99,10 +99,13 @@ define ceph::mon (
}
# Everything else that is supported by puppet-ceph should run systemd.
} else {
- $init = 'systemd'
+ $init = 'sysvinit'
Service {
- name => "ceph-mon@${id}",
- enable => $mon_enable,
+ name => "ceph-mon-${id}",
+ provider => $::ceph::params::service_provider,
+ start => "service ceph start mon.${id}",
+ stop => "service ceph stop mon.${id}",
+ status => "service ceph status mon.${id}",
}
}
diff --git a/manifests/osd.pp b/manifests/osd.pp
index 7de3a53..1972caa 100644
--- a/manifests/osd.pp
+++ b/manifests/osd.pp
@@ -77,7 +77,7 @@ define ceph::osd (
$store_type = undef,
$exec_timeout = $ceph::params::exec_timeout,
$selinux_file_context = 'ceph_var_lib_t',
- $fsid = $ceph::profile::params::fsid,
+ $fsid = undef,
$dmcrypt = false,
$dmcrypt_key_dir = '/etc/ceph/dmcrypt-keys',
) {
--
2.30.2

View File

@ -0,0 +1,24 @@
From 5d5949edf970141d12acf50cb8ad624c53f15296 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 3/5] ceph jewel rebase
---
manifests/mon.pp | 1 +
1 file changed, 1 insertion(+)
diff --git a/manifests/mon.pp b/manifests/mon.pp
index eb5c125..7cbec0d 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,
}
}
--
2.30.2

View File

@ -0,0 +1,29 @@
From c207c353cbf883befa6070ccd80c2b4980a434fe Mon Sep 17 00:00:00 2001
From: Robert Church <robert.church@windriver.com>
Date: Thu, 13 Apr 2017 20:31:21 -0500
Subject: [PATCH 4/5] US92424: Add OSD support for persistent naming
This allows the manifest to provide udev generated /dev/disk/by-* links
to configure the OSDs without requiring any additional changes. The
'readlink -f' will produce the currently enumerated device node
associated with udev link.
---
manifests/osd.pp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manifests/osd.pp b/manifests/osd.pp
index 1972caa..2bda784 100644
--- a/manifests/osd.pp
+++ b/manifests/osd.pp
@@ -84,7 +84,7 @@ define ceph::osd (
include ceph::params
- $data = $name
+ $data = generate('/bin/bash','-c',"/bin/readlink -f ${name}")
if $cluster {
$cluster_name = $cluster
--
2.30.2

View File

@ -0,0 +1,35 @@
From 5169d43ce8085726d1d9945fef636154a21eaf17 Mon Sep 17 00:00:00 2001
From: Ovidiu Poncea <ovidiu.poncea@windriver.com>
Date: Thu, 20 Dec 2018 07:18:55 -0500
Subject: [PATCH 5/5] Add StarlingX specific restart command for Ceph monitors
Since we don't use systemd to manage Ceph and we have pmon monitoring we
have to make sure that:
1. Restarting is properly handled as "systemctl restart" will return error
and manifest will fail;
2. Pmon does not check ceph-mon status during restart. Otherwise we risk
getting into a race condition between the puppet restart and pmon
detecting that ceph is down and trying a restart.
Both are resolved when using /etc/init.d/ceph-init-wrapper restart
Signed-off-by: Ovidiu Poncea <Ovidiu.Poncea@windriver.com>
---
manifests/mon.pp | 1 +
1 file changed, 1 insertion(+)
diff --git a/manifests/mon.pp b/manifests/mon.pp
index 7cbec0d..3936529 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}",
+ restart => "/etc/init.d/ceph-init-wrapper restart mon.${id}",
enable => $mon_enable,
}
}
--
2.30.2

View File

@ -0,0 +1,5 @@
0001-Roll-up-TIS-patches.patch
0002-Newton-rebase-fixes.patch
0003-ceph-jewel-rebase.patch
0004-US92424-Add-OSD-support-for-persistent-naming.patch
0005-Add-StarlingX-specific-restart-command-for-Ceph-moni.patch