ceph/ceph-ansible

stable-3.2 error in templating during wait for all osd to be up

Closed this issue · 0 comments

Bug Report

What happened:
Error in templating

TASK [ceph-osd : wait for all osd to be up] ***************************************************************************
Monday 28 March 2022  13:27:37 +0000 (0:00:00.862)       0:02:31.828 **********
fatal: [localhost]: FAILED! => {"msg": "The conditional check '(wait_for_all_osds_up.stdout | default('{}') | from_json)[\"osdmap\"][\"osdmap\"][\"num_osds\"] == (wait_for_all_osds_up.stdout | default('{}') from_json)[\"osdmap\"][\"osdmap\"][\"num_up_osds\"]' failed. The error was: template error while templating string: expected token ')', got 'from_json'. String: {% if (wait_for_all_osds_up.stdout | default('{}') | from_json)[\"osdmap\"][\"osdmap\"][\"num_osds\"] == (wait_for_all_osds_up.stdout | default('{}') from_json)[\"osdmap\"][\"osdmap\"][\"num_up_osds\"] %} True {% else %} False {% endif %}"}

What you expected to happen:
No error

How to reproduce it (minimal and precise):
Run playbook with stable-3.2

The error seems to come from here: https://github.com/ceph/ceph-ansible/blob/stable-3.2/roles/ceph-osd/tasks/main.yml#L119
There is a missing | in the line before from_json