From 6ad8288c91dbd5836b7647747d2ffdb9fb7e0a64 Mon Sep 17 00:00:00 2001 From: WingkaiHo Date: Wed, 29 Mar 2017 11:11:04 +0800 Subject: [PATCH] enable ceph-mon.target service after monitor start MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ceph-create-keys unit file was removed here: * https://github.com/ceph/ceph/commit/8bcb4646b6b9846bb965cdec3ca2a21eb3b26bab * https://github.com/ceph/ceph/commit/dc5fe8d415858358bd0baf5d8dce0a753f5e0cea As a consequence the systemctl preset command now fails to run since the unit does not exist anymore. Due to the redirection in /dev/null we don't know what's happening. Ultimately the mon unit doesn't get enabled and the mon service won't start after reboot. Removing the old/non-existent unit makes the command succeed now. ceph fix: https://github.com/ceph/ceph/pull/14226 Signed-off-by: WingkaiHo Co-Authored-By: Sébastien Han --- roles/ceph-mon/tasks/start_monitor.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/ceph-mon/tasks/start_monitor.yml b/roles/ceph-mon/tasks/start_monitor.yml index 4106efe2f..27cbdf933 100644 --- a/roles/ceph-mon/tasks/start_monitor.yml +++ b/roles/ceph-mon/tasks/start_monitor.yml @@ -5,3 +5,12 @@ state: started enabled: yes changed_when: false + +# NOTE: This patch only affects Kraken. This fixes a bug when the monitor service +# does not start automatically after a reboot. Fix proposed upstream: ceph/ceph#14226 +- name: enable the ceph-mon.target service + systemd: + name: ceph-mon.target + enabled: yes + masked: no + changed_when: false -- 2.39.5