Merge "Update Manila deploy steps for Wallaby"
This commit is contained in:
commit
948088abe2
@ -276,6 +276,13 @@ manila_ks_users:
|
|||||||
password: "{{ manila_keystone_password }}"
|
password: "{{ manila_keystone_password }}"
|
||||||
role: "admin"
|
role: "admin"
|
||||||
|
|
||||||
|
|
||||||
|
####################
|
||||||
|
# CephFS
|
||||||
|
####################
|
||||||
|
manila_cephfs_filesystem_name: ""
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Glusterfs
|
# Glusterfs
|
||||||
####################
|
####################
|
||||||
|
@ -12,8 +12,3 @@
|
|||||||
|
|
||||||
- name: Flush handlers
|
- name: Flush handlers
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- include_tasks: fix_cephfs_owner.yml
|
|
||||||
when:
|
|
||||||
- enable_manila_backend_cephfs_native | bool
|
|
||||||
- inventory_hostname in groups['manila-share']
|
|
||||||
|
@ -1,85 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Check /tmp/cephfs path
|
|
||||||
become: true
|
|
||||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} ls /tmp/cephfs/"
|
|
||||||
register: check_cephfs
|
|
||||||
changed_when: False
|
|
||||||
failed_when: check_cephfs.rc != 0 and check_cephfs.stderr.find('No such file or directory') == -1
|
|
||||||
run_once: True
|
|
||||||
|
|
||||||
- name: Create /tmp/cephfs path
|
|
||||||
become: true
|
|
||||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} mkdir -p /tmp/cephfs"
|
|
||||||
run_once: True
|
|
||||||
when: check_cephfs.rc != 0
|
|
||||||
|
|
||||||
- name: Get monitor dump
|
|
||||||
become: true
|
|
||||||
command: docker exec "{{ manila_services['manila-share']['container_name'] }}" ceph mon dump -c /etc/ceph/ceph.conf --name client.manila -f json
|
|
||||||
register: ceph_monitor_dump
|
|
||||||
changed_when: False
|
|
||||||
run_once: True
|
|
||||||
|
|
||||||
- name: Get cephfs addr
|
|
||||||
vars:
|
|
||||||
query: mons[*].public_addr
|
|
||||||
# take only ip and port from public_addr, e.g from public_addr: 10.66.1.5:6789/0
|
|
||||||
# use 10.66.1.5:6789
|
|
||||||
regex: "[^/]*"
|
|
||||||
set_fact:
|
|
||||||
cephfs_addr: "{{ ceph_monitor_dump.stdout | from_json | json_query(query) | map('regex_search', regex) | join(',') }}:/"
|
|
||||||
run_once: true
|
|
||||||
|
|
||||||
- name: Get cephfs secret
|
|
||||||
become: true
|
|
||||||
command: docker exec "{{ manila_services['manila-share']['container_name'] }}" ceph-authtool -p /etc/ceph/ceph.client.manila.keyring -n client.manila
|
|
||||||
register: manila_keyring
|
|
||||||
changed_when: False
|
|
||||||
run_once: True
|
|
||||||
|
|
||||||
- name: Umount cephfs
|
|
||||||
become: true
|
|
||||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} umount /tmp/cephfs/"
|
|
||||||
register: umount_cephfs
|
|
||||||
changed_when: False
|
|
||||||
failed_when: False
|
|
||||||
run_once: True
|
|
||||||
|
|
||||||
- name: Mount cephfs
|
|
||||||
become: true
|
|
||||||
command: >
|
|
||||||
docker exec -u 0 {{ manila_services['manila-share']['container_name'] }}
|
|
||||||
mount -t ceph {{ cephfs_addr }} /tmp/cephfs -o name=manila,secret={{ manila_keyring.stdout }}
|
|
||||||
register: mount_cephfs
|
|
||||||
changed_when: False
|
|
||||||
run_once: True
|
|
||||||
|
|
||||||
- name: Check volumes path
|
|
||||||
become: true
|
|
||||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} ls /tmp/cephfs/volumes"
|
|
||||||
register: check_volume
|
|
||||||
changed_when: False
|
|
||||||
failed_when: False
|
|
||||||
run_once: True
|
|
||||||
|
|
||||||
- name: Create /tmp/cephfs/volumes path
|
|
||||||
become: true
|
|
||||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} mkdir /tmp/cephfs/volumes"
|
|
||||||
register: create_volume
|
|
||||||
run_once: True
|
|
||||||
when: check_volume.rc != 0
|
|
||||||
|
|
||||||
- name: Change the owner and group of /tmp/cephfs/volumes
|
|
||||||
become: true
|
|
||||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} chown manila:manila /tmp/cephfs/volumes"
|
|
||||||
register: chown_volume
|
|
||||||
run_once: True
|
|
||||||
when: check_volume.rc != 0 and create_volume.rc == 0
|
|
||||||
|
|
||||||
- name: Umount cephfs
|
|
||||||
become: true
|
|
||||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} umount /tmp/cephfs"
|
|
||||||
changed_when: False
|
|
||||||
register: umount_cephfs
|
|
||||||
run_once: True
|
|
||||||
when: mount_cephfs.rc == 0
|
|
@ -113,7 +113,9 @@ share_driver = manila.share.drivers.cephfs.driver.CephFSDriver
|
|||||||
cephfs_conf_path = /etc/ceph/ceph.conf
|
cephfs_conf_path = /etc/ceph/ceph.conf
|
||||||
cephfs_auth_id = {{ ceph_manila_user }}
|
cephfs_auth_id = {{ ceph_manila_user }}
|
||||||
cephfs_cluster_name = ceph
|
cephfs_cluster_name = ceph
|
||||||
cephfs_enable_snapshots = False
|
{% if manila_cephfs_filesystem_name | length %}
|
||||||
|
cephfs_filesystem_name = {{ manila_cephfs_filesystem_name }}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if enable_manila_backend_cephfs_nfs | bool %}
|
{% if enable_manila_backend_cephfs_nfs | bool %}
|
||||||
@ -125,7 +127,9 @@ cephfs_protocol_helper_type = NFS
|
|||||||
cephfs_conf_path = /etc/ceph/ceph.conf
|
cephfs_conf_path = /etc/ceph/ceph.conf
|
||||||
cephfs_auth_id = {{ ceph_manila_user }}
|
cephfs_auth_id = {{ ceph_manila_user }}
|
||||||
cephfs_cluster_name = ceph
|
cephfs_cluster_name = ceph
|
||||||
cephfs_enable_snapshots = False
|
{% if manila_cephfs_filesystem_name | length %}
|
||||||
|
cephfs_filesystem_name = {{ manila_cephfs_filesystem_name }}
|
||||||
|
{% endif %}
|
||||||
cephfs_ganesha_server_is_remote= False
|
cephfs_ganesha_server_is_remote= False
|
||||||
cephfs_ganesha_server_ip = {{ api_interface_address }}
|
cephfs_ganesha_server_ip = {{ api_interface_address }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -218,6 +218,13 @@ for Ceph includes following steps:
|
|||||||
|
|
||||||
#. Copy Ceph configuration file to ``/etc/kolla/config/manila/ceph.conf``
|
#. Copy Ceph configuration file to ``/etc/kolla/config/manila/ceph.conf``
|
||||||
#. Copy Ceph keyring to ``/etc/kolla/config/manila/<ceph_manila_keyring>``
|
#. Copy Ceph keyring to ``/etc/kolla/config/manila/<ceph_manila_keyring>``
|
||||||
|
|
||||||
|
#. If using multiple filesystems (Ceph Pacific+), set
|
||||||
|
``manila_cephfs_filesystem_name`` in ``/etc/kolla/globals.yml`` to the
|
||||||
|
name of the Ceph filesystem Manila should use.
|
||||||
|
By default, Manila will use the first filesystem returned by
|
||||||
|
the ``ceph fs volume ls`` command.
|
||||||
|
|
||||||
#. Setup Manila in the usual way
|
#. Setup Manila in the usual way
|
||||||
|
|
||||||
For more details on the rest of the Manila setup, such as creating the share
|
For more details on the rest of the Manila setup, such as creating the share
|
||||||
|
@ -622,6 +622,11 @@
|
|||||||
#hnas_evs_ip:
|
#hnas_evs_ip:
|
||||||
#hnas_file_system_name:
|
#hnas_file_system_name:
|
||||||
|
|
||||||
|
# CephFS backend configuration.
|
||||||
|
# External Ceph FS name.
|
||||||
|
# By default this is empty to allow Manila to auto-find the first FS available.
|
||||||
|
#manila_cephfs_filesystem_name:
|
||||||
|
|
||||||
# Gluster backend configuration
|
# Gluster backend configuration
|
||||||
# The option of glusterfs share layout can be directory or volume
|
# The option of glusterfs share layout can be directory or volume
|
||||||
# The default option of share layout is 'volume'
|
# The default option of share layout is 'volume'
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds "manila_cephfs_filesystem_name" variable to support multi-fs
|
||||||
|
Ceph Pacific+ deloyments.
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Removes "fix_cephfs_owner.yaml" which related to pre-wallaby Manila's
|
||||||
|
use of subfolders. Post-wallaby Manila now uses cephfs volumes instead,
|
||||||
|
as such this file is no longer required.
|
||||||
|
`LP#1938285 <https://bugs.launchpad.net/kolla-ansible/+bug/1938285>`__
|
||||||
|
`LP#1935784 <https://bugs.launchpad.net/kolla-ansible/+bug/1935784>`__
|
||||||
|
- |
|
||||||
|
Removes use of "cephfs_enable_snapshots" in Manila config as this
|
||||||
|
option was removed from Manila in the Wallaby release.
|
Loading…
Reference in New Issue
Block a user