Comment 3 for bug 2012784

Revision history for this message
Evgeny Zhuravlev (ezhuravlev) wrote :

The same problem.
We need several NetApp backends on the single host.
Kolla can't handle this scenario.

Wrote a WA for that

## /usr/local/share/kolla-ansible/ansible/roles/cinder/tasks/config.yml
--------------------------------

- name: Find all nfs_shares config files
  become: true
  find:
    paths:
      - "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/"
    pattern: "nfs_shares*"
    file_type: file
  delegate_to: localhost
  register: "shares_config_files"

- name: Copying over nfs_shares files for cinder_volume
  become: true
  template:
    src: "{{ item.path }}"
    dest: "{{ node_config_directory }}/cinder-volume/"
    mode: "0660"
  loop: "{{ shares_config_files.files }}"
  when: inventory_hostname in groups['cinder-volume']
  notify:
    - Restart cinder-volume container

## /usr/local/share/kolla-ansible/ansible/roles/cinder/templates/cinder-volume.json.j2
--------------------------------
        {
            "source": "{{ container_config_directory }}/nfs_shares*",
            "dest": "/etc/cinder/",
            "owner": "cinder",
            "perm": "0600",
            "optional": {{ (not enable_cinder_backend_nfs | bool) | string | lower }}
        }

It will copy all nfs_shares* from deploy host /etc/kolla/cinder/<host>/ to cinder-volume container /etc/cinder

It works for our purposes fine.

Hope kolla dev team will find some useful here and include this options in some of future releases.

Regards :)