]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rbdmirror: do not use ceph/daemon entrypoint
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 27 Sep 2022 14:53:24 +0000 (16:53 +0200)
committerTeoman ONAY <tonay@redhat.com>
Wed, 31 May 2023 21:07:13 +0000 (23:07 +0200)
This changes the entrypoint used for rbdmirror containerized daemons
in the systemd template.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-rbd-mirror/tasks/main.yml
roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2

index 9c6011c100948195934dd826e3651ae9b467ce16..63ee613055f1b24a19259049e3cf6c0afa0b4c7d 100644 (file)
   set_fact:
     rbd_cmd: "{{ container_binary + ' run --rm --net=host -v /etc/ceph:/etc/ceph:z -v /var/lib/ceph:/var/lib/ceph:z -v /var/run/ceph:/var/run/ceph:z --entrypoint=rbd ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else 'rbd' }}"
 
+- name: include configure_mirroring.yml
+  include_tasks: configure_mirroring.yml
+
 - name: include start_container_rbd_mirror.yml
   include_tasks: start_container_rbd_mirror.yml
   when:
     - containerized_deployment | bool
     - ceph_rbd_mirror_remote_user is defined
-
-- name: include configure_mirroring.yml
-  include_tasks: configure_mirroring.yml
\ No newline at end of file
index 79e4bf438c82720cf7942bddf6a95ff92792ef89..259a2f7a415ad3745223dde798d5969b856125e6 100644 (file)
@@ -32,13 +32,12 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   -v /var/run/ceph:/var/run/ceph:z \
   -v /etc/localtime:/etc/localtime:ro \
   -v /var/log/ceph:/var/log/ceph:z \
-  -e CLUSTER={{ cluster }} \
-  -e CEPH_DAEMON=RBD_MIRROR \
-  -e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
   -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
   --name=ceph-rbd-mirror-{{ ansible_facts['hostname'] }} \
   {{ ceph_rbd_mirror_docker_extra_env }} \
-  {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
+  --entrypoint=/usr/bin/rbd-mirror \
+  {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+  -f -n client.rbd-mirror.{{ ansible_facts['hostname'] }}
 {% if container_binary == 'podman' %}
 ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
 {% else %}