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)
],
)
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: