I'm trying to setup a 3 node GlusterFS cluster using Ansible and have run into some issues trying to setup the backend storage.
My current setup consists of 3 nodes, each of which has a 10G disk attached (/dev/vdb) in addition to the primary storage (/dev/vda).
I'm trying to use the official gluster-ansible-role (https://github.com/gluster/gluster-ansible-infra) to prepare the backend disks (/dev/vdb). My aim is to:
- Create a volume group 'storage_vg' which contains /dev/vdb as the physical volume.
- Create a logical volume 'storage_lv' from 'storage_vg'.
- Create a XFS file system on 'storage_lv' and mount it under /mnt/brick
My playbook is as follows:
- hosts: all
become: True
roles:
- gluster.infra
vars:
gluster_infra_fw_state: disabled
gluster_infra_volume_groups:
vgname: 'storage_vg'
pvname: '/dev/vdb'
gluster_infra_thick_lvs:
vgname: 'storage_vg'
lvname: 'storage_lv'
gluster_infra_mount_devices:
path: '/mnt/brick'
vgname: 'storage_vg'
lv: 'storage_lv'
The playbook fails with the following error:
TASK [gluster.infra/roles/backend_setup : Group devices by volume group name, including existing devices] ******************************************************************
fatal: [gluster-node1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'str object' has no attribute 'vgname'\n\nThe error appears to be in '/root/.ansible/roles/gluster.infra/roles/backend_setup/tasks/get_vg_groupings.yml': line 3, 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: Group devices by volume group name, including existing devices\n ^ here\n"}
I've uploaded the full log file here https://paste.ubuntu.com/p/dGPD7KRPMF/