From: Guillaume Abrioux Date: Tue, 27 Sep 2022 14:53:24 +0000 (+0200) Subject: rbdmirror: do not use ceph/daemon entrypoint X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=73395c19c56c2a8f32aabc39e5ffeb19c2031ef3;p=ceph-ansible.git rbdmirror: do not use ceph/daemon entrypoint This changes the entrypoint used for rbdmirror containerized daemons in the systemd template. Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-rbd-mirror/tasks/main.yml b/roles/ceph-rbd-mirror/tasks/main.yml index 9c6011c10..63ee61305 100644 --- a/roles/ceph-rbd-mirror/tasks/main.yml +++ b/roles/ceph-rbd-mirror/tasks/main.yml @@ -42,11 +42,11 @@ 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 diff --git a/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 b/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 index 79e4bf438..259a2f7a4 100644 --- a/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 +++ b/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 @@ -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 %}