Prepare for voxpupuli-puppet-lint-plugins

Fix new lint errors detected when full of the voxpupili lint plugins
are enabled.

Change-Id: I4ebee536b84f40b4ef742dbeb8eed8efecda7ba7
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-08-20 21:57:46 +09:00
parent 86d1ff0df8
commit 5d8e8cbf48
21 changed files with 19 additions and 40 deletions

View File

@@ -27,7 +27,7 @@
# [*defaults*] A config hash
# Optional. Defaults to an empty hash
#
class ceph::conf(
class ceph::conf (
Hash $args = {},
Hash $defaults = {}
) {

View File

@@ -53,7 +53,6 @@ define ceph::fs (
# DEPRECATED PARAMETERS
Optional[Float[0]] $exec_timeout = undef,
) {
if $exec_timeout {
warning('The exec_timeout parameter is deprecated and has no effect')
}

View File

@@ -169,7 +169,6 @@ class ceph (
$osd_op_threads = undef,
$rbd_default_features = undef,
) {
include ceph::params
package { $ceph::params::packages :

View File

@@ -89,7 +89,6 @@ define ceph::key (
$inject_as_id = undef,
$inject_keyring = undef,
) {
include ceph::params
$cluster_option = $cluster ? {
@@ -142,12 +141,11 @@ diff -N \$NEW_KEYRING ${keyring_path}
rv=\$?
rm \$NEW_KEYRING
exit \$rv",
require => [ File[$keyring_path], ],
require => [File[$keyring_path]],
logoutput => true,
}
if $inject {
$inject_id_option = $inject_as_id ? {
undef => '',
default => " --name '${inject_as_id}'"
@@ -176,9 +174,8 @@ rv=$?
rm \$OLD_KEYRING
rm \$TMP_KEYRING
exit \$rv",
require => [ Class['ceph'], Exec["ceph-key-${name}"], ],
require => [Class['ceph'], Exec["ceph-key-${name}"]],
logoutput => true,
}
}
}

View File

@@ -27,6 +27,9 @@
# [*defaults*] A keys config hash
# Optional. Defaults to a empty hash.
#
class ceph::keys($args = {}, $defaults = {}) {
class ceph::keys (
$args = {},
$defaults = {},
) {
create_resources(ceph::key, $args, $defaults)
}

View File

@@ -35,12 +35,11 @@ define ceph::mirror (
$rbd_mirror_ensure = 'running',
$rbd_mirror_enable = true,
) {
ensure_resource( 'package',
$pkg_mirror,
{
ensure => present,
tag => [ 'ceph' ],
tag => ['ceph'],
}
)

View File

@@ -88,7 +88,6 @@ define ceph::mon (
$mon_service = "ceph-mon-${id}"
if $ensure == present {
$ceph_mkfs = "ceph-mon-mkfs-${id}"
if $authentication_type == 'cephx' {
@@ -120,13 +119,10 @@ mon_data=\$(ceph-mon ${cluster_option} --id ${id} --show-config-value mon_data)
test -e \$mon_data/done
",
}
Exec["create-keyring-${id}"] -> Exec[$ceph_mkfs]
} else {
$keyring_path = $keyring
}
} else {
$keyring_path = '/dev/null'
}
@@ -208,7 +204,6 @@ test ! -e ${keyring_path}
}
}
}
} else {
service { $mon_service:
ensure => stopped,

View File

@@ -27,6 +27,9 @@
# [*defaults*] A config hash
# Optional. Defaults to a empty hash
#
class ceph::mons($args = {}, $defaults = {}) {
class ceph::mons (
$args = {},
$defaults = {},
) {
create_resources(ceph::mon, $args, $defaults)
}

View File

@@ -79,7 +79,6 @@ define ceph::osd (
Boolean $dmcrypt = false,
$dmcrypt_key_dir = '/etc/ceph/dmcrypt-keys',
) {
include ceph::params
$exec_timeout_real = $exec_timeout ? {
undef => $ceph::params::exec_timeout,
@@ -122,7 +121,6 @@ define ceph::osd (
}
if $ensure == present {
$ceph_prepare = "ceph-osd-prepare-${name}"
$ceph_activate = "ceph-osd-activate-${name}"
@@ -193,8 +191,9 @@ ceph-volume lvm list ${data}
timeout => $exec_timeout_real,
tag => 'prepare',
}
if (str2bool($facts['os']['selinux']['enabled']) == true) {
stdlib::ensure_packages($ceph::params::pkg_policycoreutils, {'ensure' => 'present'})
if str2bool($facts['os']['selinux']['enabled']) == true {
stdlib::ensure_packages($ceph::params::pkg_policycoreutils, { 'ensure' => 'present' })
exec { "fcontext_${name}":
command => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
@@ -233,9 +232,7 @@ ps -fCceph-osd|grep \"\\--id \$id \"
logoutput => true,
tag => 'activate',
}
} else {
# ceph-disk: support osd removal http://tracker.ceph.com/issues/7454
exec { "remove-osd-${name}":
command => "/bin/true # comment to satisfy puppet syntax requirements

View File

@@ -35,13 +35,12 @@
# recovery. The recommended value is the absolute max for pid_max: 4194303
# http://docs.ceph.com/docs/nautilus/rados/troubleshooting/troubleshooting-osd/
#
class ceph::osds(
class ceph::osds (
$args = {},
$defaults = {},
# DEPRECATED PARAMS
$pid_max = undef,
) {
if $pid_max != undef {
warning('pid_max parameter is deprecated and has no effect.')
}

View File

@@ -65,7 +65,6 @@ define ceph::pool (
# DEPRECATED PARAMETERS
Optional[Float[0]] $exec_timeout = undef,
) {
include ceph::params
if $exec_timeout {

View File

@@ -24,7 +24,7 @@ class ceph::profile::osd {
require ceph::profile::client
if $ceph::profile::params::fsid {
$osd_defaults = {'fsid' => $ceph::profile::params::fsid}
$osd_defaults = { 'fsid' => $ceph::profile::params::fsid }
} else {
$osd_defaults = {}
}

View File

@@ -248,7 +248,6 @@ class ceph::profile::params (
# DEPRECATED PARAMS
$pid_max = undef,
) {
if $pid_max != undef {
warning('pid_max parameter is deprecated and has no effect.')
}

View File

@@ -66,7 +66,6 @@ class ceph::repo (
Boolean $enable_sig = $ceph::params::enable_sig,
$ceph_mirror = undef,
) inherits ceph::params {
case $facts['os']['family'] {
'Debian': {
include apt
@@ -127,7 +126,6 @@ not on ${facts['os']['name']}, which can lead to packaging issues.")
proxy_password => $proxy_password,
}
yumrepo { 'ext-ceph':
ensure => $ensure,
descr => "External Ceph ${release}",

View File

@@ -108,7 +108,6 @@ define ceph::rgw (
$rgw_swift_versioning_enabled = false,
$rgw_trust_forwarded_https = false,
) {
unless $name =~ /^radosgw\..+/ {
fail("Define name must be started with 'radosgw.'")
}
@@ -121,7 +120,7 @@ define ceph::rgw (
if $rgw_enable_apis == undef {
ceph_config { "client.${name}/rgw_enable_apis": ensure => absent }
} else {
ceph_config { "client.${name}/rgw_enable_apis": value => join(any2array($rgw_enable_apis), ',')}
ceph_config { "client.${name}/rgw_enable_apis": value => join(any2array($rgw_enable_apis), ',') }
}
ceph_config {

View File

@@ -71,7 +71,7 @@ define ceph::rgw::apache_proxy_fcgi (
$rgw_port = 80,
$rewrite_rule = '.* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]',
$setenv = 'proxy-nokeepalive 1',
$proxy_pass = {'path' => '/', 'url' => 'fcgi://127.0.0.1:9000/'},
$proxy_pass = { 'path' => '/', 'url' => 'fcgi://127.0.0.1:9000/' },
$syslog = true,
$apache_mods = false,
$apache_vhost = false,
@@ -79,7 +79,6 @@ define ceph::rgw::apache_proxy_fcgi (
$apache_purge_vhost = true,
$custom_apache_ports = undef,
) {
include ceph::params
class { 'apache':

View File

@@ -51,7 +51,6 @@ define ceph::rgw::barbican (
$rgw_keystone_barbican_password,
$rgw_barbican_url = 'http://127.0.0.1:9311',
) {
unless $name =~ /^radosgw\..+/ {
fail("Define name must be started with 'radosgw.'")
}

View File

@@ -24,7 +24,6 @@
define ceph::rgw::beast (
$rgw_frontends = ['beast', 'port=7480'],
) {
unless $name =~ /^radosgw\..+/ {
fail("Define name must be started with 'radosgw.'")
}

View File

@@ -24,7 +24,6 @@
define ceph::rgw::civetweb (
$rgw_frontends = ['civetweb', 'port=7480'],
) {
unless $name =~ /^radosgw\..+/ {
fail("Define name must be started with 'radosgw.'")
}

View File

@@ -77,7 +77,6 @@ define ceph::rgw::keystone (
$rgw_s3_auth_use_keystone = true,
$rgw_keystone_implicit_tenants = true,
) {
unless $name =~ /^radosgw\..+/ {
fail("Define name must be started with 'radosgw.'")
}

View File

@@ -63,7 +63,6 @@ class ceph::rgw::keystone::auth (
$service_name = 'swift',
$service_type = 'object-store',
) {
include openstacklib::openstackclient
Keystone::Resource::Service_identity['rgw'] -> Service<| tag == 'ceph-radosgw' |>
@@ -86,4 +85,3 @@ class ceph::rgw::keystone::auth (
admin_url => $admin_url,
}
}