From b278d7cbcdf22ad0cc33b44fee0fe1d771c113b4 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Thu, 21 Sep 2017 18:21:49 +0200 Subject: [PATCH] stable-2.2: drop nfs_obj_gw As Ali Maredia explains (in https://github.com/ceph/ceph-ansible/issues/1907#issuecomment-331200448), since the Ceph RGW/NFS gateway (with the nfs-ganesha RGW FSAL) is not supported for any stable Ceph release prior to Luminous, the nfs_obj_gw variable does not serve any real purpose in this branch. Thus, remove it along with all references that use it. --- group_vars/all.yml.sample | 2 - group_vars/nfss.yml.sample | 1 - roles/ceph-common/defaults/main.yml | 2 - .../tasks/installs/debian_ceph_repository.yml | 2 +- .../tasks/installs/install_on_redhat.yml | 10 ----- roles/ceph-nfs/defaults/main.yml | 3 -- .../ceph-nfs/tasks/docker/create_configs.yml | 12 ------ roles/ceph-nfs/tasks/pre_requisite.yml | 15 -------- roles/ceph-rgw/tasks/docker/copy_configs.yml | 37 ------------------- 9 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 roles/ceph-rgw/tasks/docker/copy_configs.yml diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 457c4a179..cec049a8a 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -406,8 +406,6 @@ dummy: # # Set this to true to enable File access via NFS. Requires an MDS role. #nfs_file_gw: true -# Set this to true to enable Object access via NFS. Requires an RGW role. -#nfs_obj_gw: false # this is only here for usage with the rolling_update.yml playbook # do not ever change this here diff --git a/group_vars/nfss.yml.sample b/group_vars/nfss.yml.sample index 952b09229..91dc917ef 100644 --- a/group_vars/nfss.yml.sample +++ b/group_vars/nfss.yml.sample @@ -23,7 +23,6 @@ dummy: ####################### # Access type options # ####################### -# These are currently in ceph-common defaults because nfs_obj_gw shared with ceph-rgw # Enable NFS File access #nfs_file_gw: true # Enable NFS Object access diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index 00864361d..dd7447bfc 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -398,8 +398,6 @@ mon_containerized_default_ceph_conf_with_kv: false # # Set this to true to enable File access via NFS. Requires an MDS role. nfs_file_gw: true -# Set this to true to enable Object access via NFS. Requires an RGW role. -nfs_obj_gw: false # this is only here for usage with the rolling_update.yml playbook # do not ever change this here diff --git a/roles/ceph-common/tasks/installs/debian_ceph_repository.yml b/roles/ceph-common/tasks/installs/debian_ceph_repository.yml index e7b798cac..24a45477e 100644 --- a/roles/ceph-common/tasks/installs/debian_ceph_repository.yml +++ b/roles/ceph-common/tasks/installs/debian_ceph_repository.yml @@ -60,5 +60,5 @@ - ppa:gluster/nfs-ganesha-2.5 changed_when: false when: - - (nfs_obj_gw or nfs_file_gw) + - nfs_file_gw - not ansible_distribution == "Debian" diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index a99c7d08c..ed51949fd 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -122,16 +122,6 @@ - nfs_group_name in group_names - nfs_file_gw -- name: install nfs rgw gateway - package: - name: "{{ item }}" - with_items: - - nfs-ganesha-rgw - - ceph-radosgw - when: - - nfs_group_name in group_names - - nfs_obj_gw - - name: install ceph mgr package: name: ceph-mgr diff --git a/roles/ceph-nfs/defaults/main.yml b/roles/ceph-nfs/defaults/main.yml index 2ba363682..31fb56a3d 100644 --- a/roles/ceph-nfs/defaults/main.yml +++ b/roles/ceph-nfs/defaults/main.yml @@ -15,11 +15,8 @@ cephx: true ####################### # Access type options # ####################### -# These are currently in ceph-common defaults because nfs_obj_gw shared with ceph-rgw # Enable NFS File access #nfs_file_gw: true -# Enable NFS Object access -#nfs_obj_gw: false ###################### # NFS Ganesha Config # diff --git a/roles/ceph-nfs/tasks/docker/create_configs.yml b/roles/ceph-nfs/tasks/docker/create_configs.yml index c30dd7c91..cda4a3ce8 100644 --- a/roles/ceph-nfs/tasks/docker/create_configs.yml +++ b/roles/ceph-nfs/tasks/docker/create_configs.yml @@ -7,18 +7,6 @@ group: root mode: 0644 -- name: create the nfs rgw user - docker: - image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" - name: ceph-rgw-user-{{ ansible_hostname }} - hostname: "{{ ansible_hostname }}" - expose: "{{ ceph_rgw_civetweb_port }}" - ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}" - state: running - env: "CEPH_DAEMON=RGW_USER,RGW_USERNAME={{ ceph_nfs_rgw_user }},RGW_USER_ACCESS_KEY={{ ceph_nfs_rgw_access_key }},RGW_USER_SECRET_KEY={{ ceph_nfs_rgw_secret_key }}" - volumes: "/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph" - when: nfs_obj_gw - - name: get user create output command: docker logs ceph-rgw-user-{{ ansible_hostname }} always_run: true diff --git a/roles/ceph-nfs/tasks/pre_requisite.yml b/roles/ceph-nfs/tasks/pre_requisite.yml index 9da9f256a..f2e8784dc 100644 --- a/roles/ceph-nfs/tasks/pre_requisite.yml +++ b/roles/ceph-nfs/tasks/pre_requisite.yml @@ -10,21 +10,6 @@ - /var/lib/nfs/ganesha - /var/run/ganesha -- name: create rgw nfs user - command: radosgw-admin user create --uid={{ ceph_nfs_rgw_user }} --display-name="RGW NFS User" - register: rgwuser - when: nfs_obj_gw - -- name: set access key - set_fact: - ceph_nfs_rgw_access_key: "{{ (rgwuser.stdout | from_json)['keys'][0]['access_key'] }}" - when: nfs_obj_gw - -- name: set secret key - set_fact: - ceph_nfs_rgw_secret_key: "{{(rgwuser.stdout | from_json)['keys'][0]['secret_key']}}" - when: nfs_obj_gw - - name: generate ganesha configuration file action: config_template args: diff --git a/roles/ceph-rgw/tasks/docker/copy_configs.yml b/roles/ceph-rgw/tasks/docker/copy_configs.yml deleted file mode 100644 index a05d638ae..000000000 --- a/roles/ceph-rgw/tasks/docker/copy_configs.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: set config and keys paths - set_fact: - rgw_config_keys: - - "/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring" - when: nfs_obj_gw - -- name: wait for rgw keyring - wait_for: path="/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring" - when: - - nfs_obj_gw - - inventory_hostname == groups[rgw_group_name][0] - -- name: stat for config and keys - local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }} - with_items: "{{ rgw_config_keys }}" - changed_when: false - become: false - failed_when: false - always_run: true - register: statconfig - when: - - nfs_obj_gw - - inventory_hostname == groups[rgw_group_name][0] - -- name: push ceph files to the ansible server - fetch: - src: "{{ item.0 }}" - dest: "{{ fetch_directory }}/docker_mon_files/var/lib/ceph/radosgw/keyring" - flat: yes - with_together: - - "{{ rgw_config_keys }}" - - "{{ statconfig.results }}" - when: - - nfs_obj_gw - - item.1.stat.exists == false - - inventory_hostname == groups[rgw_group_name][0]