Bug#946630: openstack-cluster-installer-agent: syntax error

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bug#946630: openstack-cluster-installer-agent: syntax error

Wouter Verhelst
Source: openstack-cluster-installer
Version: 21
Severity: grave
Justification: makes the package unusable

The agent contains the following on line 29:

        ETH_SPEED=$(( $(lshw -class network 2>/dev/null -json | jq '.[] | select(.serial|test("'${MAC_ADDR}'")) | .capacity') / 1000000))

The shell redirect ("2>/dev/null") means the shell stops passing
command-line arguments from there on, which means the "-json" is never
seen by lshw, which in turn means the "jq" command doesn't get any JSON

This results in an error message of the type

bash: / 1000000 : syntax error: operand expected (error token is "/ 1000000")

upon which the agent stops working, and nothing is added to oci's

(this may be fixed in later versions, didn't check, but this is what's in