Merge pull request #2020 from jprovaznik/dexports

Ceph-nfs dynamic exports fixes
pull/2021/head
Sébastien Han 2017-10-10 15:17:28 +02:00 committed by GitHub
commit 90d4ac5db5
6 changed files with 25 additions and 9 deletions

View File

@ -43,9 +43,7 @@ dummy:
# NFS Ganesha Config #
######################
#ceph_nfs_log_file: "/var/log/ganesha/ganesha.log"
# whether ganesha config file should include additional
# sub-directory with exports definitions, this is useful for dynamic exports
#ceph_nfs_include_exports_dir: false
#ceph_nfs_dynamic_exports: false
####################
# FSAL Ceph Config #

View File

@ -35,9 +35,7 @@ nfs_obj_gw: true
# NFS Ganesha Config #
######################
ceph_nfs_log_file: "/var/log/ganesha/ganesha.log"
# whether ganesha config file should include additional
# sub-directory with exports definitions, this is useful for dynamic exports
ceph_nfs_include_exports_dir: false
ceph_nfs_dynamic_exports: false
####################
# FSAL Ceph Config #

View File

@ -37,3 +37,19 @@
when:
- ansible_os_family == 'RedHat'
- sestatus.stdout != 'Disabled'
- name: create dbus service file
become: true
template:
src: "{{ role_path }}/templates/org.ganesha.nfsd.conf"
dest: /etc/dbus-1/system.d/org.ganesha.nfsd.conf
owner: "root"
group: "root"
mode: "0644"
when:
- ceph_nfs_dynamic_exports
- name: reload dbus configuration
command: "killall -SIGHUP dbus-daemon"
when:
- ceph_nfs_dynamic_exports

View File

@ -26,7 +26,7 @@
owner: "root"
group: "root"
mode: "0755"
when: ceph_nfs_include_exports_dir
when: ceph_nfs_dynamic_exports
- name: create exports dir index file
copy:
@ -36,7 +36,7 @@
owner: "root"
group: "root"
mode: "0644"
when: ceph_nfs_include_exports_dir
when: ceph_nfs_dynamic_exports
- name: generate systemd unit file
become: true

View File

@ -13,6 +13,10 @@ ExecStart=/usr/bin/docker run --rm --net=host \
-v /etc/ceph:/etc/ceph \
-v /var/lib/nfs/ganesha:/var/lib/nfs/ganesha \
-v /etc/ganesha:/etc/ganesha \
{% if ceph_nfs_dynamic_exports %}
--privileged \
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
{% endif -%}
{% else -%}
-e KV_TYPE={{kv_type}} \
-e KV_IP={{kv_endpoint}}\

View File

@ -1,7 +1,7 @@
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
# {{ ansible_managed }}
{% if ceph_nfs_include_exports_dir %}
{% if ceph_nfs_dynamic_exports %}
%include /etc/ganesha/export.d/INDEX.conf
{% endif %}