From 9a1d0f839fce46c0b6d55ab12954d912b87db0c2 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Wed, 11 Sep 2024 23:59:29 +0530 Subject: [PATCH 1/2] settings.yml: Rename 'vfs.new' to 'vfs-new' for cephfs "share_id" field for defining share resources cannot contain a dot(.), underscore(_) or forward slash(/) in its value. Therefore replace dot with hyphen(-) in the list of methods which will be used further to constitute unique "share_id". Signed-off-by: Anoop C S --- playbooks/settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/settings.yml b/playbooks/settings.yml index 008a65e..2e1ba4a 100644 --- a/playbooks/settings.yml +++ b/playbooks/settings.yml @@ -362,7 +362,7 @@ environments: data: branch: main ctdb_mutex: rados - methods: ['kclient', 'vfs', 'vfs.new'] + methods: ['kclient', 'vfs', 'vfs-new'] nodes: setup: From d251d00bf2777349aac37bedd46912f98f480bdc Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Wed, 14 Aug 2024 17:33:18 +0530 Subject: [PATCH 2/2] sit.cephfs: Add share configured with vfs_ceph_new(mgr) Signed-off-by: Anoop C S --- .../roles/sit.cephfs/templates/ceph.smb.share.yml.j2 | 7 +++++-- playbooks/roles/local.defaults/templates/config.yml.j2 | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/playbooks/ansible/roles/sit.cephfs/templates/ceph.smb.share.yml.j2 b/playbooks/ansible/roles/sit.cephfs/templates/ceph.smb.share.yml.j2 index 6c048ed..b8d474b 100644 --- a/playbooks/ansible/roles/sit.cephfs/templates/ceph.smb.share.yml.j2 +++ b/playbooks/ansible/roles/sit.cephfs/templates/ceph.smb.share.yml.j2 @@ -1,10 +1,13 @@ resources: {%- for share in samba_shares +%} {%- for method in config.be.methods +%} - {%- set provider = 'samba-vfs' +%} + {%- set provider = 'samba-vfs/new' +%} + {%- if method == 'vfs' +%} + {%- set provider = 'samba-vfs/classic' +%} + {%- endif +%} - resource_type: ceph.smb.share cluster_id: site - share_id: {{ share.name }} + share_id: {{ share.name }}-{{ method }} intent: present name: {{ share.name }}-{{ config.be.name }}-{{ config.be.variant }}-{{ method }} cephfs: diff --git a/playbooks/roles/local.defaults/templates/config.yml.j2 b/playbooks/roles/local.defaults/templates/config.yml.j2 index 29fe04f..fe77410 100644 --- a/playbooks/roles/local.defaults/templates/config.yml.j2 +++ b/playbooks/roles/local.defaults/templates/config.yml.j2 @@ -19,6 +19,9 @@ config: {%- set methods = settings.environments[be].data.methods +%} {%- if variant != 'default' +%} {%- set methods = ['vfs'] +%} + {%- if variant == 'mgr' %} + {{ methods.append('vfs-new') }} + {%- endif +%} {%- endif +%} methods: {{ methods }} {%- endif +%}