mds: do not use ceph/daemon entrypoint

This changes the entrypoint used for ceph-mds containerized daemons
in the systemd template.not

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/7431/head
Guillaume Abrioux 2022-09-19 14:49:35 +02:00 committed by Teoman ONAY
parent 8df9791bd3
commit 3b36a4e826
3 changed files with 24 additions and 22 deletions

View File

@ -43,3 +43,23 @@
- item.item.copy_key | bool
no_log: "{{ no_log_on_ceph_key_tasks }}"
- name: create mds keyring
ceph_key:
name: "mds.{{ ansible_facts['hostname'] }}"
cluster: "{{ cluster }}"
user: client.bootstrap-mds
user_key: "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring"
caps:
mon: "allow profile mds"
mds: "allow"
osd: "allow rwx"
dest: "/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}/keyring"
import_key: false
owner: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
group: "{{ ceph_uid if containerized_deployment | bool else 'ceph' }}"
mode: "{{ ceph_keyring_permissions }}"
no_log: "{{ no_log_on_ceph_key_tasks }}"
environment:
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
when: cephx | bool

View File

@ -20,24 +20,6 @@
- mds_group_name in group_names
- ansible_facts['os_family'] in ['Suse', 'RedHat']
- name: create mds keyring
ceph_key:
name: "mds.{{ ansible_facts['hostname'] }}"
cluster: "{{ cluster }}"
user: client.bootstrap-mds
user_key: "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring"
caps:
mon: "allow profile mds"
mds: "allow"
osd: "allow rwx"
dest: "/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}/keyring"
import_key: false
owner: ceph
group: ceph
mode: "{{ ceph_keyring_permissions }}"
no_log: "{{ no_log_on_ceph_key_tasks }}"
when: cephx | bool
- name: ensure systemd service override directory exists
file:
state: directory

View File

@ -28,19 +28,19 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
--security-opt label=disable \
--memory={{ ceph_mds_docker_memory_limit }} \
--cpus={{ cpu_limit }} \
-v /var/lib/ceph/mds:/var/lib/ceph/mds:z \
-v /var/lib/ceph/bootstrap-mds:/var/lib/ceph/bootstrap-mds:z \
-v /var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:z \
-v /etc/ceph:/etc/ceph:z \
-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=MDS \
-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 }} \
{{ ceph_mds_docker_extra_env }} \
--name=ceph-mds-{{ ansible_facts['hostname'] }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
--entrypoint=/usr/bin/ceph-mds \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
-f -i {{ ansible_facts['hostname'] }}
{% if container_binary == 'podman' %}
ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`"
{% else %}