Deprecate support for mod_fastcgi

mod_fastcgi package is not provided for recent operating system
versions. This adds the warning messages to make users aware of that
fact.

The parameter will be removed once we remove the remaining support for
CentOS 7.

Change-Id: I683f68457f568712afb25e7c208e4fc3e737aa03
This commit is contained in:
Takashi Kajinami 2023-08-07 10:32:58 +09:00
parent 6ee452ae01
commit b72c1ec57f
5 changed files with 32 additions and 5 deletions

View File

@ -55,6 +55,7 @@ class ceph::params (
$user_radosgw = 'www-data'
$pkg_fastcgi = 'libapache2-mod-fastcgi'
$pkg_policycoreutils = 'policycoreutils'
$fastcgi_available = false
}
'RedHat': {
@ -63,8 +64,10 @@ class ceph::params (
$pkg_fastcgi = 'mod_fastcgi'
if (Integer.new($facts['os']['release']['major']) > 7) {
$pkg_policycoreutils = 'policycoreutils-python-utils'
$fastcgi_available = false
} else {
$pkg_policycoreutils = 'policycoreutils-python'
$fastcgi_available = false
}
}

View File

@ -36,9 +36,6 @@
# [*release*] The name of the Ceph release to install
# Optional. Default to 'nautilus' in ceph::params.
#
# [*fastcgi*] Install Ceph fastcgi apache module for Ceph
# Optional. Defaults to 'false'
#
# [*proxy*] Proxy URL to be used for the yum repository, useful if you're behind a corporate firewall
# Optional. Defaults to 'undef'
#
@ -62,10 +59,14 @@
# [*ceph_mirror*] Ceph mirror used to download packages.
# Optional. Defaults to undef.
#
# DEPRECATED PARAMETERS
#
# [*fastcgi*] Install Ceph fastcgi apache module for Ceph
# Optional. Defaults to 'false'
#
class ceph::repo (
$ensure = present,
String[1] $release = $ceph::params::release,
Boolean $fastcgi = false,
$proxy = undef,
$proxy_username = undef,
$proxy_password = undef,
@ -73,7 +74,14 @@ class ceph::repo (
Boolean $enable_sig = $ceph::params::enable_sig,
Boolean $stream = false,
$ceph_mirror = undef,
# DEPRECATED PARAMETERS
Boolean $fastcgi = false,
) inherits ceph::params {
if $fastcgi and !$ceph::params::fastcgi_available {
warning('The mod_fastcgi package is not available for this operating system version')
}
case $facts['os']['family'] {
'Debian': {
include apt
@ -98,7 +106,6 @@ class ceph::repo (
}
if $fastcgi {
apt::key { 'ceph-gitbuilder':
ensure => $ensure,
id => 'FCC5CB2ED8E6F6FB79D5B3316EAEAE2203C3951A',

View File

@ -145,6 +145,9 @@ define ceph::rgw (
}
}
'apache-fastcgi': {
if $ceph::params::fastcgi_available {
warning('The mod_fastcgi package is not available for this operating system version')
}
ceph_config {
"client.${name}/rgw_port": value => $rgw_port;
"client.${name}/rgw_print_continue": value => $rgw_print_continue;
@ -152,6 +155,9 @@ define ceph::rgw (
}
}
'apache-proxy-fcgi': {
if $ceph::params::fastcgi_available {
warning('The mod_fastcgi package is not available for this operating system version')
}
$rgw_frontends_real = pick($rgw_frontends, 'fastcgi socket_port=9000 socket_host=127.0.0.1');
ceph_config {
"client.${name}/rgw_frontends": value => $rgw_frontends_real;

View File

@ -80,6 +80,11 @@ define ceph::rgw::apache_proxy_fcgi (
$custom_apache_ports = undef,
) {
include ceph::params
if $ceph::params::fastcgi_available {
warning('The mod_fastcgi package is not available for this operating system version')
}
class { 'apache':
default_mods => $apache_mods,
default_vhost => $apache_vhost,

View File

@ -0,0 +1,6 @@
---
deprecations:
- |
The support for deploying fastcgi is deprecated and will be removed in
a future release. when CentOS 7 support is removed. The `mod_fastcgi`
package is no longer provided for recent operating system versions.