diff --git a/manifests/init.pp b/manifests/init.pp index aa78c513..7b88a32a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -135,8 +135,8 @@ # Optional. String. Defaults to undef. # class ceph ( - $fsid, - $ensure = present, + String[1] $fsid, + Stdlib::Ensure::Package $ensure = present, Enum['cephx', 'none'] $authentication_type = 'cephx', $keyring = undef, $osd_journal_size = undef, diff --git a/manifests/key.pp b/manifests/key.pp index b269a4f4..115f4ca3 100644 --- a/manifests/key.pp +++ b/manifests/key.pp @@ -75,8 +75,8 @@ # inferred from the client name. Default to undef. # define ceph::key ( - $secret, - $cluster = undef, + String[1] $secret, + Optional[String[1]] $cluster = undef, Stdlib::Absolutepath $keyring_path = "/etc/ceph/ceph.${name}.keyring", $cap_mon = undef, $cap_osd = undef, diff --git a/manifests/keys.pp b/manifests/keys.pp index 7a70c9a4..c2fbcd77 100644 --- a/manifests/keys.pp +++ b/manifests/keys.pp @@ -28,8 +28,8 @@ # Optional. Defaults to a empty hash. # class ceph::keys ( - $args = {}, - $defaults = {}, + Hash $args = {}, + Hash $defaults = {}, ) { create_resources(ceph::key, $args, $defaults) } diff --git a/manifests/mds.pp b/manifests/mds.pp index 2c5bdaf6..fc726b9e 100644 --- a/manifests/mds.pp +++ b/manifests/mds.pp @@ -51,16 +51,16 @@ # Optional. Default to 'ceph'. # class ceph::mds ( - $public_addr = undef, - $pkg_mds = $ceph::params::pkg_mds, - $pkg_mds_ensure = present, - Boolean $mds_activate = true, - Optional[Stdlib::Absolutepath] $mds_data = undef, - $mds_enable = true, - $mds_ensure = 'running', - $mds_id = $facts['networking']['hostname'], - $keyring = undef, - $cluster = 'ceph', + Optional[Stdlib::IP::Address] $public_addr = undef, + String[1] $pkg_mds = $ceph::params::pkg_mds, + Stdlib::Ensure::Package $pkg_mds_ensure = present, + Boolean $mds_activate = true, + Optional[Stdlib::Absolutepath] $mds_data = undef, + Boolean $mds_enable = true, + Stdlib::Ensure::Service $mds_ensure = 'running', + String[1] $mds_id = $facts['networking']['hostname'], + Optional[String[1]] $keyring = undef, + String[1] $cluster = 'ceph', ) inherits ceph::params { if $mds_data { $mds_data_real = $mds_data diff --git a/manifests/mgr.pp b/manifests/mgr.pp index a559fc56..687bdf34 100644 --- a/manifests/mgr.pp +++ b/manifests/mgr.pp @@ -45,11 +45,11 @@ # Optional. Defaults to false # define ceph::mgr ( - $enable = true, - $ensure = running, - $cluster = 'ceph', + Boolean $enable = true, + Stdlib::Ensure::Service $ensure = running, + String[1] $cluster = 'ceph', Enum['cephx', 'none'] $authentication_type = 'cephx', - $key = undef, + Optional[String[1]] $key = undef, Boolean $inject_key = false, ) { file { "/var/lib/ceph/mgr/${cluster}-${name}": diff --git a/manifests/mirror.pp b/manifests/mirror.pp index 960412ca..229c9a12 100644 --- a/manifests/mirror.pp +++ b/manifests/mirror.pp @@ -31,9 +31,9 @@ # Optional. Default is true define ceph::mirror ( - $pkg_mirror = 'rbd-mirror', - $rbd_mirror_ensure = 'running', - $rbd_mirror_enable = true, + String[1] $pkg_mirror = 'rbd-mirror', + Stdlib::Ensure::Service $rbd_mirror_ensure = 'running', + Boolean $rbd_mirror_enable = true, ) { ensure_resource( 'package', $pkg_mirror, diff --git a/manifests/mon.pp b/manifests/mon.pp index 72d89450..e3e49199 100644 --- a/manifests/mon.pp +++ b/manifests/mon.pp @@ -59,12 +59,12 @@ # define ceph::mon ( Enum['present', 'absent'] $ensure = present, - $mon_enable = true, - $public_addr = undef, - $cluster = undef, + Boolean $mon_enable = true, + Optional[Stdlib::IP::Address] $public_addr = undef, + Optional[String[1]] $cluster = undef, Enum['cephx', 'none'] $authentication_type = 'cephx', - $key = undef, - $keyring = undef, + Optional[String[1]] $key = undef, + Optional[Stdlib::Absolutepath] $keyring = undef, Optional[Float[0]] $exec_timeout = undef, ) { include ceph::params diff --git a/manifests/mons.pp b/manifests/mons.pp index 6b29c613..06ff387b 100644 --- a/manifests/mons.pp +++ b/manifests/mons.pp @@ -28,8 +28,8 @@ # Optional. Defaults to a empty hash # class ceph::mons ( - $args = {}, - $defaults = {}, + Hash $args = {}, + Hash $defaults = {}, ) { create_resources(ceph::mon, $args, $defaults) } diff --git a/manifests/osd.pp b/manifests/osd.pp index 02b4d662..9c79fd9f 100644 --- a/manifests/osd.pp +++ b/manifests/osd.pp @@ -68,16 +68,16 @@ # define ceph::osd ( Enum['present', 'absent'] $ensure = present, - $journal = undef, + Optional[String[1]] $journal = undef, String[1] $cluster = 'ceph', - $bluestore_wal = undef, - $bluestore_db = undef, + Optional[String[1]] $bluestore_wal = undef, + Optional[String[1]] $bluestore_db = undef, Optional[Enum['filestore', 'bluestore']] $store_type = undef, Optional[Float[0]] $exec_timeout = undef, - $selinux_file_context = 'ceph_var_lib_t', - $fsid = undef, + String[1] $selinux_file_context = 'ceph_var_lib_t', + Optional[String[1]] $fsid = undef, Boolean $dmcrypt = false, - $dmcrypt_key_dir = '/etc/ceph/dmcrypt-keys', + Stdlib::Absolutepath $dmcrypt_key_dir = '/etc/ceph/dmcrypt-keys', ) { include ceph::params $exec_timeout_real = $exec_timeout ? { diff --git a/manifests/osds.pp b/manifests/osds.pp index 05762c8c..fa72e152 100644 --- a/manifests/osds.pp +++ b/manifests/osds.pp @@ -36,10 +36,10 @@ # http://docs.ceph.com/docs/nautilus/rados/troubleshooting/troubleshooting-osd/ # class ceph::osds ( - $args = {}, - $defaults = {}, + Hash $args = {}, + Hash $defaults = {}, # DEPRECATED PARAMS - $pid_max = undef, + $pid_max = undef, ) { if $pid_max != undef { warning('pid_max parameter is deprecated and has no effect.') diff --git a/manifests/repo.pp b/manifests/repo.pp index 5cf054b3..831d20ed 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -57,14 +57,14 @@ # Optional. Defaults to undef. # class ceph::repo ( - $ensure = present, - String[1] $release = $ceph::params::release, - $proxy = undef, - $proxy_username = undef, - $proxy_password = undef, - Boolean $enable_epel = true, - Boolean $enable_sig = $ceph::params::enable_sig, - $ceph_mirror = undef, + Enum['present', 'absent'] $ensure = present, + String[1] $release = $ceph::params::release, + $proxy = undef, + $proxy_username = undef, + $proxy_password = undef, + Boolean $enable_epel = true, + Boolean $enable_sig = $ceph::params::enable_sig, + $ceph_mirror = undef, ) inherits ceph::params { case $facts['os']['family'] { 'Debian': { diff --git a/manifests/rgw.pp b/manifests/rgw.pp index ada32279..cb2b9426 100644 --- a/manifests/rgw.pp +++ b/manifests/rgw.pp @@ -28,6 +28,9 @@ # [*pkg_radosgw*] Package name for the ceph radosgw. # Optional. Default is osfamily dependent (check ceph::params). # +# [*pkg_radosgw_ensure*] Ensure status for the ceph radosgw package resources +# Optional. Defaults to present. +# # [*rgw_ensure*] Whether to start radosgw service. # Optional. Default is running. # @@ -88,25 +91,26 @@ # Optional. Default is false # define ceph::rgw ( - $pkg_radosgw = undef, - $rgw_ensure = 'running', - $rgw_enable = true, - $rgw_enable_apis = undef, - Stdlib::Absolutepath $rgw_data = "/var/lib/ceph/radosgw/ceph-${name}", - $user = undef, - Stdlib::Absolutepath $keyring_path = "/etc/ceph/ceph.client.${name}.keyring", - Stdlib::Absolutepath $log_file = '/var/log/ceph/radosgw.log', - $rgw_dns_name = $facts['networking']['fqdn'], - $rgw_socket_path = undef, - $rgw_print_continue = false, - $rgw_port = undef, - $frontend_type = 'civetweb', - $rgw_frontends = undef, - $rgw_swift_url = "http://${facts['networking']['fqdn']}:7480", - $rgw_swift_url_prefix = 'swift', - $rgw_swift_account_in_url = false, - $rgw_swift_versioning_enabled = false, - $rgw_trust_forwarded_https = false, + Optional[String[1]] $pkg_radosgw = undef, + Stdlib::Ensure::Package $pkg_radosgw_ensure = present, + Stdlib::Ensure::Service $rgw_ensure = 'running', + Boolean $rgw_enable = true, + $rgw_enable_apis = undef, + Stdlib::Absolutepath $rgw_data = "/var/lib/ceph/radosgw/ceph-${name}", + $user = undef, + Stdlib::Absolutepath $keyring_path = "/etc/ceph/ceph.client.${name}.keyring", + Stdlib::Absolutepath $log_file = '/var/log/ceph/radosgw.log', + $rgw_dns_name = $facts['networking']['fqdn'], + $rgw_socket_path = undef, + Boolean $rgw_print_continue = false, + $rgw_port = undef, + Enum['beast', 'civetweb', 'apache-proxy-fcgi'] $frontend_type = 'civetweb', + $rgw_frontends = undef, + Stdlib::HTTPUrl $rgw_swift_url = "http://${facts['networking']['fqdn']}:7480", + String $rgw_swift_url_prefix = 'swift', + Boolean $rgw_swift_account_in_url = false, + Boolean $rgw_swift_versioning_enabled = false, + Boolean $rgw_trust_forwarded_https = false, ) { unless $name =~ /^radosgw\..+/ { fail("Define name must be started with 'radosgw.'") @@ -138,11 +142,6 @@ define ceph::rgw ( } case $frontend_type { - 'beast': { - ceph::rgw::beast { $name: - rgw_frontends => $rgw_frontends, - } - } 'civetweb': { warning('civetweb frontend has been removed in quincy release.') ceph::rgw::civetweb { $name: @@ -159,12 +158,15 @@ define ceph::rgw ( } } default: { - fail("Unsupported frontend_type: ${frontend_type}") + # beast + ceph::rgw::beast { $name: + rgw_frontends => $rgw_frontends, + } } } stdlib::ensure_packages( $pkg_radosgw_real, { - ensure => installed, + ensure => $pkg_radosgw_ensure, tag => 'ceph', }) diff --git a/releasenotes/notes/pkg_radosgw_ensure-2320210e782f7858.yaml b/releasenotes/notes/pkg_radosgw_ensure-2320210e782f7858.yaml new file mode 100644 index 00000000..2df8465d --- /dev/null +++ b/releasenotes/notes/pkg_radosgw_ensure-2320210e782f7858.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``ceph::rgw::pkg_radosgw_ensure`` parameter has been added.