]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
systemd: new ceph-rbd-mirror scripts
authorJason Dillaman <dillaman@redhat.com>
Fri, 18 Mar 2016 18:54:35 +0000 (14:54 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 18 Mar 2016 21:51:23 +0000 (17:51 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
systemd/Makefile.am
systemd/ceph-rbd-mirror.target [new file with mode: 0644]
systemd/ceph-rbd-mirror@.service [new file with mode: 0644]

index 6d93c3cdea9459fe176a87e382984f8952a979af..a6aecc9a26ad4f2881c6347bfed0979083ccaac3 100644 (file)
@@ -4,11 +4,13 @@ unitfiles = \
         ceph-mon.target \
         ceph-mds.target \
         ceph-radosgw.target \
+       ceph-rbd-mirror.target \
        ceph-mds@.service \
        ceph-mon@.service \
        ceph-create-keys@.service \
        ceph-osd@.service \
        ceph-radosgw@.service \
+       ceph-rbd-mirror@.service \
        ceph-disk@.service \
        rbdmap.service
 
diff --git a/systemd/ceph-rbd-mirror.target b/systemd/ceph-rbd-mirror.target
new file mode 100644 (file)
index 0000000..7bd94e0
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=ceph target allowing to start/stop all ceph-rbd-mirror@.service instances at once
+PartOf=ceph.target
+[Install]
+WantedBy=multi-user.target ceph.target
diff --git a/systemd/ceph-rbd-mirror@.service b/systemd/ceph-rbd-mirror@.service
new file mode 100644 (file)
index 0000000..4c2e2f0
--- /dev/null
@@ -0,0 +1,22 @@
+[Unit]
+Description=Ceph rbd mirror daemon
+After=network-online.target local-fs.target
+Wants=network-online.target local-fs.target
+
+[Service]
+LimitNOFILE=1048576
+LimitNPROC=1048576
+EnvironmentFile=-/etc/sysconfig/ceph
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/rbd-mirror -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
+ExecReload=/bin/kill -HUP $MAINPID
+PrivateDevices=yes
+ProtectHome=true
+ProtectSystem=full
+PrivateTmp=true
+Restart=on-failure
+StartLimitInterval=30min
+StartLimitBurst=3
+
+[Install]
+WantedBy=ceph-rbd-mirror.target