Merge "Remove deprecated hiera('nodes')"

This commit is contained in:
Jenkins 2016-05-11 13:15:02 +00:00 committed by Gerrit Code Review
commit c4e1f22b8d
6 changed files with 13 additions and 22 deletions

View File

@ -17,8 +17,7 @@ notice('fuel-plugin-lma-collector: aggregator.pp')
prepare_network_config(hiera('network_scheme', {}))
$mgmt_address = get_network_role_property('management', 'ipaddr')
$lma_collector = hiera_hash('lma_collector')
$roles = node_roles(hiera('nodes'), hiera('uid'))
$is_controller = member($roles, 'controller') or member($roles, 'primary-controller')
$is_controller = roles_include(['controller', 'primary-controller'])
$is_rabbitmq = roles_include(['standalone-rabbitmq', 'primary-standalone-rabbitmq'])
$is_mysql_server = roles_include(['standalone-database', 'primary-standalone-database'])
@ -31,8 +30,8 @@ $aggregator_port = 5565
$check_port = 5566
if $is_controller or $is_rabbitmq or $is_mysql_server {
# On nodes where pacemaker is deployed, make sure the LMA service is
# configured with the "pacemaker" provider
# On nodes where pacemaker is deployed, make sure the Log and Metric collector services
# are configured with the "pacemaker" provider
include lma_collector::params
Service<| title == $lma_collector::params::log_service_name |> {
provider => 'pacemaker'

View File

@ -18,11 +18,8 @@ notice('fuel-plugin-lma-collector: base.pp')
prepare_network_config(hiera('network_scheme', {}))
$fuel_version = 0 + hiera('fuel_version')
$lma_collector = hiera_hash('lma_collector')
$roles = node_roles(hiera('nodes'), hiera('uid'))
$is_controller = member($roles, 'controller') or member($roles, 'primary-controller')
$is_base_os = member($roles, 'base-os')
$current_node_name = hiera('user_node_name')
$current_roles = hiera('roles')
$is_controller = roles_include(['controller', 'primary-controller'])
$is_base_os = roles_include('base-os')
$network_metadata = hiera_hash('network_metadata')
$detach_rabbitmq = hiera('detach-rabbitmq', {})
$detach_database = hiera('detach-database', {})
@ -54,7 +51,7 @@ $tags = {
deployment_id => hiera('deployment_id'),
openstack_region => 'RegionOne',
openstack_release => hiera('openstack_version'),
openstack_roles => join($roles, ','),
openstack_roles => join(hiera('roles'), ','),
environment_label => $environment_label,
}

View File

@ -17,14 +17,12 @@ notice('fuel-plugin-lma-collector: ceph_osd.pp')
$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){
if ! roles_include(['controller', 'primary-controller']) {
class { 'lma_collector::collectd::base':
processes => ['hekad', 'collectd'],
}

View File

@ -18,14 +18,13 @@ include lma_collector::params
$ceilometer = hiera_hash('ceilometer', {})
$lma_collector = hiera_hash('lma_collector')
$roles = node_roles(hiera('nodes'), hiera('uid'))
$is_controller = member($roles, 'controller') or member($roles, 'primary-controller')
$is_controller = roles_include(['controller', 'primary-controller'])
$is_rabbitmq = roles_include(['standalone-rabbitmq', 'primary-standalone-rabbitmq'])
$is_mysql_server = roles_include(['standalone-database', 'primary-standalone-database'])
if $is_controller or $is_rabbitmq or $is_mysql_server {
# On nodes where pacemaker is deployed, make sure the LMA service is
# configured with the "pacemaker" provider
# On nodes where pacemaker is deployed, make sure Log and Metric collector services
# are configured with the "pacemaker" provider
include lma_collector::params
Service<| title == $lma_collector::params::log_service_name |> {
provider => 'pacemaker'

View File

@ -17,8 +17,7 @@ notice('fuel-plugin-lma-collector: configure_afd_filters.pp')
include lma_collector::params
$lma = hiera_hash('lma_collector', {})
$roles = node_roles(hiera('nodes'), hiera('uid'))
$is_controller = member($roles, 'controller') or member($roles, 'primary-controller')
$is_controller = roles_include(['controller', 'primary-controller'])
$is_rabbitmq = roles_include(['standalone-rabbitmq', 'primary-standalone-rabbitmq'])
$is_mysql_server = roles_include(['standalone-database', 'primary-standalone-database'])

View File

@ -22,10 +22,9 @@ $influxdb_grafana = hiera('influxdb_grafana')
if $lma_collector_hash['influxdb_mode'] != 'disabled' {
$network_metadata = hiera('network_metadata')
$current_roles = hiera('roles')
$is_elasticsearch_node = member($current_roles, 'elasticsearch_kibana') or member($current_roles, 'primary-elasticsearch_kibana')
$is_influxdb_node = member($current_roles, 'influxdb_grafana') or member($current_roles, 'primary-influxdb_grafana')
$is_elasticsearch_node = roles_include(['elasticsearch_kibana', 'primary-elasticsearch_kibana'])
$is_influxdb_node = roles_include(['influxdb_grafana', 'primary-influxdb_grafana'])
if $is_elasticsearch_node {
$process_matches = [{name => 'elasticsearch', regex => 'java'}]