Task Enable grafana datasources fail after reconfigure

Bug #1881890 reported by YvesG
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Radosław Piliszek
Stein
Fix Released
Medium
Mark Goddard
Train
Fix Released
Medium
Mark Goddard
Ussuri
Fix Released
Medium
Mark Goddard
Victoria
Fix Released
Medium
Radosław Piliszek

Bug Description

Hi,

After a first succesfull deployment of grafana on Kolla-ansible 9.1.0, the task "Enable grafana datasources" failed on next reconfigure with this message:

TASK [grafana : Enable grafana datasources] **********************************************************************************************************************************************************************************************************************************************
skipping: [d3-ctl1] => (item={'key': 'influxdb', 'value': {'enabled': False, 'data': {'isDefault': True, 'database': 'telegraf', 'name': 'telegraf', 'type': 'influxdb', 'url': 'http://10.65.32.100:8086', 'access': 'proxy', 'basicAuth': False}}})
failed: [d3-ctl1] (item={'key': 'elasticsearch', 'value': {'enabled': True, 'data': {'name': 'elasticsearch', 'type': 'elasticsearch', 'access': 'proxy', 'url': 'http://10.65.32.100:9200', 'database': 'flog-*', 'jsonData': {'esVersion': 5, 'timeField': '@timestamp'}}}}) => {"ansible_loop_var": "item", "cache_control": "no-cache", "changed": false, "connection": "close", "content_length": "59", "content_type": "application/json", "date": "Wed, 03 Jun 2020 10:11:50 GMT", "elapsed": 0, "expires": "-1", "failed_when_result": true, "item": {"key": "elasticsearch", "value": {"data": {"access": "proxy", "database": "flog-*", "jsonData": {"esVersion": 5, "timeField": "@timestamp"}, "name": "elasticsearch", "type": "elasticsearch", "url": "http://10.65.32.100:9200"}, "enabled": true}}, "json": {"message": "Data source with the same name already exists"}, "msg": "HTTP Error 409: Conflict", "pragma": "no-cache", "redirected": false, "status": 409, "url": "http://10.65.32.100:3000/api/datasources", "x_frame_options": "deny"}

I looked at the post_config.yml file. A test is already written but the message is now different and the test fail:

failed_when: response.status not in [200, 409] or
               response.status == 409 and ("Data source with same name already exists" not in response.json.message|default(""))

It should be (add "the"):

failed_when: response.status not in [200, 409] or
               response.status == 409 and ("Data source with the same name already exists" not in response.json.message|default(""))

Thanks,
Yves

Revision history for this message
Rowan Potgieter (rowan-potgieter) wrote :

I can confirm the same issue occurs on stable/stein.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Oh how I <3 grammar fixes that break external integrations, much appreciated.

Changed in kolla-ansible:
status: New → Triaged
importance: Undecided → Medium
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/735540

Changed in kolla-ansible:
assignee: nobody → Radosław Piliszek (yoctozepto)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/735540
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=7bd8805004a599de25f615cfe177e4963d3e5d2e
Submitter: Zuul
Branch: master

commit 7bd8805004a599de25f615cfe177e4963d3e5d2e
Author: Radosław Piliszek <email address hidden>
Date: Mon Jun 15 11:34:30 2020 +0200

    Fix Grafana datasource update

    Grafana changed the error message wording.
    Match on the shortest sane string to play it safe.

    Change-Id: Ic175ebdb1da6ef66047309ff07bcbba98fc67008
    Closes-Bug: #1881890

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/735595

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/735597

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/735598

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

Reviewed: https://review.opendev.org/735597
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=cf70176c083b14e972475e1f91597e2dfeb049d6
Submitter: Zuul
Branch: stable/train

commit cf70176c083b14e972475e1f91597e2dfeb049d6
Author: Radosław Piliszek <email address hidden>
Date: Mon Jun 15 11:34:30 2020 +0200

    Fix Grafana datasource update

    Grafana changed the error message wording.
    Match on the shortest sane string to play it safe.

    Change-Id: Ic175ebdb1da6ef66047309ff07bcbba98fc67008
    Closes-Bug: #1881890
    (cherry picked from commit 7bd8805004a599de25f615cfe177e4963d3e5d2e)

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

Reviewed: https://review.opendev.org/735598
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=9a0cf74360935eca50341e6e983f1ac4fc9a23f0
Submitter: Zuul
Branch: stable/stein

commit 9a0cf74360935eca50341e6e983f1ac4fc9a23f0
Author: Radosław Piliszek <email address hidden>
Date: Mon Jun 15 11:34:30 2020 +0200

    Fix Grafana datasource update

    Grafana changed the error message wording.
    Match on the shortest sane string to play it safe.

    Change-Id: Ic175ebdb1da6ef66047309ff07bcbba98fc67008
    Closes-Bug: #1881890
    (cherry picked from commit 7bd8805004a599de25f615cfe177e4963d3e5d2e)

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

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

commit b8c142f609b595f5adb93fc8a398f8cf34ef8929
Author: Radosław Piliszek <email address hidden>
Date: Mon Jun 15 11:34:30 2020 +0200

    Fix Grafana datasource update

    Grafana changed the error message wording.
    Match on the shortest sane string to play it safe.

    Change-Id: Ic175ebdb1da6ef66047309ff07bcbba98fc67008
    Closes-Bug: #1881890
    (cherry picked from commit 7bd8805004a599de25f615cfe177e4963d3e5d2e)

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.