Skip to content

Commit c2a7444

Browse files
committed
(CAT-1449) - Cleanup for deprecated content from module
1 parent d1a79ed commit c2a7444

File tree

10 files changed

+206
-421
lines changed

10 files changed

+206
-421
lines changed

HISTORY.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
## 11.0.0
2+
### Summary
3+
This is release where have done cleanup as well as some feature addition.
4+
#### Added
5+
- Parameters for `apache::mod::passenger`:
6+
- `passenger_max_request_queue_time`
7+
- `passenger_admin_panel_url`
8+
- `passenger_admin_panel_auth_type`
9+
- `passenger_admin_panel_username`
10+
- `passenger_admin_panel_password`
11+
- `passenger_app_log_file`
12+
- `passenger_dump_config_manifest`
13+
#### Removed
14+
- Parameters for `apache::mod::passenger`:
15+
- `rails_ruby`
16+
- `rails_base_uri`
17+
- `rack_base_uri`
18+
- `rails_user_switching`
19+
- `rails_default_user`
20+
- `rails_allow_mod_rewrite`
21+
- `rails_spawn_method`
22+
- `rails_auto_detect`
23+
- `rack_auto_detect`
24+
- `wsgi_auto_detect`
25+
- `rails_app_spawner_idle_time`
26+
- `rails_framework_app_spawner_idle_time`
27+
128
## 3.2.0
229
### Summary
330
This is a clean release to prepare for several planned backwards incompatible changes.

REFERENCE.md

Lines changed: 67 additions & 159 deletions
Large diffs are not rendered by default.

manifests/init.pp

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@
105105
# ```
106106
# **Note**: SSL virtual hosts only respond to HTTPS queries.
107107
#
108-
# @param default_type
109-
# _Apache 2.2 only_. Sets the MIME `content-type` sent if the server cannot otherwise
110-
# determine an appropriate `content-type`. This directive is deprecated in Apache 2.4 and
111-
# newer, and is only for backwards compatibility in configuration files.
112-
#
113108
# @param default_vhost
114109
# Configures a default virtual host when the class is declared.<br />
115110
# To configure customized virtual hosts, set this parameter's
@@ -423,10 +418,6 @@
423418
#
424419
# @param ip
425420
# Specifies the ip address
426-
#
427-
# @param purge_vdir
428-
# Removes all other Apache configs and virtual hosts.<br />
429-
# > **Note**: This parameter is deprecated in favor of the `purge_configs` parameter.<br />
430421
#
431422
# @param conf_enabled
432423
# Whether the additional config files in `/etc/apache2/conf-enabled` should be managed.
@@ -472,7 +463,6 @@
472463
Optional[Stdlib::Absolutepath] $default_ssl_crl = undef,
473464
Optional[String] $default_ssl_crl_check = undef,
474465
Boolean $default_ssl_reload_on_change = false,
475-
String $default_type = 'none',
476466
Optional[Variant[Array, String]] $dev_packages = $apache::params::dev_packages,
477467
Optional[String] $ip = undef,
478468
Boolean $service_enable = true,
@@ -481,7 +471,6 @@
481471
Optional[String] $service_restart = undef,
482472
Boolean $purge_configs = true,
483473
Optional[Boolean] $purge_vhost_dir = undef,
484-
Boolean $purge_vdir = false,
485474
Optional[String[1]] $serveradmin = undef,
486475
Apache::OnOff $sendfile = 'On',
487476
Optional[Apache::OnOff] $ldap_verify_server_cert = undef,
@@ -599,17 +588,9 @@
599588
service_restart => $service_restart,
600589
}
601590

602-
# Deprecated backwards-compatibility
603-
if $purge_vdir {
604-
warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs')
605-
$purge_confd = $purge_vdir
606-
} else {
607-
$purge_confd = $purge_configs
608-
}
609-
610591
# Set purge vhostd appropriately
611592
if $purge_vhost_dir == undef {
612-
$purge_vhostd = $purge_confd
593+
$purge_vhostd = $purge_configs
613594
} else {
614595
$purge_vhostd = $purge_vhost_dir
615596
}
@@ -627,8 +608,8 @@
627608
file { $confd_dir:
628609
ensure => directory,
629610
recurse => true,
630-
purge => $purge_confd,
631-
force => $purge_confd,
611+
purge => $purge_configs,
612+
force => $purge_configs,
632613
notify => Class['Apache::Service'],
633614
require => Package['httpd'],
634615
}
@@ -637,8 +618,8 @@
637618
file { $conf_enabled:
638619
ensure => directory,
639620
recurse => true,
640-
purge => $purge_confd,
641-
force => $purge_confd,
621+
purge => $purge_configs,
622+
force => $purge_configs,
642623
notify => Class['Apache::Service'],
643624
require => Package['httpd'],
644625
}

manifests/mod/passenger.pp

Lines changed: 74 additions & 123 deletions
Large diffs are not rendered by default.

manifests/vhost.pp

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@
9696
# the `aliases` parameter. As described in the `mod_alias` documentation, add more specific
9797
# `alias`, `aliasmatch`, `scriptalias` or `scriptaliasmatch` parameters before the more
9898
# general ones to avoid shadowing.<BR />
99-
# > **Note**: Use the `aliases` parameter instead of the `scriptaliases` parameter because
100-
# you can precisely control the order of various alias directives. Defining `ScriptAliases`
101-
# using the `scriptaliases` parameter means *all* `ScriptAlias` directives will come after
102-
# *all* `Alias` directives, which can lead to `Alias` directives shadowing `ScriptAlias`
103-
# directives. This often causes problems; for example, this could cause problems with Nagios.<BR />
10499
# If `apache::mod::passenger` is loaded and `PassengerHighPerformance` is `true`, the `Alias`
105100
# directive might not be able to honor the `PassengerEnabled => off` statement. See
106101
# [this article](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) for details.
@@ -1095,34 +1090,6 @@
10951090
# Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', such as
10961091
# '/usr/scripts'.
10971092
#
1098-
# @param scriptaliases
1099-
# > **Note**: This parameter is deprecated in favor of the `aliases` parameter.<br />
1100-
# Passes an array of hashes to the virtual host to create either ScriptAlias or
1101-
# ScriptAliasMatch statements per the `mod_alias` documentation.
1102-
# ``` puppet
1103-
# scriptaliases => [
1104-
# {
1105-
# alias => '/myscript',
1106-
# path => '/usr/share/myscript',
1107-
# },
1108-
# {
1109-
# aliasmatch => '^/foo(.*)',
1110-
# path => '/usr/share/fooscripts$1',
1111-
# },
1112-
# {
1113-
# aliasmatch => '^/bar/(.*)',
1114-
# path => '/usr/share/bar/wrapper.sh/$1',
1115-
# },
1116-
# {
1117-
# alias => '/neatscript',
1118-
# path => '/usr/share/neatscript',
1119-
# },
1120-
# ]
1121-
# ```
1122-
# The ScriptAlias and ScriptAliasMatch directives are created in the order specified.
1123-
# As with [Alias and AliasMatch](#aliases) directives, specify more specific aliases
1124-
# before more general ones to avoid shadowing.
1125-
#
11261093
# @param serveradmin
11271094
# Specifies the email address Apache displays when it renders one of its error pages.
11281095
#
@@ -1811,7 +1778,6 @@
18111778
Variant[Array[Hash], String] $error_documents = [],
18121779
Optional[Variant[Stdlib::Absolutepath, Enum['disabled']]] $fallbackresource = undef,
18131780
Optional[String] $scriptalias = undef,
1814-
Array[Hash] $scriptaliases = [],
18151781
Optional[Integer] $limitreqfieldsize = undef,
18161782
Optional[Integer] $limitreqfields = undef,
18171783
Optional[Integer] $limitreqline = undef,
@@ -2552,9 +2518,8 @@
25522518
}
25532519

25542520
# Template uses:
2555-
# - $scriptaliases
25562521
# - $scriptalias
2557-
if ($scriptalias or !empty($scriptaliases)) and $ensure == 'present' {
2522+
if $scriptalias and $ensure == 'present' {
25582523
include apache::mod::alias
25592524

25602525
concat::fragment { "${name}-scriptalias":

spec/acceptance/vhost_spec.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,6 @@ class { 'apache': }
816816
docroot => '/tmp',
817817
proxy_dest => 'http://testproxy',
818818
}
819-
apache::vhost { 'test.scriptaliases':
820-
docroot => '/tmp',
821-
scriptaliases => [{ alias => '/myscript', path => '/usr/share/myscript', }],
822-
}
823819
apache::vhost { 'test.aliases':
824820
docroot => '/tmp',
825821
aliases => [
@@ -930,11 +926,6 @@ class { 'apache': }
930926
it { is_expected.to contain 'ProxyPass / http://testproxy/' }
931927
end
932928

933-
describe file("#{apache_hash['vhost_dir']}/25-test.scriptaliases.conf") do
934-
it { is_expected.to be_file }
935-
it { is_expected.to contain 'ScriptAlias /myscript "/usr/share/myscript"' }
936-
end
937-
938929
describe file("#{apache_hash['vhost_dir']}/25-test.aliases.conf") do
939930
it { is_expected.to be_file }
940931
it { is_expected.to contain 'Alias /image "/ftp/pub/image"' }

spec/classes/mod/passenger_spec.rb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727
passenger_config_options = {
2828
'passenger_allow_encoded_slashes' => { type: 'OnOff', pass_opt: :PassengerAllowEncodedSlashes },
2929
'passenger_anonymous_telemetry_proxy' => { type: 'String', pass_opt: :PassengerAnonymousTelemetryProxy },
30+
'passenger_admin_panel_url' => { type: 'String', pass_opt: :PassengerAdminPanelUrl },
31+
'passenger_admin_panel_auth_type' => { type: 'String', pass_opt: :PassengerAdminPanelAuthType },
32+
'passenger_admin_panel_username' => { type: 'String', pass_opt: :PassengerAdminPanelUsername },
33+
'passenger_admin_panel_password' => { type: 'String', pass_opt: :PassengerAdminPanelPassword },
3034
'passenger_app_env' => { type: 'String', pass_opt: :PassengerAppEnv },
3135
'passenger_app_group_name' => { type: 'String', pass_opt: :PassengerAppGroupName },
36+
'passenger_app_log_file' => { type: 'String', pass_opt: :PassengerAppLogFile },
3237
'passenger_app_root' => { type: 'FullPath', pass_opt: :PassengerAppRoot },
3338
'passenger_app_type' => { type: 'String', pass_opt: :PassengerAppType },
3439
'passenger_base_uri' => { type: 'URI', pass_opt: :PassengerBaseURI },
@@ -44,6 +49,7 @@
4449
'passenger_disable_anonymous_telemetry' => { type: 'Boolean', pass_opt: :PassengerDisableAnonymousTelemetry },
4550
'passenger_disable_log_prefix' => { type: 'Boolean', pass_opt: :PassengerDisableLogPrefix },
4651
'passenger_disable_security_update_check' => { type: 'OnOff', pass_opt: :PassengerDisableSecurityUpdateCheck },
52+
'passenger_dump_config_manifest' => { type: 'String', pass_opt: :PassengerDumpConfigManifest },
4753
'passenger_enabled' => { type: 'OnOff', pass_opt: :PassengerEnabled },
4854
'passenger_error_override' => { type: 'OnOff', pass_opt: :PassengerErrorOverride },
4955
'passenger_file_descriptor_log_file' => { type: 'FullPath', pass_opt: :PassengerFileDescriptorLogFile },
@@ -63,6 +69,7 @@
6369
'passenger_max_pool_size' => { type: 'Integer', pass_opt: :PassengerMaxPoolSize },
6470
'passenger_max_preloader_idle_time' => { type: 'Integer', pass_opt: :PassengerMaxPreloaderIdleTime },
6571
'passenger_max_request_queue_size' => { type: 'Integer', pass_opt: :PassengerMaxRequestQueueSize },
72+
'passenger_max_request_queue_time' => { type: 'Integer', pass_opt: :PassengerMaxRequestQueueTime },
6673
'passenger_max_request_time' => { type: 'Integer', pass_opt: :PassengerMaxRequestTime },
6774
'passenger_max_requests' => { type: 'Integer', pass_opt: :PassengerMaxRequests },
6875
'passenger_memory_limit' => { type: 'Integer', pass_opt: :PassengerMemoryLimit },
@@ -94,22 +101,11 @@
94101
'passenger_use_global_queue' => { type: 'String', pass_opt: :PassengerUseGlobalQueue },
95102
'passenger_user' => { type: 'String', pass_opt: :PassengerUser },
96103
'passenger_user_switching' => { type: 'OnOff', pass_opt: :PassengerUserSwitching },
97-
'rack_auto_detect' => { type: 'String', pass_opt: :RackAutoDetect },
98104
'rack_autodetect' => { type: 'String', pass_opt: :RackAutoDetect },
99-
'rack_base_uri' => { type: 'String', pass_opt: :RackBaseURI },
100105
'rack_env' => { type: 'String', pass_opt: :RackEnv },
101-
'rails_allow_mod_rewrite' => { type: 'String', pass_opt: :RailsAllowModRewrite },
102-
'rails_app_spawner_idle_time' => { type: 'String', pass_opt: :RailsAppSpawnerIdleTime },
103-
'rails_auto_detect' => { type: 'String', pass_opt: :RailsAutoDetect },
104106
'rails_autodetect' => { type: 'String', pass_opt: :RailsAutoDetect },
105-
'rails_base_uri' => { type: 'String', pass_opt: :RailsBaseURI },
106-
'rails_default_user' => { type: 'String', pass_opt: :RailsDefaultUser },
107107
'rails_env' => { type: 'String', pass_opt: :RailsEnv },
108-
'rails_framework_spawner_idle_time' => { type: 'String', pass_opt: :RailsFrameworkSpawnerIdleTime },
109-
'rails_ruby' => { type: 'String', pass_opt: :RailsRuby },
110-
'rails_spawn_method' => { type: 'String', pass_opt: :RailsSpawnMethod },
111-
'rails_user_switching' => { type: 'String', pass_opt: :RailsUserSwitching },
112-
'wsgi_auto_detect' => { type: 'String', pass_opt: :WsgiAutoDetect }
108+
'rails_framework_spawner_idle_time' => { type: 'String', pass_opt: :RailsFrameworkSpawnerIdleTime }
113109
}
114110
passenger_config_options.each do |config_option, config_hash|
115111
puppetized_config_option = config_option
@@ -242,7 +238,7 @@
242238
let :params do
243239
{
244240
passenger_installed_version: '5.0.0',
245-
rails_ruby: '/some/path/to/ruby'
241+
passenger_ruby: '/some/path/to/ruby'
246242
}
247243
end
248244

spec/defines/vhost_spec.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,6 @@
324324
'error_documents' => 'true',
325325
'fallbackresource' => '/index.php',
326326
'scriptalias' => '/usr/lib/cgi-bin',
327-
'scriptaliases' => [
328-
{
329-
'alias' => '/myscript',
330-
'path' => '/usr/share/myscript'
331-
},
332-
{
333-
'aliasmatch' => '^/foo(.*)',
334-
'path' => '/usr/share/fooscripts$1'
335-
},
336-
],
337327
'limitreqfieldsize' => 8190,
338328
'limitreqfields' => 100,
339329
'limitreqline' => 8190,

templates/mod/passenger.conf.epp

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,27 @@
77
<%- if $passenger_anonymous_telemetry_proxy { -%>
88
PassengerAnonymousTelemetryProxy <%= $passenger_anonymous_telemetry_proxy %>
99
<%- } -%>
10+
<%- if $passenger_admin_panel_url { -%>
11+
PassengerAdminPanelUrl <%= $passenger_admin_panel_url %>
12+
<%- } -%>
13+
<%- if $passenger_admin_panel_auth_type { -%>
14+
PassengerAdminPanelAuthType <%= $passenger_admin_panel_auth_type %>
15+
<%- } -%>
16+
<%- if $passenger_admin_panel_username { -%>
17+
PassengerAdminPanelUsername <%= $passenger_admin_panel_username %>
18+
<%- } -%>
19+
<%- if $passenger_admin_panel_password { -%>
20+
PassengerAdminPanelPassword <%= $passenger_admin_panel_password %>
21+
<%- } -%>
1022
<%- if $passenger_app_env { -%>
1123
PassengerAppEnv <%= $passenger_app_env %>
1224
<%- } -%>
1325
<%- if $passenger_app_group_name { -%>
1426
PassengerAppGroupName <%= $passenger_app_group_name %>
1527
<%- } -%>
28+
<%- if $passenger_app_log_file { -%>
29+
PassengerAppLogFile <%= $passenger_app_log_file %>
30+
<%- } -%>
1631
<%- if $passenger_app_root { -%>
1732
PassengerAppRoot "<%= $passenger_app_root %>"
1833
<%- } -%>
@@ -58,6 +73,9 @@
5873
<%- if $passenger_disable_security_update_check { -%>
5974
PassengerDisableSecurityUpdateCheck <%= $passenger_disable_security_update_check %>
6075
<%- } -%>
76+
<%- if $passenger_dump_config_manifest { -%>
77+
PassengerDumpConfigManifest <%= $passenger_dump_config_manifest %>
78+
<%- } -%>
6179
<%- if $passenger_enabled { -%>
6280
PassengerEnabled <%= $passenger_enabled %>
6381
<%- } -%>
@@ -115,6 +133,9 @@
115133
<%- if $passenger_max_request_queue_size { -%>
116134
PassengerMaxRequestQueueSize <%= $passenger_max_request_queue_size %>
117135
<%- } -%>
136+
<%- if $passenger_max_request_queue_time { -%>
137+
PassengerMaxRequestQueueTime <%= $passenger_max_request_queue_time %>
138+
<%- } -%>
118139
<%- if $passenger_max_request_time { -%>
119140
PassengerMaxRequestTime <%= $passenger_max_request_time %>
120141
<%- } -%>
@@ -210,48 +231,15 @@
210231
<%- if $passenger_user_switching { -%>
211232
PassengerUserSwitching <%= $passenger_user_switching %>
212233
<%- } -%>
213-
<%- if $rack_auto_detect { -%>
214-
RackAutoDetect <%= $rack_auto_detect %>
215-
<%- } -%>
216-
<%- if $rack_base_uri { -%>
217-
RackBaseURI <%= $rack_base_uri %>
218-
<%- } -%>
219234
<%- if $rack_env { -%>
220235
RackEnv <%= $rack_env %>
221236
<%- } -%>
222-
<%- if $rails_allow_mod_rewrite { -%>
223-
RailsAllowModRewrite <%= $rails_allow_mod_rewrite %>
224-
<%- } -%>
225-
<%- if $rails_app_spawner_idle_time { -%>
226-
RailsAppSpawnerIdleTime <%= $rails_app_spawner_idle_time %>
227-
<%- } -%>
228-
<%- if $rails_auto_detect { -%>
229-
RailsAutoDetect <%= $rails_auto_detect %>
230-
<%- } -%>
231-
<%- if $rails_base_uri { -%>
232-
RailsBaseURI <%= $rails_base_uri %>
233-
<%- } -%>
234-
<%- if $rails_default_user { -%>
235-
RailsDefaultUser <%= $rails_default_user %>
236-
<%- } -%>
237237
<%- if $rails_env { -%>
238238
RailsEnv <%= $rails_env %>
239239
<%- } -%>
240240
<%- if $rails_framework_spawner_idle_time { -%>
241241
RailsFrameworkSpawnerIdleTime <%= $rails_framework_spawner_idle_time %>
242242
<%- } -%>
243-
<%- if $rails_ruby { -%>
244-
RailsRuby <%= $rails_ruby %>
245-
<%- } -%>
246-
<%- if $rails_spawn_method { -%>
247-
RailsSpawnMethod <%= $rails_spawn_method %>
248-
<%- } -%>
249-
<%- if $rails_user_switching { -%>
250-
RailsUserSwitching <%= $rails_user_switching %>
251-
<%- } -%>
252-
<%- if $wsgi_auto_detect { -%>
253-
WsgiAutoDetect <%= $wsgi_auto_detect %>
254-
<%- } -%>
255243
<%- if $rails_autodetect { -%>
256244
RailsAutoDetect <%= $rails_autodetect %>
257245
<%- } -%>

templates/vhost/_scriptalias.erb

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
1-
<%- aliases = @scriptaliases -%>
2-
## Script alias directives
3-
<%# Combine scriptalias and scriptaliases into a single data structure -%>
4-
<%# for backward compatibility and ease of implementation -%>
5-
<%- aliases << { 'alias' => '/cgi-bin', 'path' => @scriptalias } if @scriptalias -%>
6-
<%- aliases.each do |salias| -%>
7-
<%- if salias["path"] != '' -%>
8-
<%- if salias["alias"] and salias["alias"] != '' -%>
9-
ScriptAlias <%= salias['alias'] %> "<%= salias['path'] %>"
10-
<%- elsif salias["aliasmatch"] and salias["aliasmatch"] != '' -%>
11-
ScriptAliasMatch <%= salias['aliasmatch'] %> "<%= salias['path'] %>"
12-
<%- end -%>
13-
<%- end -%>
14-
<%- end -%>
1+
## Script alias directives
2+
ScriptAlias /cgi-bin "<%= @scriptalias %>"

0 commit comments

Comments
 (0)