From b20bce1bf02889b05d07eb41ceef02affbc458a3 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Thu, 24 Aug 2017 21:29:44 -0700 Subject: [PATCH] logging: use service_config_settings for fluentd The initial fluentd client implementation predates the introduction of service_config_settings, and necessitated some invasive changes to what is now common/serivces.yaml. This commit modifies existing services to use the service_config_settings based configuration mechanism supported by more recent versions of the fluentd support in puppet-tripleo. Partial-bug: #1715187 Depends-On: I3149902401d68d6fd236073a73a20f982d4b952a Depends-On: I2b057190ec0e4e75ee4ee47ebe0164c2644e5ab7 Depends-On: Ie7df4b8b94cb0ae38096ab95800f211ef1cd8455 Change-Id: I28028ffa00df2da8e0478a551d3de89c3ee46e1f --- .../scenario001-multinode-containers.yaml | 1 + puppet/services/ceilometer-agent-central.yaml | 12 ++++++++---- puppet/services/ceilometer-agent-ipmi.yaml | 9 ++++++--- .../services/ceilometer-agent-notification.yaml | 12 +++++++----- puppet/services/cinder-api.yaml | 8 +++++--- puppet/services/cinder-scheduler.yaml | 9 ++++++--- puppet/services/cinder-volume.yaml | 9 ++++++--- puppet/services/database/mongodb.yaml | 17 ++++++++++------- puppet/services/ec2-api.yaml | 8 +++++--- puppet/services/glance-api.yaml | 8 +++++--- puppet/services/gnocchi-api.yaml | 8 +++++--- puppet/services/heat-api-cfn.yaml | 8 +++++--- puppet/services/heat-api.yaml | 8 +++++--- puppet/services/heat-engine.yaml | 8 +++++--- puppet/services/keystone.yaml | 8 +++++--- puppet/services/neutron-api.yaml | 8 +++++--- puppet/services/neutron-dhcp.yaml | 9 ++++++--- puppet/services/neutron-l2gw-agent.yaml | 9 ++++++--- puppet/services/neutron-l3-compute-dvr.yaml | 9 ++++++--- puppet/services/neutron-l3.yaml | 9 ++++++--- puppet/services/neutron-metadata.yaml | 9 ++++++--- puppet/services/neutron-ovs-agent.yaml | 9 ++++++--- puppet/services/nova-api.yaml | 8 +++++--- puppet/services/nova-compute.yaml | 8 +++++--- puppet/services/nova-conductor.yaml | 15 +++++++++------ puppet/services/nova-consoleauth.yaml | 9 ++++++--- puppet/services/nova-placement.yaml | 8 +++++--- puppet/services/nova-scheduler.yaml | 9 ++++++--- puppet/services/nova-vnc-proxy.yaml | 9 ++++++--- puppet/services/octavia-api.yaml | 8 +++++--- puppet/services/octavia-health-manager.yaml | 9 ++++++--- puppet/services/octavia-housekeeping.yaml | 9 ++++++--- puppet/services/octavia-worker.yaml | 9 ++++++--- puppet/services/pacemaker.yaml | 10 ++++++---- puppet/services/pacemaker/cinder-volume.yaml | 2 -- puppet/services/pacemaker_remote.yaml | 9 ++++++--- puppet/services/sahara-api.yaml | 9 ++++++--- puppet/services/sahara-engine.yaml | 9 ++++++--- 38 files changed, 214 insertions(+), 121 deletions(-) diff --git a/ci/environments/scenario001-multinode-containers.yaml b/ci/environments/scenario001-multinode-containers.yaml index 2d7a5445b5..11388248c3 100644 --- a/ci/environments/scenario001-multinode-containers.yaml +++ b/ci/environments/scenario001-multinode-containers.yaml @@ -20,6 +20,7 @@ resource_registry: OS::TripleO::Tasks::ControllerPreConfig: OS::Heat::None OS::TripleO::Tasks::ControllerPostConfig: OS::Heat::None OS::TripleO::Tasks::ControllerPostPuppetRestart: ../../extraconfig/tasks/post_puppet_pacemaker_restart.yaml + #Needs to run scenario001 OS::TripleO::Services::Fluentd: ../../docker/services/fluentd.yaml OS::TripleO::Services::SensuClient: ../../docker/services/sensu-client.yaml # Some infra instances don't pass the ping test but are otherwise working. diff --git a/puppet/services/ceilometer-agent-central.yaml b/puppet/services/ceilometer-agent-central.yaml index c033a480cb..7612bee9a0 100644 --- a/puppet/services/ceilometer-agent-central.yaml +++ b/puppet/services/ceilometer-agent-central.yaml @@ -60,16 +60,20 @@ outputs: value: service_name: ceilometer_agent_central monitoring_subscription: {get_param: MonitoringSubscriptionCeilometerCentral} - logging_source: {get_param: CeilometerAgentCentralLoggingSource} - logging_groups: - - ceilometer config_settings: map_merge: - get_attr: [CeilometerServiceBase, role_data, config_settings] - ceilometer_redis_password: {get_param: RedisPassword} central_namespace: true service_config_settings: - get_attr: [CeilometerServiceBase, role_data, service_config_settings] + map_merge: + - get_attr: [CeilometerServiceBase, role_data, service_config_settings] + - fluentd: + tripleo_fluentd_groups_ceilometer_agent_central: + - ceilometer + tripleo_fluentd_sources_ceilometer_agent_central: + - {get_param: CeilometerAgentCentralLoggingSource} + step_config: | include ::tripleo::profile::base::ceilometer::agent::polling upgrade_tasks: diff --git a/puppet/services/ceilometer-agent-ipmi.yaml b/puppet/services/ceilometer-agent-ipmi.yaml index 236a3392b0..b4f0ad41fb 100644 --- a/puppet/services/ceilometer-agent-ipmi.yaml +++ b/puppet/services/ceilometer-agent-ipmi.yaml @@ -60,14 +60,17 @@ outputs: value: service_name: ceilometer_agent_ipmi monitoring_subscription: {get_param: MonitoringSubscriptionCeilometerIpmi} - logging_source: {get_param: CeilometerAgentIpmiLoggingSource} - logging_groups: - - ceilometer config_settings: map_merge: - get_attr: [CeilometerServiceBase, role_data, config_settings] - ceilometer_redis_password: {get_param: RedisPassword} ipmi_namespace: true + service_config_settings: + fluentd: + tripleo_fluentd_groups_ceilometer_agent_ipmi: + - ceilometer + tripleo_fluentd_sources_ceilometer_agent_ipmi: + - {get_param: CeilometerAgentIpmiLoggingSource} step_config: | include ::tripleo::profile::base::ceilometer::agent::polling upgrade_tasks: diff --git a/puppet/services/ceilometer-agent-notification.yaml b/puppet/services/ceilometer-agent-notification.yaml index 60e6fc4a82..d86a42b3d1 100644 --- a/puppet/services/ceilometer-agent-notification.yaml +++ b/puppet/services/ceilometer-agent-notification.yaml @@ -39,7 +39,6 @@ parameters: tag: openstack.ceilometer.agent.notification path: /var/log/ceilometer/agent-notification.log - resources: CeilometerServiceBase: type: ./ceilometer-base.yaml @@ -57,13 +56,16 @@ outputs: value: service_name: ceilometer_agent_notification monitoring_subscription: {get_param: MonitoringSubscriptionCeilometerNotification} - logging_source: {get_param: CeilometerAgentNotificationLoggingSource} - logging_groups: - - ceilometer config_settings: get_attr: [CeilometerServiceBase, role_data, config_settings] service_config_settings: - get_attr: [CeilometerServiceBase, role_data, service_config_settings] + map_merge: + - get_attr: [CeilometerServiceBase, role_data, service_config_settings] + - fluentd: + tripleo_fluentd_groups_ceilometer_agent_notification: + - ceilometer + tripleo_fluentd_sources_ceilometer_agent_notification: + - {get_param: CeilometerAgentNotificationLoggingSource} step_config: | include ::tripleo::profile::base::ceilometer::agent::notification upgrade_tasks: diff --git a/puppet/services/cinder-api.yaml b/puppet/services/cinder-api.yaml index 1c8d4e6515..5ffcfa9f30 100644 --- a/puppet/services/cinder-api.yaml +++ b/puppet/services/cinder-api.yaml @@ -103,9 +103,6 @@ outputs: value: service_name: cinder_api monitoring_subscription: {get_param: MonitoringSubscriptionCinderApi} - logging_source: {get_param: CinderApiLoggingSource} - logging_groups: - - cinder config_settings: map_merge: - get_attr: [CinderBase, role_data, config_settings] @@ -160,6 +157,11 @@ outputs: step_config: | include ::tripleo::profile::base::cinder::api service_config_settings: + fluentd: + tripleo_fluentd_groups_cinder_api: + - cinder + tripleo_fluentd_sources_cinder_api: + - {get_param: CinderApiLoggingSource} keystone: cinder::keystone::auth::tenant: 'service' cinder::keystone::auth::public_url: {get_param: [EndpointMap, CinderPublic, uri]} diff --git a/puppet/services/cinder-scheduler.yaml b/puppet/services/cinder-scheduler.yaml index 2ed04b5a10..1654059ae8 100644 --- a/puppet/services/cinder-scheduler.yaml +++ b/puppet/services/cinder-scheduler.yaml @@ -57,13 +57,16 @@ outputs: value: service_name: cinder_scheduler monitoring_subscription: {get_param: MonitoringSubscriptionCinderScheduler} - logging_source: {get_param: CinderSchedulerLoggingSource} - logging_groups: - - cinder config_settings: map_merge: - get_attr: [CinderBase, role_data, config_settings] - cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler + service_config_settings: + fluentd: + tripleo_fluentd_groups_cinder_scheduler: + - cinder + tripleo_fluentd_sources_cinder_scheduler: + - {get_param: CinderSchedulerLoggingSource} step_config: | include ::tripleo::profile::base::cinder::scheduler upgrade_tasks: diff --git a/puppet/services/cinder-volume.yaml b/puppet/services/cinder-volume.yaml index b4fa38f0be..c4e7d78e82 100644 --- a/puppet/services/cinder-volume.yaml +++ b/puppet/services/cinder-volume.yaml @@ -121,9 +121,6 @@ outputs: value: service_name: cinder_volume monitoring_subscription: {get_param: MonitoringSubscriptionCinderVolume} - logging_source: {get_param: CinderVolumeLoggingSource} - logging_groups: - - cinder config_settings: map_merge: - get_attr: [CinderBase, role_data, config_settings] @@ -149,6 +146,12 @@ outputs: # internal_api_uri -> [IP] # internal_api_subnet - > IP/CIDR tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: {get_param: [ServiceNetMap, CinderIscsiNetwork]} + service_config_settings: + fluentd: + tripleo_fluentd_groups_cinder_volume: + - cinder + tripleo_fluentd_sources_cinder_volume: + - {get_param: CinderVolumeLoggingSource} step_config: | include ::tripleo::profile::base::cinder::volume upgrade_tasks: diff --git a/puppet/services/database/mongodb.yaml b/puppet/services/database/mongodb.yaml index 4677a9f4ce..fef239b9cc 100644 --- a/puppet/services/database/mongodb.yaml +++ b/puppet/services/database/mongodb.yaml @@ -31,10 +31,6 @@ parameters: description: Mapping of service endpoint -> protocol. Typically set via parameter_defaults in the resource registry. type: json - MongodbMemoryLimit: - default: '20G' - description: Limit the amount of memory mongodb uses with systemd. - type: string MongoDbLoggingSource: type: json description: Fluentd logging configuration for mongodb. @@ -44,6 +40,10 @@ parameters: format: >- /(?