]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Support ceph cluster names with systemd
authorOwen Synge <osynge@suse.com>
Wed, 11 Feb 2015 17:18:05 +0000 (18:18 +0100)
committerThorsten Behrens <tbehrens@suse.com>
Wed, 11 Mar 2015 10:56:55 +0000 (11:56 +0100)
Systemd unit files could only ever support one cluster name due
to not supporting dynamically gathered variables. For this reason
we support multiple systemd units for different cluster names.

Signed-off-by: Owen Synge <osynge@suse.com>
(cherry picked from commit 28fb607cadb8cfa438ecd9d53accafef8a73089b)

src/ceph-disk

index 5c7959f376932849f1e250e53a6a31b226858b00..a1511ba89e825211e3883e7ca81e5667903d5694 100755 (executable)
@@ -1872,18 +1872,23 @@ def start_daemon(
                     ],
                 )
         elif os.path.exists(os.path.join(path, 'systemd')):
+            cname = ""
+            if cluster != "ceph":
+                cname = "%s-" % (cluster)
             command_check_call(
                 [
                     'systemctl',
                     'enable',
-                    'ceph-osd@{osd_id}'.format(osd_id=osd_id),
+                    'ceph-{cname}osd@{osd_id}'.format(osd_id=osd_id,
+                        cname=cname),
                     ],
                 )
             command_check_call(
                 [
                     'systemctl',
                     'start',
-                    'ceph-osd@{osd_id}'.format(osd_id=osd_id),
+                    'ceph-{cname}osd@{osd_id}'.format(osd_id=osd_id,
+                        cname=cname),
                     ],
                 )
         else: