Description of problem: According to ansible documentation [1], JSON format should be used to pass non-string values such as Booleans, integers, floats, lists, etc as extra vars. One of our customers tried to use CephAnsibleExtraConfig definition [2] to enable autoscaling for CephFS pools, but failed because ceph_pools definition was treated as ansible.utils.unsafe_proxy.AnsibleUnsafeText. It looks like this is caused by the way ceph_ansible_extra_vars is generated by TripleO Heat Templates. Related discussion: [rhos-tech][ceph-ansible] Need advice about customizing cephfs_pools using THT parameters [1] https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#defining-variables-at-runtime [2] CephAnsibleExtraConfig: dashboard_protocol: http cephfs_data_pool: name: "cephfs_data" pg_autoscale_mode: true target_size_ratio: 0.0 rule_name: "replicated_rule" size: 2 min_size: 1 cephfs_metadata_pool: name: "cephfs_metadata" pg_autoscale_mode: true target_size_ratio: 0.0 rule_name: "replicated_rule" size: 2 min_size: 1 cephfs_pools: - cephfs_data_pool - cephfs_metadata_pool Version-Release number of selected component (if applicable): RHOSP 16.2 How reproducible: Define CephAnsibleExtraConfig as in description and run deployment command Actual results: Deployment command will fail with the following error: 2023-06-30 15:47:36,580 p=852187 u=root n=ansible | TASK [ceph-mds : create filesystem pools] ************************************** 2023-06-30 15:47:36,580 p=852187 u=root n=ansible | Friday 30 June 2023 15:47:36 +0800 (0:00:00.056) 0:08:10.266 *********** 2023-06-30 15:47:36,604 p=852187 u=root n=ansible | fatal: [HOSTNAME -> {{ groups[mon_group_name][0] }}]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'name'\n\nThe error appears to be in '/usr/share/ceph-ansible/roles/ceph-mds/tasks/create_mds_filesystems.yml': line 25, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: create filesystem pools\n ^ here\n"} Expected results: ceph_pools variable is parsed as list by ansible Additional info: cat /var/lib/mistral/overcloud/ceph-ansible/extra_vars.yml cephfs_data_pool: min_size: 1 name: cephfs_data pg_autoscale_mode: true rule_name: replicated_rule size: 2 target_size_ratio: 0.0 cephfs_metadata_pool: min_size: 1 name: cephfs_metadata pg_autoscale_mode: true rule_name: replicated_rule size: 2 target_size_ratio: 0.0 cephfs_pools: - cephfs_data_pool - cephfs_metadata_pool container_binary: podman dashboard_protocol: http fetch_directory: /var/lib/mistral/overcloud/ceph-ansible/fetch_dir ireallymeanit: 'yes'
Attempting to reproduce with https://review.opendev.org/c/openstack/tripleo-heat-templates/+/882678
Looks like problem was reproduced: https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_1f0/882678/8/check/tripleo-ci-centos-8-scenario004-standalone/1f0ffaf/logs/undercloud/home/zuul/standalone_deploy.log
Hi @astupnik , Firstly the issue appears irrespective of json or yaml. Like Francesco stated earlier, actual issue is that the ceph-ansible stable-4.0 mds ansible role cannot handle the suggested extra_vars.yml in this bz. We used the updated extra_vars.yml [1] in the upstream job and it is successful, refer [2] for logs. [1] https://zuul.opendev.org/t/openstack/build/1670afc36a7c4ccc94be731bb12d8182/log/logs/undercloud/home/zuul/tripleo-deploy/standalone-ansible-g_rsxcuw/ceph-ansible/extra_vars.yml [2] https://zuul.opendev.org/t/openstack/build/1670afc36a7c4ccc94be731bb12d8182/log/logs/undercloud/home/zuul/standalone_deploy.log