prometheus elasticsearch exporter template error

Bug #1880242 reported by Justinas Balciunas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Mark Goddard
Ussuri
Fix Released
Medium
Mark Goddard
Victoria
Fix Released
Medium
Mark Goddard

Bug Description

Logs:

+ sudo -E kolla_set_configs
INFO:__main__:Loading config file at /var/lib/kolla/config_files/config.json
INFO:__main__:Validating config file
INFO:__main__:Kolla config strategy set to: COPY_ALWAYS
INFO:__main__:Copying service configuration files
INFO:__main__:Writing out command to execute
INFO:__main__:Setting permission for /var/log/kolla/prometheus
INFO:__main__:Setting permission for /var/log/kolla/prometheus/cadvisor.INFO
INFO:__main__:Setting permission for /var/log/kolla/prometheus/cadvisor.z141-ost-ctrl1.root.log.WARNING.20200522-235920.6
INFO:__main__:Setting permission for /var/log/kolla/prometheus/cadvisor.z141-ost-ctrl1.root.log.INFO.20200522-234931.6
INFO:__main__:Setting permission for /var/log/kolla/prometheus/cadvisor.z141-ost-ctrl1.root.log.INFO.20200522-235920.6
INFO:__main__:Setting permission for /var/log/kolla/prometheus/cadvisor.WARNING
INFO:__main__:Setting permission for /var/log/kolla/prometheus/cadvisor.z141-ost-ctrl1.root.log.WARNING.20200522-234931.6
++ cat /run_command
+ CMD='/opt/elasticsearch_exporter/elasticsearch_exporter -es.uri http://10.81.0.1:9200 -web.listen-address 10.81.0.1:9108'
+ ARGS=
+ sudo kolla_copy_cacerts
+ [[ ! -n '' ]]
+ . kolla_extend_start
++ [[ ! -d /var/log/kolla/prometheus ]]
+++ stat -c %a /var/log/kolla/prometheus
++ [[ 2755 != \7\5\5 ]]
++ chmod 755 /var/log/kolla/prometheus
+ echo 'Running command: '\''/opt/elasticsearch_exporter/elasticsearch_exporter -es.uri http://10.81.0.1:9200 -web.listen-address 10.81.0.1:9108'\'''
Running command: '/opt/elasticsearch_exporter/elasticsearch_exporter -es.uri http://10.81.0.1:9200 -web.listen-address 10.81.0.1:9108'
+ exec /opt/elasticsearch_exporter/elasticsearch_exporter -es.uri http://10.81.0.1:9200 -web.listen-address 10.81.0.1:9108
elasticsearch_exporter: error: unknown short flag '-e', try --help

Cause:

In ansible/roles/prometheus/templates/prometheus-elasticsearch-exporter.json.j2 the syntax is missing dashes in a couple of places:

Currently: "command": "/opt/elasticsearch_exporter/elasticsearch_exporter -es.uri http://{{ api_interface_address | put_address_in_context('url') }}:{{ elasticsearch_port }} -web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_elasticsearch_exporter_port }}",

Should be: "command": "/opt/elasticsearch_exporter/elasticsearch_exporter --es.uri http://{{ api_interface_address | put_address_in_context('url') }}:{{ elasticsearch_port }} --web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_elasticsearch_exporter_port }}",

Revision history for this message
Mark Goddard (mgoddard) wrote :

Thanks for the bug. What version of kolla-ansible are you running?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/735560

Changed in kolla-ansible:
assignee: nobody → Mark Goddard (mgoddard)
status: Triaged → In Progress
Revision history for this message
Justinas Balciunas (justinas-balciunas) wrote :

Name: kolla-ansible
Version: 10.0.0.0rc2.dev15

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/735560
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=96a1ce196e08e2bf7d82e3e6d24b66197c4736d5
Submitter: Zuul
Branch: master

commit 96a1ce196e08e2bf7d82e3e6d24b66197c4736d5
Author: Mark Goddard <email address hidden>
Date: Mon Jun 15 12:19:27 2020 +0100

    Fix prometheus-elasticsearch-exporter flags

    The flag -es.uri is no longer accepted - it should be --es.uri.
    Similarly with -web.listen-address. The following error is seen:

        elasticsearch_exporter: error: unknown short flag '-e', try --help

    This change switches to double dashed long options.

    Change-Id: I039f4cad970352146462450742056f5990a81b06
    Closes-Bug: #1880242

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/737012

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/ussuri)

Reviewed: https://review.opendev.org/737012
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=7d094635216dff24dcff3635a860ad70b50a7c61
Submitter: Zuul
Branch: stable/ussuri

commit 7d094635216dff24dcff3635a860ad70b50a7c61
Author: Mark Goddard <email address hidden>
Date: Mon Jun 15 12:19:27 2020 +0100

    Fix prometheus-elasticsearch-exporter flags

    The flag -es.uri is no longer accepted - it should be --es.uri.
    Similarly with -web.listen-address. The following error is seen:

        elasticsearch_exporter: error: unknown short flag '-e', try --help

    This change switches to double dashed long options.

    Change-Id: I039f4cad970352146462450742056f5990a81b06
    Closes-Bug: #1880242
    (cherry picked from commit 96a1ce196e08e2bf7d82e3e6d24b66197c4736d5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/799581

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla-ansible (stable/train)

Change abandoned by "Gaël THEROND <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/799581
Reason: Train is best effort and CICD is a mess.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.