diff --git a/roles/ceph-handler/tasks/check_running_containers.yml b/roles/ceph-handler/tasks/check_running_containers.yml index 6720c8085..cd6539235 100644 --- a/roles/ceph-handler/tasks/check_running_containers.yml +++ b/roles/ceph-handler/tasks/check_running_containers.yml @@ -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 diff --git a/roles/ceph-handler/templates/restart_nfs_daemon.sh.j2 b/roles/ceph-handler/templates/restart_nfs_daemon.sh.j2 index 39f304bfb..0fab87cc0 100644 --- a/roles/ceph-handler/templates/restart_nfs_daemon.sh.j2 +++ b/roles/ceph-handler/templates/restart_nfs_daemon.sh.j2 @@ -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 diff --git a/roles/ceph-nfs/tasks/main.yml b/roles/ceph-nfs/tasks/main.yml index 80f614e52..273889361 100644 --- a/roles/ceph-nfs/tasks/main.yml +++ b/roles/ceph-nfs/tasks/main.yml @@ -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