Commit 9fbdb8c9 authored by Zuul's avatar Zuul Committed by Gerrit Code Review

Merge "Deprecate mod_fastcgi. Promote civetweb."

parents a15a9b0c 864f9b22
......@@ -59,10 +59,10 @@
# Optional. Default is undef.
#
# [*frontend_type*] What type of frontend to use
# Optional. Default is apache-fastcgi. Other options are apache-proxy-fcgi or civetweb
# Optional. Default is civetweb, Other options are apache-proxy-fcgi or apache-fastcgi.
#
# [*rgw_frontends*] Arguments to the rgw frontend
# Optional. Default is 'fastcgi socket_port=9000 socket_host=127.0.0.1'. Example: "civetweb port=7480"
# Optional. Default is 'civetweb port=7480'.
#
# Deprecated Parameters:
#
......@@ -82,8 +82,8 @@ define ceph::rgw (
$rgw_socket_path = $::ceph::params::rgw_socket_path,
$rgw_print_continue = false,
$rgw_port = undef,
$frontend_type = 'apache-fastcgi',
$rgw_frontends = 'fastcgi socket_port=9000 socket_host=127.0.0.1',
$frontend_type = 'civetweb',
$rgw_frontends = 'civetweb port=7480',
$syslog = undef,
) {
......@@ -107,11 +107,8 @@ define ceph::rgw (
if($frontend_type == 'civetweb')
{
if( $rgw_frontends =~ /civetweb/ )
{
ceph::rgw::civetweb { $name:
rgw_frontends => $rgw_frontends,
}
ceph::rgw::civetweb { $name:
rgw_frontends => $rgw_frontends,
}
}
elsif ( ( $frontend_type == 'apache-fastcgi' ) or ( $frontend_type == 'apache-proxy-fcgi' ) )
......
......@@ -82,6 +82,7 @@ define ceph::rgw::apache_fastcgi (
$custom_apache_ports = undef,
) {
warning ('apache_fastcgi is depricated and will be removed in two releases (P+2)')
class { '::apache':
default_mods => $apache_mods,
default_vhost => $apache_vhost,
......@@ -141,8 +142,17 @@ exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n ${name}",
-> Package[$pkg_fastcgi]
}
'RedHat': {
if ($::osfamily == 'Redhat' and versioncmp($::operatingsystemrelease, '7.0') >= 0)
{
warning('puppetlabs puppet-apache dropped support for fastcgi on EL7')
$pkg_fastcgi_real = 'mod_fastcgi'
}
else
{
$pkg_fastcgi_real = $pkg_fastcgi
}
Yumrepo['ext-ceph-fastcgi']
-> Package[$pkg_fastcgi]
-> Package[$pkg_fastcgi_real]
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \
......
......@@ -19,10 +19,10 @@
#
# == Define: ceph::rgw::civetweb
# [*rgw_frontends*] Arguments to the rgw frontend
# Optional. Default is undef. Example: "civetweb port=7480"
# Optional. Default is 'civetweb port=7480'
#
define ceph::rgw::civetweb (
$rgw_frontends = undef,
$rgw_frontends = 'civetweb port=7480',
) {
unless $name =~ /^radosgw\..+/ {
......
---
features:
- |
Changed default frontend of rgw from fastcgi to civetweb.
deprecations:
- |
fastcgi frontend for RGW has been deprecated. Puppetlabs
puppetlabs-apache has dropped support for fastcgi on RHEL/CentOS
7 hosts. puppetlabs-apache <= 2.2.0 is required for fastcgi.
Fastcgi will be removed in P+2 release.
......@@ -38,7 +38,7 @@ describe 'ceph::rgw' do
it { is_expected.to contain_ceph_config('client.radosgw.civetweb/host').with_value('myhost') }
it { is_expected.to contain_ceph_config('client.radosgw.civetweb/keyring').with_value('/etc/ceph/ceph.client.radosgw.civetweb.keyring') }
it { is_expected.to contain_ceph_config('client.radosgw.civetweb/log_file').with_value('/var/log/ceph/radosgw.log') }
it { is_expected.to_not contain_ceph_config('client.radosgw.civetweb/rgw_frontends') }
it { is_expected.to contain_ceph_config('client.radosgw.civetweb/rgw_frontends').with_value('civetweb port=7480') }
end
describe "activated with custom civetweb params" do
......
......@@ -48,9 +48,6 @@ describe 'ceph::rgw' do
it { is_expected.to contain_ceph_config('client.radosgw.gateway/host').with_value('myhost') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/keyring').with_value('/etc/ceph/ceph.client.radosgw.gateway.keyring') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/log_file').with_value('/var/log/ceph/radosgw.log') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_dns_name').with_value('myhost.domain') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_print_continue').with_value(false) }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_socket_path').with_value('/tmp/radosgw.sock') }
it { is_expected.to contain_file('/var/lib/ceph/radosgw').with({
'ensure' => 'directory',
......@@ -87,10 +84,6 @@ describe 'ceph::rgw' do
:user => 'wwwuser',
:keyring_path => "/etc/ceph/ceph.radosgw.custom.keyring",
:log_file => '/var/log/ceph/mylogfile.log',
:rgw_dns_name => 'mydns.hostname',
:rgw_socket_path => '/some/location/radosgw.sock',
:rgw_print_continue => true,
:rgw_port => 1111,
}
end
......@@ -99,10 +92,6 @@ describe 'ceph::rgw' do
it { is_expected.to contain_ceph_config('client.radosgw.custom/host').with_value('myhost') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/keyring').with_value('/etc/ceph/ceph.radosgw.custom.keyring') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/log_file').with_value('/var/log/ceph/mylogfile.log') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_dns_name').with_value('mydns.hostname') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_print_continue').with_value(true) }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_socket_path').with_value('/some/location/radosgw.sock') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_port').with_value(1111) }
it { is_expected.to contain_ceph_config('client.radosgw.custom/user').with_value('wwwuser') }
it { is_expected.to contain_file('/var/lib/ceph/radosgw/ceph-radosgw.custom').with( {
......@@ -145,9 +134,6 @@ describe 'ceph::rgw' do
it { is_expected.to contain_ceph_config('client.radosgw.gateway/host').with_value('myhost') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/keyring').with_value('/etc/ceph/ceph.client.radosgw.gateway.keyring') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/log_file').with_value('/var/log/ceph/radosgw.log') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_dns_name').with_value('myhost.domain') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_print_continue').with_value(false) }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_socket_path').with_value('/tmp/radosgw.sock') }
it { is_expected.to contain_file('/var/lib/ceph/radosgw').with({
'ensure' => 'directory',
......@@ -182,10 +168,6 @@ describe 'ceph::rgw' do
:user => 'wwwuser',
:keyring_path => "/etc/ceph/ceph.radosgw.custom.keyring",
:log_file => '/var/log/ceph/mylogfile.log',
:rgw_dns_name => 'mydns.hostname',
:rgw_socket_path => '/some/location/radosgw.sock',
:rgw_print_continue => true,
:rgw_port => 1111,
}
end
......@@ -194,10 +176,6 @@ describe 'ceph::rgw' do
it { is_expected.to contain_ceph_config('client.radosgw.custom/host').with_value('myhost') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/keyring').with_value('/etc/ceph/ceph.radosgw.custom.keyring') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/log_file').with_value('/var/log/ceph/mylogfile.log') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_dns_name').with_value('mydns.hostname') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_print_continue').with_value(true) }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_socket_path').with_value('/some/location/radosgw.sock') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_port').with_value(1111) }
it { is_expected.to contain_ceph_config('client.radosgw.custom/user').with_value('wwwuser') }
it { is_expected.to contain_file('/var/lib/ceph/radosgw/ceph-radosgw.custom').with( {
......@@ -240,9 +218,6 @@ describe 'ceph::rgw' do
it { is_expected.to contain_ceph_config('client.radosgw.gateway/host').with_value('myhost') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/keyring').with_value('/etc/ceph/ceph.client.radosgw.gateway.keyring') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/log_file').with_value('/var/log/ceph/radosgw.log') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_dns_name').with_value('myhost.domain') }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_print_continue').with_value(false) }
it { is_expected.to contain_ceph_config('client.radosgw.gateway/rgw_socket_path').with_value('/tmp/radosgw.sock') }
it { is_expected.to contain_file('/var/lib/ceph/radosgw').with({
'ensure' => 'directory',
......@@ -277,10 +252,6 @@ describe 'ceph::rgw' do
:user => 'wwwuser',
:keyring_path => "/etc/ceph/ceph.radosgw.custom.keyring",
:log_file => '/var/log/ceph/mylogfile.log',
:rgw_dns_name => 'mydns.hostname',
:rgw_socket_path => '/some/location/radosgw.sock',
:rgw_print_continue => true,
:rgw_port => 1111,
}
end
......@@ -289,10 +260,6 @@ describe 'ceph::rgw' do
it { is_expected.to contain_ceph_config('client.radosgw.custom/host').with_value('myhost') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/keyring').with_value('/etc/ceph/ceph.radosgw.custom.keyring') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/log_file').with_value('/var/log/ceph/mylogfile.log') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_dns_name').with_value('mydns.hostname') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_print_continue').with_value(true) }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_socket_path').with_value('/some/location/radosgw.sock') }
it { is_expected.to contain_ceph_config('client.radosgw.custom/rgw_port').with_value(1111) }
it { is_expected.to contain_ceph_config('client.radosgw.custom/user').with_value('wwwuser') }
it { is_expected.to contain_file('/var/lib/ceph/radosgw/ceph-radosgw.custom').with( {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment