Move mod_status class to fuel_lma_collector

The mod_status class shouldn't live in the lma_collector class because
the (re)configuration of Apache isn't the responsibility of the LMA
collector module.

Change-Id: If80c9d100263436922e06aea02d2050236ff05cf
Closes-Bug: #1547424
This commit is contained in:
Simon Pasquier 2016-05-18 14:36:00 +02:00
parent 41cb740832
commit c579286779
6 changed files with 27 additions and 11 deletions

View File

@ -399,8 +399,8 @@ if hiera('lma::collector::influxdb::server', false) {
# Notification are always collected, lets extract metrics from there
class { 'lma_collector::notifications::metrics': }
# Enable Apache status module
class { 'lma_collector::mod_status': }
# Enable the Apache status module
class { 'fuel_lma_collector::mod_status': }
# Enable service heartbeat metrics
class { 'lma_collector::metrics::service_heartbeat':

View File

@ -12,14 +12,14 @@
# License for the specific language governing permissions and limitations
# under the License.
#
# Class: lma_collector::mod_status
# Class: fuel_lma_collector::mod_status
#
# We don't use apache::mod_status because it requires to include the apache
# base class. And by doing this we overwrite horizon configuration.
# base class. And by doing this we would overwrite the Horizon configuration.
class lma_collector::mod_status (
$allow_from = $lma_collector::params::apache_allow_from,
) inherits lma_collector::params {
class fuel_lma_collector::mod_status (
$allow_from = $fuel_lma_collector::params::apache_allow_from,
) inherits fuel_lma_collector::params {
include apache::params
include apache::service
@ -48,17 +48,17 @@ class lma_collector::mod_status (
}
}
# Template uses $allow_from, $lib_path
# This template uses $allow_from and $lib_path
file { $status_conf:
ensure => file,
content => template('lma_collector/apache/status.conf.erb'),
content => template('fuel_lma_collector/apache/status.conf.erb'),
require => File[$status_load],
notify => Class['apache::service'],
}
file { $status_load:
ensure => file,
content => template('lma_collector/apache/status.load.erb'),
content => template('fuel_lma_collector/apache/status.load.erb'),
}
}

View File

@ -0,0 +1,17 @@
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
class fuel_lma_collector::params {
$apache_allow_from = ['127.0.0.1','::1']
}

View File

@ -168,7 +168,6 @@ class lma_collector::params {
$apache_status_host = '127.0.0.1'
$apache_status_port = '80'
$apache_allow_from = ['127.0.0.1','::1']
$gse_policies_module = 'gse_policies'