gluster / gluster-ansible-infra

Ansible role to enable and deploy the backend of a Gluster cluster.
GNU General Public License v3.0
29 stars 36 forks source link

gluster.infra fails with multipath devices. #63

Open kristvanbesien opened 5 years ago

kristvanbesien commented 5 years ago

We have a server that has disks redundantly attached. So we have use as disk devices /dev/mapper/mpath{a..e}

This seems to interfere with this piece of code in roles/backend_setup/main.yaml:

# Get the list of volume groups created on vdo disks
# This is a bit hacky, we rely on pvname to get vdo disks
- name: Record VDO devices (if any)
  set_fact:
     vdo_devs: "{{ vdo_devs|default([]) + [ item.vgname ] }}"
  with_items: "{{ gluster_infra_volume_groups | default([]) }}"
  when: item.pvname is defined and item.pvname is search("/dev/mapper/")

What happens is that because the disks all have pvnames that contain "/dev/mapper" they are added to the vdo_devs list, and this leads to roles/backed_setup/mount.yaml trying to mount them as VDOs... And this fails.

sac commented 5 years ago

@kristvanbesien can you attach your variable file? We pick the vdo_devs from the volume groups defined. So the role would try to mount the device only if /dev/mapper is defined somewhere in the variable file. Your variable file will help understand the problem better. You can remove the hosts part.