]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd: add ceph-mgr service and target files
authorTim Serong <tserong@suse.com>
Wed, 7 Sep 2016 05:39:58 +0000 (15:39 +1000)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:27:08 +0000 (17:27 +0100)
Signed-off-by: Tim Serong <tserong@suse.com>
systemd/50-ceph.preset
systemd/CMakeLists.txt
systemd/ceph-mgr.target [new file with mode: 0644]
systemd/ceph-mgr@.service [new file with mode: 0644]

index 5b8cfa48b0d60ac7fd8b6d8246fb1a27cbaac712..34c0801f9f2ba6bbf7803c93579201f913ee9bca 100644 (file)
@@ -1,5 +1,6 @@
 enable ceph.target
 enable ceph-mds.target
+enable ceph-mgr.target
 enable ceph-mon.target
 enable ceph-osd.target
 enable ceph-radosgw.target
index 31767d6d019d5678174abbaae73e7014eb9115cb..8178a70a462b6ec28b03c10f7105b9d44adb936d 100644 (file)
@@ -1,11 +1,13 @@
 install(FILES
   ceph.target
   ceph-osd.target
+  ceph-mgr.target
   ceph-mon.target
   ceph-mds.target
   ceph-radosgw.target
   ceph-rbd-mirror.target
   ceph-mds@.service
+  ceph-mgr@.service
   ceph-mon@.service
   ceph-create-keys@.service
   ceph-osd@.service
diff --git a/systemd/ceph-mgr.target b/systemd/ceph-mgr.target
new file mode 100644 (file)
index 0000000..72be8e8
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=ceph target allowing to start/stop all ceph-mgr@.service instances at once
+PartOf=ceph.target
+[Install]
+WantedBy=multi-user.target ceph.target
diff --git a/systemd/ceph-mgr@.service b/systemd/ceph-mgr@.service
new file mode 100644 (file)
index 0000000..669f47d
--- /dev/null
@@ -0,0 +1,19 @@
+[Unit]
+Description=Ceph cluster manager daemon
+After=network-online.target local-fs.target time-sync.target
+Wants=network-online.target local-fs.target time-sync.target
+PartOf=ceph-mgr.target
+
+[Service]
+LimitNOFILE=1048576
+LimitNPROC=1048576
+EnvironmentFile=-/etc/sysconfig/ceph
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-mgr -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+StartLimitInterval=30min
+StartLimitBurst=3
+
+[Install]
+WantedBy=ceph-mgr.target