Charm fails to install on Focal due to deprecated functionality is Ansible v2.9

Bug #1862711 reported by Jose Guedez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Elasticsearch Charm
Fix Released
Critical
Wouter van Bommel

Bug Description

The charm fails to install on focal. The charm relies on Ansible for the heavy lifting, and uses deprecated filters (https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#jinja-tests-used-as-filters). These filters need to be migrated to use the newer "test" syntax (https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#task-results).

"result | success" becomes "result is successful"

At least one instance of this in https://git.launchpad.net/charm-elasticsearch/tree/tasks/setup-ufw.yml#n52

Ansible log with error details:
2020-02-11 01:58:51 DEBUG install fatal: [localhost]: FAILED! => {"msg": "The conditional check 'firewall_enabled and cluster_health|success and cluster_health.json.number_of_nodes > 1' failed. The error was: template error while templating string: no filter named 'success'. String: {% if firewall_enabled and cluster_health|success and cluster_health.json.number_of_nodes > 1 %} True {% else %} False {% endif %}\n\nThe error appears to be in '/var/lib/juju/agents/unit-elasticsearch-0/charm/tasks/setup-ufw.yml': line 50, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Deny all incoming requests on 9300 once unit is part of cluster\n ^ here\n"}

Tags: focal
Revision history for this message
Tom Haddon (mthaddon) wrote :

Also, charm-helpers will need updating to 0.20.9 or greater per https://github.com/juju/charm-helpers/pull/423

Changed in charm-elasticsearch:
assignee: nobody → Wouter van Bommel (woutervb)
status: New → In Progress
Jeremy Lounder (jldev)
Changed in charm-elasticsearch:
milestone: none → 20.05
Changed in charm-elasticsearch:
status: In Progress → Fix Committed
Changed in charm-elasticsearch:
status: Fix Committed → Fix Released
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.