Kibana, elasticsearch and monasca roles failing with invalid JSON body

Bug #1864177 reported by Mark Goddard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Mark Goddard
Ussuri
Fix Released
Medium
Mark Goddard

Bug Description

The kibana, elasticsearch and monasca roles all use the uri module to perform Elasticsearch configuration tasks via its API. The body of the request should be JSON formatted, but these tasks now fail because it is not. This was probably caused by the recent change to execute these tasks in the kolla_toolbox container, but may also be caused by an Ansible version bump (or something else).

The following error is seen:

TASK [monasca : Create default control plane organisation if it doesn't exist]

invalid character '\\'' looking for beginning of object key string

The 'JSON' body in this case was:

{'name': 'monasca_control_plane@default'}

Mark Goddard (mgoddard)
description: updated
Changed in kolla-ansible:
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/709090

Changed in kolla-ansible:
assignee: nobody → Mark Goddard (mgoddard)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/709090
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=5db9eab04223dd3e974e39490a84c506805b8644
Submitter: Zuul
Branch: master

commit 5db9eab04223dd3e974e39490a84c506805b8644
Author: Mark Goddard <email address hidden>
Date: Fri Feb 21 10:08:10 2020 +0000

    Fix invalid JSON body in Elasticsearch API requests

    The kibana, elasticsearch and monasca roles all use the uri module to
    perform Elasticsearch configuration tasks via its API. The body of the
    request should be JSON formatted, but these tasks now fail because it is
    not.

    The following error is seen:

    TASK [monasca : Create default control plane organisation if it doesn't
    exist]

    invalid character '\\'' looking for beginning of object key string

    The 'JSON' body in this case was:

    {'name': 'monasca_control_plane@default'}

    This was probably caused by the recent change to execute these tasks in
    the kolla_toolbox container, but may also be caused by an Ansible
    version bump (or something else).

    This change fixes the issue by ensuring that the body is JSON-encoded in
    all cases.

    Change-Id: I7acc097381dd9a4af4e014525c1c88213abbde93
    Closes-Bug: #1864177

Changed in kolla-ansible:
status: In Progress → Fix Released
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.