File 0033-use-same-systemd-service-files-for-.patch of Package ceph.627

From: Owen Synge <osynge@suse.com>
Date: Tue, 5 May 2015 16:56:53 +0200
Subject: [PATCH] use same systemd service files for all cluster names.

This removes the ability for multiple ceph clusters on the same hardware
but keeps the suport serface smaller without autogenerating systemd servixce
files.

See discussion here:

https://github.com/ceph/ceph/pull/4062

fix for bnc#915567

Signed-off-by: Owen Synge <osynge@suse.com>
---
 src/ceph-disk             | 6 ++----
 systemd/ceph-mds@.service | 1 -
 systemd/ceph-mon@.service | 1 -
 systemd/ceph-osd@.service | 1 -
 systemd/ceph.env          | 1 +
 5 files changed, 3 insertions(+), 7 deletions(-)
 create mode 100644 systemd/ceph.env

diff --git a/src/ceph-disk b/src/ceph-disk
index a1511ba..7e78b33 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -1879,16 +1879,14 @@ def start_daemon(
                 [
                     'systemctl',
                     'enable',
-                    'ceph-{cname}osd@{osd_id}'.format(osd_id=osd_id,
-                        cname=cname),
+                    'ceph-osd@{osd_id}'.format(osd_id=osd_id),
                     ],
                 )
             command_check_call(
                 [
                     'systemctl',
                     'start',
-                    'ceph-{cname}osd@{osd_id}'.format(osd_id=osd_id,
-                        cname=cname),
+                    'ceph-osd@{osd_id}'.format(osd_id=osd_id),
                     ],
                 )
         else:
diff --git a/systemd/ceph-mds@.service b/systemd/ceph-mds@.service
index 22a787d..536d14b 100644
--- a/systemd/ceph-mds@.service
+++ b/systemd/ceph-mds@.service
@@ -6,7 +6,6 @@ PartOf=ceph.target
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/ceph
-Environment=CLUSTER=ceph
 ExecStart=/usr/bin/ceph-mds -f --cluster ${CLUSTER} --id %i
 
 [Install]
diff --git a/systemd/ceph-mon@.service b/systemd/ceph-mon@.service
index 437ef4d..19436c2 100644
--- a/systemd/ceph-mon@.service
+++ b/systemd/ceph-mon@.service
@@ -11,7 +11,6 @@ PartOf=ceph.target
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/ceph
-Environment=CLUSTER=ceph
 ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %i
 
 [Install]
diff --git a/systemd/ceph-osd@.service b/systemd/ceph-osd@.service
index 09f51c5..9aa5b38 100644
--- a/systemd/ceph-osd@.service
+++ b/systemd/ceph-osd@.service
@@ -6,7 +6,6 @@ PartOf=ceph.target
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/ceph
-Environment=CLUSTER=ceph
 ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i
 ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i
 LimitNOFILE=131072
diff --git a/systemd/ceph.env b/systemd/ceph.env
new file mode 100644
index 0000000..da1c6df
--- /dev/null
+++ b/systemd/ceph.env
@@ -0,0 +1 @@
+CLUSTER=fred
openSUSE Build Service is sponsored by