Puppet Class: ceph::mds
- Defined in:
- modules/ceph/manifests/mds.pp
Overview
SPDX-License-Identifier: Apache-2.0 README: what is going on in this class is described in the upstream docs: https://docs.ceph.com/en/latest/man/8/ceph-mds/
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'modules/ceph/manifests/mds.pp', line 6
class ceph::mds (
Stdlib::Unixpath $data_dir,
Ceph::Auth::ClientAuth $mds_auth,
) {
stdlib::ensure_packages(['ceph-mds'])
$client = "mds.${facts['networking']['hostname']}"
if ! defined(Ceph::Auth::Keyring[$client]) {
fail("missing ceph::auth::keyring[${client}], check hiera 'profile::cloudceph::auth::load_all::configuration'")
}
if defined(Ceph::Auth::Keyring['admin']) {
Ceph::Auth::Keyring['admin'] -> Class['ceph::mds']
} else {
notify { 'ceph::mds: Admin keyring not defined, things might not work as expected.': }
}
$keyring_path = ceph::auth::get_keyring_path($client, $mds_auth['keyring_path'])
# If the daemon hasn't been setup yet, first verify we can connect to the ceph cluster
exec { 'ceph-mds-check':
command => '/usr/bin/ceph -s',
onlyif => "/usr/bin/test ! -e ${keyring_path}",
}
if defined(Ceph::Auth::Keyring['admin']) {
Ceph::Auth::Keyring['admin'] -> Exec['ceph-mds-check']
}
service { "ceph-mds@${facts['networking']['hostname']}":
ensure => running,
enable => true,
require => Ceph::Auth::Keyring[$client],
subscribe => File['/etc/ceph/ceph.conf'],
}
}
|