]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Look for additional names when checking ceph-nfs container status
authorGiulio Fidente <gfidente@redhat.com>
Mon, 9 Sep 2019 17:07:02 +0000 (19:07 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 9 Sep 2019 19:27:37 +0000 (15:27 -0400)
Ganesha cannot be operated active/active, in those deployments
where it is managed by pacemaker the container name can be
different than the default.

This change uses "ceph_nfs_service_suffix" where previously
missing to ensure tasks will work with customized names.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1750005
Signed-off-by: Giulio Fidente <gfidente@redhat.com>
roles/ceph-handler/tasks/check_running_containers.yml
roles/ceph-handler/templates/restart_nfs_daemon.sh.j2
roles/ceph-nfs/tasks/main.yml

index 6720c8085a02e4593b48b4077bfaac9ccbcb5c1d..cd6539235a38220311b35e4dd4b6f89192e1a11d 100644 (file)
@@ -48,7 +48,7 @@
   when: inventory_hostname in groups.get(rbdmirror_group_name, [])
 
 - name: check for a nfs container
-  command: "{{ container_binary }} ps -q --filter='name=ceph-nfs-{{ ansible_hostname }}'"
+  command: "{{ container_binary }} ps -q --filter='name=ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }}'"
   register: ceph_nfs_container_stat
   changed_when: false
   failed_when: false
index 39f304bfb95fa59f1a2bf1f7c7f69ec5ab69e25f..0fab87cc0900b1e8794d266e16fb2d81f35bd95e 100644 (file)
@@ -5,7 +5,7 @@ DELAY="{{ handler_health_nfs_check_delay }}"
 NFS_NAME="ceph-nfs@{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
 PID=/var/run/ganesha.pid
 {% if containerized_deployment %}
-DOCKER_EXEC="{{ container_binary }} exec ceph-nfs-{{ ansible_hostname }}"
+DOCKER_EXEC="{{ container_binary }} exec ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
 {% endif %}
 
 # First, restart the daemon
index 80f614e520db4152e1230eedd927d5410b27e253..273889361603b30bd148890414e21d17ba5212af 100644 (file)
@@ -1,7 +1,7 @@
 ---
 - name: set_fact container_exec_cmd
   set_fact:
-    container_exec_cmd: "{{ container_binary }} exec ceph-nfs-{{ ansible_hostname }}"
+    container_exec_cmd: "{{ container_binary }} exec ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }}"
   when: containerized_deployment | bool
 
 - name: include pre_requisite_non_container.yml