From a7278433b317b06a9040e5cd32091db5f8114839 Mon Sep 17 00:00:00 2001 From: Guillaume Thouvenin Date: Tue, 16 Feb 2016 11:29:57 +0100 Subject: [PATCH] Modify the definition of Neutron cluster when Contrail is installed This change removes the Neutron agents AFD when Contrail plugin is used to avoid reporting a DOWN status for Neutron. It also removes the collect of the metrics of the Neutron agents. Change-Id: I02ecb67489d244aca85bc4b1e3d4a5cd79df1b5b Closes-Bug: #1546017 (cherry picked from commit 7d86ec48e67c034bca5a92bc2ed0b46fb3975a6d) --- deployment_scripts/puppet/manifests/controller.pp | 15 +++++++++------ .../puppet/manifests/hiera_override.pp | 1 + .../templates/gse_filters.yaml.erb | 2 ++ doc/user/source/metrics/openstack.rst | 2 ++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/deployment_scripts/puppet/manifests/controller.pp b/deployment_scripts/puppet/manifests/controller.pp index 7155c11d1..76c8938d3 100644 --- a/deployment_scripts/puppet/manifests/controller.pp +++ b/deployment_scripts/puppet/manifests/controller.pp @@ -24,6 +24,7 @@ $rabbit = hiera_hash('rabbit') $management_vip = hiera('management_vip') $storage_options = hiera_hash('storage', {}) $murano = hiera_hash('murano') +$contrail = hiera('contrail', false) if $ceilometer['enabled'] { $notification_topics = ['notifications', 'lma_notifications'] @@ -342,12 +343,14 @@ if $lma_collector['influxdb_mode'] != 'disabled' { downtime_factor => 2, } - lma_collector::collectd::dbi_services { 'neutron': - username => 'neutron', - dbname => 'neutron', - password => $neutron['database']['passwd'], - report_interval => 15, - downtime_factor => 4, + unless $contrail { + lma_collector::collectd::dbi_services { 'neutron': + username => 'neutron', + dbname => 'neutron', + password => $neutron['database']['passwd'], + report_interval => 15, + downtime_factor => 4, + } } class { 'lma_collector::collectd::haproxy': diff --git a/deployment_scripts/puppet/manifests/hiera_override.pp b/deployment_scripts/puppet/manifests/hiera_override.pp index 65086ac05..17d52010d 100644 --- a/deployment_scripts/puppet/manifests/hiera_override.pp +++ b/deployment_scripts/puppet/manifests/hiera_override.pp @@ -19,6 +19,7 @@ if ($plugin_data) { $tls_enabled = hiera('public_ssl', false) $ceilometer = hiera_hash('ceilometer', {}) $ceilometer_enabled = pick($ceilometer['enabled'], false) + $contrail_plugin = hiera('contrail', false) $elasticsearch_mode = $plugin_data['elasticsearch_mode'] $monitor_elasticsearch = $elasticsearch_mode ? { diff --git a/deployment_scripts/puppet/modules/fuel_lma_collector/templates/gse_filters.yaml.erb b/deployment_scripts/puppet/modules/fuel_lma_collector/templates/gse_filters.yaml.erb index 95bc6eb88..32dba36ce 100644 --- a/deployment_scripts/puppet/modules/fuel_lma_collector/templates/gse_filters.yaml.erb +++ b/deployment_scripts/puppet/modules/fuel_lma_collector/templates/gse_filters.yaml.erb @@ -522,10 +522,12 @@ lma_collector: members: - neutron-logs - neutron-api +<% if not @contrail_plugin then -%> - neutron-l3 - neutron-dhcp - neutron-metadata - neutron-openvswitch +<% end -%> - controller hints: - keystone diff --git a/doc/user/source/metrics/openstack.rst b/doc/user/source/metrics/openstack.rst index 3b48bf874..fe534aebb 100644 --- a/doc/user/source/metrics/openstack.rst +++ b/doc/user/source/metrics/openstack.rst @@ -149,6 +149,8 @@ These metrics are retrieved from the Neutron database. .. _network-agent-state-metrics: +.. note:: These metrics are not collected when the Contrail plugin is deployed. + * ``openstack_neutron_agents``, the total number of Neutron agents by service and state. The metric contains ``service`` (one of 'dhcp', 'l3', 'metadata' or 'openvswitch') and ``state`` (one of 'up', 'down' or 'disabled') fields.