TASK [ceph : set jq osd percentage filter] fails with: "error: try is not defined"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Undecided
|
Francesco Pantano |
Bug Description
After applying the patch submitted as a fix for https:/
The problem is that during this stage we have train code in the undercloud, but the overcloud (controllers) are still in queens and ceph is not updated yet (it's still ceph3): we have jq <1.5 and the "try-catch" mechanism is not available.
For this reason the validation failed with the following:
TASK [ceph : set jq osd percentage filter] *******
Tuesday 28 July 2020 10:22:16 -0400 (0:00:00.270) 0:01:11.723 **********
ok: [undercloud -> 192.168.24.15] => {"ansible_facts": {"jq_osd_
* 100"}, "changed": false}
TASK [ceph : Get OSD stat percentage] *******
Tuesday 28 July 2020 10:22:17 -0400 (0:00:00.272) 0:01:11.996 **********
fatal: [undercloud -> 192.168.24.15]: FAILED! => {"changed": true, "cmd": "\"docker\" exec \"ceph-
sdmap.num_in_osds + try .num_in_osds) / (try .osdmap.num_osds + try .num_osds)) * 100'", "delta": "0:00:00.404082", "end": "2020-07-27 15:43:28.260232", "msg": "non-zero return code", "rc": 1, "start": "2020-07-27 15:43:27.856150", "stderr": "error: try is not defined\n( (try .osdmap.num_in_osds + try .num_in_osds) / (try .osdmap.num_osds + try .num_osds)) * 100\n ^^^\nerror: try is not defined\n( (try .osdmap.num_in_osds + try .num_in_osds) / (try .osdmap.num_osds + try .num_osds)) * 100\n
^^^\nerror: try is not defined\n( (try .osdmap.num_in_osds + try .num_in_osds) / (try .osdmap.num_osds + try .num_osds)) * 100\n
" ^^^", "4 compile errors"], "stdout": "", "stdout_lines": []}
NO MORE HOSTS LEFT *******
The jq package version found in the controller is:
[root@controller-0 ~]# rpm -qa | grep jq
python-
jq-1.3-
In master it's ok because we're in V and jq >=1.5 so that change will work, but in in queens => train upgrade we should fix this code.