Disable apache's purge_configs option

Successive calls to "apache" fuel task results in a non-working Horizon
and Keystone due to purge_configs option set to true which wipes the
contents of several directories inside /etc/apache2/

Fuel runs puppet independently for each "module" so it does not seem
possible to utilize puppet's relationship metaparameters and other
ordering manipulation tools to make sure that all config generators
get reexecuted at this point.

It seems reasonable just to disable `purge_configs' option since
/etc/apache2/ directory structure already implements a framework
for enabling/disabling entities such as virtual hosts, configuration
snippets and modules.

Manifests change the default distro's MPM configuration, so while
the whole directory is not purge we still need to purge vanilla
*mpm* files.

Change-Id: I974ef1423187d908684fa213122e8ba314cac917
Closes-Bug: 1522857
This commit is contained in:
Dmitry Bilunov 2015-12-14 11:57:06 +03:00
parent 8f2f65f2ed
commit f0e5a407ed
3 changed files with 13 additions and 1 deletions

View File

@ -27,6 +27,13 @@ class osnailyfacter::apache_mpm {
$mpm_module = 'worker'
}
tidy { "remove-distro-mpm-modules":
path => $::apache::params::mod_enable_dir,
recurse => true,
matches => [ '*mpm*' ],
rmdirs => false,
}
class { "::apache::mod::$mpm_module":
startservers => $startservers,
maxclients => $maxclients,

View File

@ -6,7 +6,7 @@ sysctl::value { 'net.ipv4.tcp_max_syn_backlog': value => '8192' }
# Listen directives with host required for ip_based vhosts
class { 'osnailyfacter::apache':
purge_configs => true,
purge_configs => false,
listen_ports => hiera_array('apache_ports', ['0.0.0.0:80']),
}

View File

@ -43,6 +43,11 @@ describe manifest do
:mode => '0755').with_content(/^sleep \d+/)
end
it 'should not purge config files' do
should contain_class('apache').with(
'purge_configs' => 'false',
)
end
end
test_ubuntu_and_centos manifest
end