fuel-plugin-lma-collector/deployment_scripts/puppet/manifests/ceph_osd.pp
Éric Lemoine 43c5824e1d Remove lma_collector::collectd::service
This changes removes the lma_collector::collectd::service because it
is incompatible with lma_collector::collectd::python. The
incompatibility is related to both lma_collector::collectd::service
and lma_collector::collectd::python declaring a "collectd" service
resource. It is a mistake to have the lma_collector module declare
the "collectd" service, as the "collectd" module is responsible for
that.

Change-Id: I504753ebdf04fd77ab22be4d5caf94ea67db4397
2016-01-19 08:35:06 +01:00

34 lines
1.5 KiB
Puppet

# 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.
#
$lma_collector_hash = hiera_hash('lma_collector')
if $lma_collector_hash['influxdb_mode'] != 'disabled' {
$nodes_hash = hiera('nodes', {})
$roles = node_roles($nodes_hash, hiera('uid'))
# Only install this python collectd plugin if ceph-osd is not deployed on a
# controller node. This is due to a limitation of the python plugin puppet
# module which can be run only by one manifest otherwise the collectd configuration is
# overwritten by the next run. Currently only controller nodes have python
# plugins installed so it's safe to install on all other roles .. for now.
if ! ('controller' in $roles or 'primary-controller' in $roles){
class { 'lma_collector::collectd::base':
processes => ['hekad', 'collectd'],
}
class { 'lma_collector::collectd::ceph_osd': }
}else{
notice('ceph_osd_perf not configured to avoid messing of collectd python plugin configuration!')
}
}