mirror of https://github.com/ceph/ceph-ansible.git
Allow to use rados for ganesha exports
parent
fbb4d2ea15
commit
2435c48cd5
|
@ -497,9 +497,9 @@ dummy:
|
|||
# do not ever change this here
|
||||
#rolling_update: false
|
||||
|
||||
|
||||
#####################
|
||||
# Docker pull retry #
|
||||
#####################
|
||||
#docker_pull_retry: 3
|
||||
#docker_pull_timeout: "300s"
|
||||
|
||||
|
|
|
@ -44,6 +44,14 @@ dummy:
|
|||
######################
|
||||
#ceph_nfs_log_file: "/var/log/ganesha/ganesha.log"
|
||||
#ceph_nfs_dynamic_exports: false
|
||||
# If set to true then rados is used to store ganesha exports
|
||||
# and client sessions information, this is useful if you
|
||||
# run multiple nfs-ganesha servers in active/passive mode and
|
||||
# want to do failover
|
||||
#ceph_nfs_rados_backend: false
|
||||
# Name of the rados object used to store a list of the export rados
|
||||
# object URLS
|
||||
#ceph_nfs_rados_export_index: "ganesha-export-index"
|
||||
# Address ganesha service should listen on, by default ganesha listens on all
|
||||
# addresses. (Note: ganesha ignores this parameter in current version due to
|
||||
# this bug: https://github.com/nfs-ganesha/nfs-ganesha/issues/217)
|
||||
|
|
|
@ -497,9 +497,9 @@ ceph_repository: rhcs
|
|||
# do not ever change this here
|
||||
#rolling_update: false
|
||||
|
||||
|
||||
#####################
|
||||
# Docker pull retry #
|
||||
#####################
|
||||
#docker_pull_retry: 3
|
||||
#docker_pull_timeout: "300s"
|
||||
|
||||
|
|
|
@ -36,6 +36,14 @@ nfs_obj_gw: true
|
|||
######################
|
||||
ceph_nfs_log_file: "/var/log/ganesha/ganesha.log"
|
||||
ceph_nfs_dynamic_exports: false
|
||||
# If set to true then rados is used to store ganesha exports
|
||||
# and client sessions information, this is useful if you
|
||||
# run multiple nfs-ganesha servers in active/passive mode and
|
||||
# want to do failover
|
||||
ceph_nfs_rados_backend: false
|
||||
# Name of the rados object used to store a list of the export rados
|
||||
# object URLS
|
||||
ceph_nfs_rados_export_index: "ganesha-export-index"
|
||||
# Address ganesha service should listen on, by default ganesha listens on all
|
||||
# addresses. (Note: ganesha ignores this parameter in current version due to
|
||||
# this bug: https://github.com/nfs-ganesha/nfs-ganesha/issues/217)
|
||||
|
|
|
@ -1,4 +1,19 @@
|
|||
---
|
||||
- name: check if rados index object exists
|
||||
shell: "rados -p {{ cephfs_data }} --cluster {{ cluster }} ls|grep {{ ceph_nfs_rados_export_index }}"
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: rados_index_exists
|
||||
check_mode: no
|
||||
when:
|
||||
- ceph_nfs_rados_backend
|
||||
|
||||
- name: create an empty rados index object
|
||||
shell: "echo | rados -p {{ cephfs_data }} --cluster {{ cluster }} put {{ ceph_nfs_rados_export_index }} -"
|
||||
when:
|
||||
- ceph_nfs_rados_backend
|
||||
- rados_index_exists.rc != 0
|
||||
|
||||
- name: create /etc/ganesha
|
||||
file:
|
||||
path: /etc/ganesha
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% if ceph_nfs_dynamic_exports %}
|
||||
{% if ceph_nfs_dynamic_exports and not ceph_nfs_rados_backend %}
|
||||
%include /etc/ganesha/export.d/INDEX.conf
|
||||
{% endif %}
|
||||
|
||||
|
@ -12,6 +12,22 @@ NFS_Core_Param
|
|||
{% endif %}
|
||||
}
|
||||
|
||||
{% if ceph_nfs_rados_backend %}
|
||||
RADOS_URLS {
|
||||
ceph_conf = '/etc/ceph/{{ cluster }}.conf';
|
||||
userid = "{{ ceph_nfs_ceph_user }}";
|
||||
}
|
||||
%url rados://{{ cephfs_data }}/{{ ceph_nfs_rados_export_index }}
|
||||
|
||||
NFSv4 {
|
||||
RecoveryBackend = 'rados_kv';
|
||||
}
|
||||
RADOS_KV {
|
||||
ceph_conf = '/etc/ceph/{{ cluster }}.conf';
|
||||
userid = "{{ ceph_nfs_ceph_user }}";
|
||||
pool = "{{ cephfs_data }}";
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if nfs_file_gw %}
|
||||
EXPORT
|
||||
|
|
Loading…
Reference in New Issue