ceph-ansible not using overrides of cephfs_pools (cephfs_data and cephfs_metadata) via CephAnsibleExtraConfig THT parameter

Solution Verified - Updated -

Issue

One of our customers wants to enable autoscaling of PGs for all pools by setting [1] for each pool using TripleO. Customer achieved what he wanted for every pool but cephfs_data and cephfs_metadata by tuning ceph_pools definition. But the situation is different for cephfs_data and cephfs_metadata pools: at first ceph-ansible sets settings [1], but then reverts them.

From upstream ceph-ansible issue 2239 it looks like ceph-ansible allows to define a subset of cephfs_pools settings. At this point we are looking for advice about THT variable that should be used to do this: we tried CephAnsibleExtraConfig [2], but it didn't work as expected and complained "The task includes an option with an undefined variable. The error was: 'cephfs_data' is undefined" [3].

[1]

    pg_autoscale_mode: 'True'
    target_size_ratio: '0.0'

[2]

CephAnsibleExtraConfig:
  cephfs_pools:
          - name: "{{ cephfs_data }}"
            pg_autoscale_mode: 'True'
            target_size_ratio: '0.0'
          - name: "{{ cephfs_metadata }}"
            pg_autoscale_mode: 'True'
            target_size_ratio: '0.0'

[3]

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"}

Environment

  • RHOSP 16
  • RHCS 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content