]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd support in ceph-disk activate 2380/head
authorOwen Synge <osynge@suse.com>
Tue, 2 Sep 2014 15:19:24 +0000 (17:19 +0200)
committerOwen Synge <osynge@suse.com>
Tue, 2 Sep 2014 15:19:24 +0000 (17:19 +0200)
previous code just fails for systemd with an error

Signed-off-by: Owen Synge <osynge@suse.com>
src/ceph-disk

index c5bb56cb1560aae1252464c380843019419eb226..ad3cdda9f32b4af7b4ce4918808c65a365b30e0c 100755 (executable)
@@ -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,