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
This commit is contained in:
Scott Shambarger 2021-05-13 14:08:32 -07:00
parent 3b9dafdf29
commit 283b0dec63
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes elasticsearch fluentd output being enabled when
elasticsearch is not enabled.
`LP#1927880 <https://launchpad.net/bugs/1927880>`__