diff --git a/ci/playbooks/cinder-nfs-enable.yaml b/ci/playbooks/cinder-nfs-enable.yaml index f683375e..3bf4b109 100644 --- a/ci/playbooks/cinder-nfs-enable.yaml +++ b/ci/playbooks/cinder-nfs-enable.yaml @@ -7,6 +7,9 @@ _cinder_nfs_secret_files: - cinder-volume-nfs-secrets.yaml - cinder-volume-nfs-secrets-2.yaml + _cinder_nfs_backends: + - nfs + - nfs-2 tasks: - name: Ensure the kustomizations dir exists ansible.builtin.file: @@ -39,16 +42,17 @@ ansible.builtin.template: dest: "{{ cifmw_controlplane_kustomizations_path }}/cinder-backup-nfs-sercrets.yaml" src: "cinder-backup-nfs-secrets.yaml.j2" - mode: '640' + mode: "640" - name: Create the definition of the secrets vars: share: "{{ cifmw_nfs_shares[indx] }}" name: "{{ filename | splitext | first }}" + backend_name: "{{ _cinder_nfs_backends[indx] }}" ansible.builtin.template: dest: "{{ cifmw_controlplane_kustomizations_path }}/{{ filename }}" src: "cinder-volume-nfs-secrets.yaml.j2" - mode: '640' + mode: "640" loop: "{{ _cinder_nfs_secret_files }}" loop_control: loop_var: filename @@ -70,7 +74,7 @@ ansible.builtin.template: dest: "{{ cifmw_controlplane_kustomizations_path }}/nfs_backend.yaml" src: "nfs_backend.yaml.j2" - mode: '640' + mode: "640" # FIXME: copy with inline content does not support templating, so this should be reworked - name: Create kustomization to really enable NFS shares as backends for cinder and cinder-backup diff --git a/ci/playbooks/templates/cinder-volume-nfs-secrets.yaml.j2 b/ci/playbooks/templates/cinder-volume-nfs-secrets.yaml.j2 index 10d9e507..de9e061c 100644 --- a/ci/playbooks/templates/cinder-volume-nfs-secrets.yaml.j2 +++ b/ci/playbooks/templates/cinder-volume-nfs-secrets.yaml.j2 @@ -9,6 +9,6 @@ metadata: type: Opaque stringData: {{ name }}: | - [nfs] + [{{ backend_name }}] nas_host={{ cifmw_nfs_ip }} nas_share_path={{ '/data/' + share }} diff --git a/ci/playbooks/templates/nfs_backend.yaml.j2 b/ci/playbooks/templates/nfs_backend.yaml.j2 index d21354e2..2548d2fa 100644 --- a/ci/playbooks/templates/nfs_backend.yaml.j2 +++ b/ci/playbooks/templates/nfs_backend.yaml.j2 @@ -29,8 +29,8 @@ spec: networkAttachments: - storage customServiceConfig: | - [nfs] - volume_backend_name=nfs + [nfs-2] + volume_backend_name=nfs-2 volume_driver=cinder.volume.drivers.nfs.NfsDriver nfs_snapshot_support=true nas_secure_file_operations=false