Skip to content

Commit c5d71c1

Browse files
committed
Remove pcs colocation constraints from manila-share when cephnfs
This patch adds the missing tasks related to manila adoption in case cephnfs is the backend. In this context a pcs constraints exists between the VIP, the ceph-nfs systemd unit and manila-share. During the adoption process we shut down manila-share (which is adopted as part of the procedure), but we do not take any action to the existing A/P Ganesha instance, which still needs to stay up. This patch adds the missing steps documented in [1]. [1] https://github.com/openstack-k8s-operators/data-plane-adoption/blob/main/docs_user/modules/proc_stopping-openstack-services.adoc Signed-off-by: Francesco Pantano <[email protected]>
1 parent 673bf72 commit c5d71c1

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

tests/roles/manila_adoption/tasks/ceph.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
src: manila_cephfs.yaml.j2
2323
dest: /tmp/manila_cephfs.yaml
2424
mode: "0600"
25+
vars:
26+
tripleo_ganesha_vip: "{{ cephnfs_vip.stdout }}"
2527

2628
- name: Deploy podified Manila with cephfs backend
2729
ansible.builtin.shell: |

tests/roles/manila_adoption/templates/manila_cephfs.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
cephfs_protocol_helper_type= {{ (manila_backend == "cephfs") | ternary('CEPHFS', 'NFS') }}
4949
{% if manila_backend == "cephnfs" -%}
5050
cephfs_nfs_cluster_id=cephfs
51-
cephfs_ganesha_server_ip= {{ cephnfs_vip | default("") }}
51+
cephfs_ganesha_server_ip= {{ tripleo_ganesha_vip | default("") }}
5252
{%- endif %}
5353

5454
replicas: 1

tests/roles/stop_openstack_services/tasks/main.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66
CONTROLLER2_SSH="{{ controller2_ssh }}"
77
CONTROLLER3_SSH="{{ controller3_ssh }}"
88
9+
- name: Remove colocation constraints between manila-share and ceph-nfs
10+
when: manila_backend == "cephnfs"
11+
ansible.builtin.shell: |
12+
{{ shell_header }}
13+
{{ oc_header }}
14+
{{ stop_openstack_services_shell_vars }}
15+
16+
echo "Removing Pacemaker constraints between manila-share and ceph-nfs"
17+
for i in {1..3}; do
18+
SSH_CMD="CONTROLLER${i}_SSH"
19+
if [ ! -z "${!SSH_CMD}" ]; then
20+
echo "Using controller $i to run pacemaker commands"
21+
${!SSH_CMD} sudo pcs constraint remove colocation-openstack-manila-share-ceph-nfs-INFINITY
22+
${!SSH_CMD} sudo pcs constraint remove order-ceph-nfs-openstack-manila-share-Optional
23+
break
24+
fi
25+
done
26+
927
- name: stop control plane services
1028
no_log: "{{ use_no_log }}"
1129
ansible.builtin.shell: |

0 commit comments

Comments
 (0)