Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1542871 - We need to upgrade JQ to latest version (1.5)
Summary: We need to upgrade JQ to latest version (1.5)
Alias: None
Product: RDO
Classification: Community
Component: distribution
Version: trunk
Hardware: All
OS: All
Target Milestone: ---
: trunk
Assignee: Alfredo Moralejo
QA Contact: Shai Revivo
Depends On: 1328748
TreeView+ depends on / blocked
Reported: 2018-02-07 08:54 UTC by Carlos Camacho
Modified: 2018-03-01 11:12 UTC (History)
4 users (show)

Fixed In Version: jq-1.5-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-03-01 11:12:41 UTC

Attachments (Terms of Use)

Description Carlos Camacho 2018-02-07 08:54:30 UTC
Description of problem:

Running JQ queries using primitives like any or from json will fail because JQ 1.3 does not have those primitives, this package version is quite old and we should use a newer version.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Deploy TripleO Mitaka, Newtown, Ocata, Pike, Queens or master and execute:

openstack stack output show overcloud --all -f json |
                  jq '{Role: .EnabledServices | fromjson.output_value |
                    with_entries(select(any(.value[]; . == "haproxy"))) |
                    keys[0], Hostnames: .RoleNetHostnameMap | fromjson.output_value}' |
                  jq '.Hostnames[.Role].canonical'

Actual results:

error: fromjson is not defined
{Role: .EnabledServices | fromjson.output_value |
error: fromjson is not defined

                    keys[0], Hostnames: .RoleNetHostnameMap | fromjson.output_value}
error: any is not defined

                    with_entries(select(any(.value[]; . == "haproxy"))) |
3 compile errors
[Errno 32] Broken pipe

Expected results:


Comment 1 Alfredo Moralejo 2018-02-07 10:37:28 UTC
Updating jq to 1.5 in queens -

Comment 4 Alfredo Moralejo 2018-02-09 12:07:18 UTC
A new build jq-1.5-10.el7 has been rebuilt from fedora jq-1.5-10.fc28  which includes fix for CVE-2015-8863 and it's being promoted in

Note You need to log in before you can comment on or make changes to this bug.