Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure to run cephfs task for nfs ganesha #1713

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion playbooks/ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,17 @@
cifmw_cephadm_dashboard_key: "{{ cifmw_cephadm_key }}"

- name: Create cephfs volume
when: cifmw_ceph_daemons_layout.cephfs_enabled | default(true) | bool
when: (cifmw_ceph_daemons_layout.cephfs_enabled | default(true) | bool) or
(cifmw_ceph_daemons_layout.ceph_nfs_enabled | default(false) | bool)
ansible.builtin.import_role:
name: cifmw_cephadm
tasks_from: cephfs

- name: Deploy cephnfs
when: cifmw_ceph_daemons_layout.ceph_nfs_enabled | default(false) | bool
ansible.builtin.import_role:
name: cifmw_cephadm
tasks_from: cephnfs
vars:
# we reuse the same VIP reserved for rgw
cifmw_cephadm_nfs_vip: "{{ cifmw_cephadm_vip }}/24"
Expand Down
12 changes: 0 additions & 12 deletions roles/cifmw_cephadm/tasks/cephfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,3 @@
- name: Apply the MDS spec
ansible.builtin.command: "{{ cifmw_cephadm_ceph_cli }} orch apply --in-file {{ cifmw_cephadm_container_spec }}"
become: true

# waiting for https://github.com/ceph/ceph/pull/53108
# to appear in the next Ceph container build
# disabling this task by default for now
- name: Create NFS Ganesha Cluster
when: cifmw_ceph_daemons_layout.ceph_nfs_enabled | default(false) | bool
ansible.builtin.command: |
{{ cifmw_cephadm_ceph_cli }} nfs cluster create {{ cifmw_cephadm_cephfs_name }} \
--ingress --virtual-ip={{ cifmw_cephadm_nfs_vip }} \
--ingress-mode=haproxy-protocol '--placement={{ placement }}'
changed_when: false
become: true
23 changes: 23 additions & 0 deletions roles/cifmw_cephadm/tasks/cephnfs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# Copyright Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

- name: Create NFS Ganesha Cluster
ansible.builtin.command: >
{{ cifmw_cephadm_ceph_cli }} nfs cluster create {{ cifmw_cephadm_cephfs_name }}
--ingress --virtual-ip={{ cifmw_cephadm_nfs_vip }}
--ingress-mode=haproxy-protocol '--placement={{ placement }}'
changed_when: false
become: true