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

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-mds/tasks/common.yml
roles/ceph-mds/tasks/non_containerized.yml
roles/ceph-mds/templates/ceph-mds.service.j2

index 9e837ddcea788c6c63a2d814a74cb35e086a49eb..f41a5fd59ee037de8023240d4fcfc71f6566cae2 100644 (file)
     - 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
index cc69f9a571dba07276394297ae7ece7fcc874082..ab008e4a01e260f3111568cc7e8a3dd6d3d97e7b 100644 (file)
     - 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
index 183dbf87e394fcd734626f882c133878c3b737ab..f57b8098f8b84d2506981285967a7028356987e9 100644 (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 %}