From 6179262f982ba5d92d05a8c2173836330ec75b71 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 7 Dec 2021 21:11:50 +0100 Subject: [PATCH] cephadm-adopt: ensure /etc/ceph is present on monitoring node When deploying the monitoring stack on a dedicated node, the directory `/etc/ceph` has never been created. Therefore, the play for adopting the monitoring stack fails because it can't write the minimal config file. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2029697 Signed-off-by: Guillaume Abrioux (cherry picked from commit 7ece59b41defc81ffd3bf184a24b63b45ec7d097) (cherry picked from commit 8a32576d209bc329b4159a781151a7d3a40c5b7d) --- infrastructure-playbooks/cephadm-adopt.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index 5b2772d021..b6a2a0affe 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -1150,6 +1150,14 @@ path: "/etc/ceph/{{ cluster }}.conf" register: ceph_config + - name: ensure /etc/ceph is present + file: + path: /etc/ceph + state: directory + owner: "{{ ceph_uid | int if containerized_deployment | bool else 'ceph' }}" + group: "{{ ceph_uid | int if containerized_deployment | bool else 'ceph' }}" + mode: "{{ ceph_directories_mode }}" + - name: write a ceph.conf with minimal config copy: dest: "/etc/ceph/{{ cluster }}.conf"