From: Owen Synge Date: Tue, 2 Sep 2014 15:19:24 +0000 (+0200) Subject: systemd support in ceph-disk activate X-Git-Tag: v0.89~28^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1b9e670e85f79761a0d56dff1862d747a16955dd;p=ceph.git systemd support in ceph-disk activate previous code just fails for systemd with an error Signed-off-by: Owen Synge --- 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,