From 1b9e670e85f79761a0d56dff1862d747a16955dd Mon Sep 17 00:00:00 2001 From: Owen Synge Date: Tue, 2 Sep 2014 17:19:24 +0200 Subject: [PATCH] systemd support in ceph-disk activate previous code just fails for systemd with an error Signed-off-by: Owen Synge --- src/ceph-disk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ceph-disk b/src/ceph-disk index c5bb56cb1560..ad3cdda9f32b 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -1706,6 +1706,21 @@ def start_daemon( 'osd.{osd_id}'.format(osd_id=osd_id), ], ) + elif os.path.exists(os.path.join(path, 'systemd')): + command_check_call( + [ + 'systemctl', + 'enable', + 'ceph-osd@{osd_id}'.format(osd_id=osd_id), + ], + ) + command_check_call( + [ + 'systemctl', + 'start', + 'ceph-osd@{osd_id}'.format(osd_id=osd_id), + ], + ) else: raise Error('{cluster} osd.{osd_id} is not tagged with an init system'.format( cluster=cluster, -- 2.47.3