]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
add systemd replacement for ceph init script
authorWolfgang Link <w.link@proxmox.com>
Wed, 21 Dec 2016 14:56:12 +0000 (15:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 22 Dec 2016 10:42:32 +0000 (11:42 +0100)
the old sys V init script does a lot of stuff, most of which
is already replaced with the system units since jewel,
except for the OSD activation which is still done by either
udev or the old init script.

include systemd service as drop in replacement for the init
script when using jewel. the service is not enabled by
default (as this would break hammer), but needs to be copied
to /etc/systemd/system on upgrade to (manual) or install of
jewel (automatic).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
bin/init.d/Makefile
bin/init.d/ceph.service [new file with mode: 0644]
bin/init.d/pve.conf [new file with mode: 0644]

index 76498b7bd32adc0788b0605296a521b707af3b26..aaa147a78b8968442e911e70aa86e96dfab467b0 100644 (file)
@@ -17,7 +17,7 @@ SERVICES=                     \
        pve-manager.service     \
        pvedaemon.service       \
        pveproxy.service        \
-       spiceproxy.service 
+       spiceproxy.service
 
 .PHONY: install 
 install: ${SCRIPTS}
@@ -25,6 +25,16 @@ install: ${SCRIPTS}
        install -m 0755 ${SCRIPTS} ${INITDBINDIR}
        install -d ${SERVICEDIR}
        install -m 0644 ${SERVICES} ${SERVICEDIR}
+       install -d ${SERVICEDIR}/ceph-mon@.service.d
+       install -m 0644 pve.conf ${SERVICEDIR}/ceph-mon@.service.d
+       install -d ${SERVICEDIR}/ceph-osd@.service.d
+       install -m 0644 pve.conf ${SERVICEDIR}/ceph-osd@.service.d
+       install -d ${SERVICEDIR}/ceph-disk@.service.d
+       install -m 0644 pve.conf ${SERVICEDIR}/ceph-disk@.service.d
+       install -d ${SERVICEDIR}/ceph-mds@.service.d
+       install -m 0644 pve.conf ${SERVICEDIR}/ceph-mds@.service.d
+       install -d ${DESTDIR}/usr/share/doc/{$PACKAGE}/examples/
+       install -m 0644 ceph.service ${DESTDIR}/usr/share/doc/${PACKAGE}/examples/ceph.service
 
 .PHONY: clean
 clean:
diff --git a/bin/init.d/ceph.service b/bin/init.d/ceph.service
new file mode 100644 (file)
index 0000000..623becd
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=PVE activate Ceph OSD disks
+After=pve-cluster.service
+Requires=pve-cluster.service
+
+[Service]
+ExecStart=/usr/sbin/ceph-disk --log-stdout activate-all
+Type=oneshot
+
+[Install]
+WantedBy=ceph.target
diff --git a/bin/init.d/pve.conf b/bin/init.d/pve.conf
new file mode 100644 (file)
index 0000000..f54bb1d
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+After=pve-cluster.service