From 283b0dec639c032945f5d1d87a66f0c7541c0562 Mon Sep 17 00:00:00 2001 From: Scott Shambarger Date: Thu, 13 May 2021 14:08:32 -0700 Subject: [PATCH] fluentd: Fix check for external elasticsearch When enable_elasticsearch is False, and kolla_internal_fqdn is set and elasticsearch_address is the default, fluentd is still enabling output to elasticsearch. elasticsearch_address defaults to kolla_internal_fqdn, but the check to enable logging to an "external" elasticsearch host compares with kolla_internal_vip_address (fqdn != vip address). This patch fixes the comparison to use the kolla_internal_fqdn. Closes-Bug: #1927880 Change-Id: If23a6b1273c2639d1296becc9d222546d52f63ac --- ansible/roles/common/tasks/config.yml | 2 +- releasenotes/notes/bug-1927880-cc407f18f415bbd2.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-1927880-cc407f18f415bbd2.yaml diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index edcd87e6ca..d188d2b026 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -105,7 +105,7 @@ vars: log_direct_to_elasticsearch: >- {{ ( enable_elasticsearch | bool or - ( elasticsearch_address != kolla_internal_vip_address )) and + ( elasticsearch_address != kolla_internal_fqdn )) and ( not enable_monasca | bool or not monasca_ingest_control_plane_logs | bool ) }} fluentd_version: "{{ fluentd_labels.images.0.ContainerConfig.Labels.fluentd_version | default('0.12') }}" # Inputs diff --git a/releasenotes/notes/bug-1927880-cc407f18f415bbd2.yaml b/releasenotes/notes/bug-1927880-cc407f18f415bbd2.yaml new file mode 100644 index 0000000000..e94e1a5f59 --- /dev/null +++ b/releasenotes/notes/bug-1927880-cc407f18f415bbd2.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes elasticsearch fluentd output being enabled when + elasticsearch is not enabled. + `LP#1927880 `__