Install Ceph OSD collectd python plugin except on controller

Previously this plugin wasn't installed at all if ceph-osd is not a
'dedicated' node (w/o other role)

Change-Id: Ibced5d120abcfe07392a3961a623a413f2c4b86b
This commit is contained in:
Swann Croiset 2015-04-22 11:59:48 +02:00
parent 4eb6fe2a0e
commit 2adcef646d
2 changed files with 8 additions and 3 deletions

View File

@ -17,9 +17,12 @@ $lma_collector_hash = hiera('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 deployed on a
# dedicated node.
if size($roles) == 1 {
# 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::ceph_osd': }
}else{
notice('ceph_osd_perf not configured to avoid messing of collectd python plugin configuration!')

View File

@ -71,6 +71,8 @@ OSD Performance
All the following metrics are retrieved per OSD daemon from the corresponding
socket ``/var/run/ceph/ceph-osd.<ID>.asok`` by issuing the command ``perf dump``.
.. note:: These metrics are not collected when a node has both the ceph-osd and controller roles.
See `OSD performance counters`_ for further details.
* ``osd-<id>.osd.recovery_ops``, number of recovery operations in progress.