ceph/ceph-ansible

Unable to deploy dashboard - template error while templating string: No filter named ''ansible.utils.ipwrap"

jeevadotnet opened this issue · 5 comments

Bug Report

What happened:
Manually removed the dashboard containers & images from the [grafana-server] host, since it changed between stable.5 and stable.6 and the purge-dashboard.yml component doesn't work even after updating the bits of here.

Host only reflects the current containers running:


ubuntu@B-03-11-cephctl:~$ sudo docker ps
CONTAINER ID   IMAGE                                                          COMMAND                  CREATED       STATUS       PORTS     NAMES
69c22ed0f6fd   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 6 days              ceph-rgw-B-03-11-cephctl-rgw0
d3dc10ec4da9   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 7 days              ceph-mds-B-03-11-cephctl
1a06985ecbbb   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 7 days              ceph-mgr-B-03-11-cephctl
b4f08b679bef   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/opt/ceph-container…"   7 days ago    Up 7 days              ceph-mon-B-03-11-cephctl
dfc0d582ce92   quay.io/ceph/daemon:v6.0.8-stable-6.0-pacific-centos-stream8   "/usr/bin/ceph-crash"    12 days ago   Up 12 days             ceph-crash-B-03-11-cephctl

Made sure my inventory, site-container.yml and all.yml reflects the new changes brought in by stable.6

Execute the runbook with ansible-playbook -i /opt/ceph-ansible/inventory -e 'ansible_python_interpreter=/usr/bin/python3' site-container.yml --limit=monitoring

Runbook fails with:

TASK [ceph-facts : set_fact _monitor_addresses to monitor_interface - ipv4] *****************************************************************************************
Tuesday 02 August 2022  09:11:14 +0200 (0:00:00.077)       0:02:18.001 ********
fatal: [B-03-11-cephctl.maas]: FAILED! =>
  msg: 'template error while templating string: No filter named ''ansible.utils.ipwrap''.. String: {{ _monitor_addresses | default([]) + [{ ''name'': item, ''addr'': hostvars[item][''ansible_facts''][(hostvars[item][''monitor_interface'']|replace(''-'', ''_''))][ip_version][''address''] | ansible.utils.ipwrap }]  }}'

NO MORE HOSTS LEFT **************************************************************************************************************************************************

PLAY RECAP **********************************************************************************************************************************************************
B-03-11-cephctl.maas       : ok=21   changed=1    unreachable=0    failed=1    skipped=37   rescued=0    ignored=0

What you expected to happen:
That the runbook runs successfully and the alertmanager, grafana-server, prometheus and node-exporter runs on the monitoring host.

How to reproduce it (minimal and precise):
git reset --hard origin/stable-6.0
Run site-container.yml, limited to the the monitoring host

Share your group_vars files, inventory and full ceph-ansibe log

Environment:

  • OS (e.g. from /etc/os-release): Ubuntu 20.04.4 LTS
  • Kernel (e.g. uname -a): Linux 5.4.0-122-generic
  • Docker version if applicable (e.g. docker version): 20.10.12
  • Ansible version (e.g. ansible-playbook --version): 2.9.27
  • ceph-ansible version (e.g. git head or tag or stable branch): stable-6.0
  • Ceph version (e.g. ceph -v): 16.2.10

@guits maybe any ideas please?

guits commented

hi @jeevadotnet ,

this is probably related to #7262

guits commented

can you try the following

$ ansible-galaxy collection install ansible.utils
guits commented

fixed by #7262

Thanks master @guits it worked 💯