JSON Query cannot parse invalid characters

Bug #1853321 reported by Luke Short
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Luke Short

Bug Description

Using a customized post-deploy.yaml can lead to an error with config-download deployment/update/upgrade. The json_query detects "-" as a negative number and also issues parsing other characters as well. This problem affects the Queens release and newer.

TASK [Lookup deployment UUID] **************************************************
Thursday 31 October 2019 16:13:58 +0300 (0:00:00.536) 0:30:41.357 ******
fatal: [cauqctr02]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n ^"}
fatal: [cauqctr03]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n ^"}
fatal: [cauqctr01]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n ^"}

Revision history for this message
Luke Short (ekultails) wrote :
Changed in tripleo:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/693910
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=e028953d0b1507f0c048bddf0d5cedab69f4bfbe
Submitter: Zuul
Branch: master

commit e028953d0b1507f0c048bddf0d5cedab69f4bfbe
Author: Luke Short <email address hidden>
Date: Tue Nov 12 14:17:52 2019 -0500

    Escape invalid JSON characters during deployment.

    By first quoting the JSON query, it is possible to easily pass
    it to the json_query plugin. This allows elements with special
    characters, such as a hyphen -, to be resolvable.

    Change-Id: I56f3e5f96dc25f16aed585ca6678de53721071b7
    Closes-Bug: #1853321
    Signed-off-by: Luke Short <email address hidden>

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/695746

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/695749

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/695750

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

Reviewed: https://review.opendev.org/695746
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=7cebd8b3e1100890ff6d6ec82922cac608055e7d
Submitter: Zuul
Branch: stable/train

commit 7cebd8b3e1100890ff6d6ec82922cac608055e7d
Author: Luke Short <email address hidden>
Date: Tue Nov 12 14:17:52 2019 -0500

    Escape invalid JSON characters during deployment.

    By first quoting the JSON query, it is possible to easily pass
    it to the json_query plugin. This allows elements with special
    characters, such as a hyphen -, to be resolvable.

    Change-Id: I56f3e5f96dc25f16aed585ca6678de53721071b7
    Closes-Bug: #1853321
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit e028953d0b1507f0c048bddf0d5cedab69f4bfbe)

tags: added: in-stable-train
tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/stein)

Reviewed: https://review.opendev.org/695747
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=c2a83c1cd5e8cc9cb04432e9bc8f37793c02f0c7
Submitter: Zuul
Branch: stable/stein

commit c2a83c1cd5e8cc9cb04432e9bc8f37793c02f0c7
Author: Luke Short <email address hidden>
Date: Tue Nov 12 14:17:52 2019 -0500

    Escape invalid JSON characters during deployment.

    By first quoting the JSON query, it is possible to easily pass
    it to the json_query plugin. This allows elements with special
    characters, such as a hyphen -, to be resolvable.

    Conflicts:
        tripleo_common/templates/deployments.yaml

    Change-Id: I56f3e5f96dc25f16aed585ca6678de53721071b7
    Closes-Bug: #1853321
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit 7cebd8b3e1100890ff6d6ec82922cac608055e7d)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/rocky)

Reviewed: https://review.opendev.org/695749
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=f81e0bf42663b448362495c403e074af96ff3e00
Submitter: Zuul
Branch: stable/rocky

commit f81e0bf42663b448362495c403e074af96ff3e00
Author: Luke Short <email address hidden>
Date: Tue Nov 12 14:17:52 2019 -0500

    Escape invalid JSON characters during deployment.

    By first quoting the JSON query, it is possible to easily pass
    it to the json_query plugin. This allows elements with special
    characters, such as a hyphen -, to be resolvable.

    Conflicts:
        tripleo_common/templates/deployments.yaml

    Change-Id: I56f3e5f96dc25f16aed585ca6678de53721071b7
    Closes-Bug: #1853321
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit c2a83c1cd5e8cc9cb04432e9bc8f37793c02f0c7)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/queens)

Reviewed: https://review.opendev.org/695750
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=5610fae46513f1875cd1acfb947e2b284ff10d3d
Submitter: Zuul
Branch: stable/queens

commit 5610fae46513f1875cd1acfb947e2b284ff10d3d
Author: Luke Short <email address hidden>
Date: Tue Nov 12 14:17:52 2019 -0500

    Escape invalid JSON characters during deployment.

    By first quoting the JSON query, it is possible to easily pass
    it to the json_query plugin. This allows elements with special
    characters, such as a hyphen -, to be resolvable.

    Conflicts:
        tripleo_common/templates/deployments.yaml

    Change-Id: I56f3e5f96dc25f16aed585ca6678de53721071b7
    Closes-Bug: #1853321
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit f81e0bf42663b448362495c403e074af96ff3e00)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 12.0.0

This issue was fixed in the openstack/tripleo-common 12.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 10.8.2

This issue was fixed in the openstack/tripleo-common 10.8.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 11.3.2

This issue was fixed in the openstack/tripleo-common 11.3.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common rocky-eol

This issue was fixed in the openstack/tripleo-common rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common queens-eol

This issue was fixed in the openstack/tripleo-common queens-eol release.

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.