[pve-devel] [PATCH v4 manager 1/5] add systemd replacement for ceph init script
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Dec 21 15:56:12 CET 2016
From: Wolfgang Link <w.link at proxmox.com>
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 at proxmox.com>
---
bin/init.d/Makefile | 12 +++++++++++-
bin/init.d/ceph.service | 12 ++++++++++++
bin/init.d/pve.conf | 2 ++
3 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 bin/init.d/ceph.service
create mode 100644 bin/init.d/pve.conf
diff --git a/bin/init.d/Makefile b/bin/init.d/Makefile
index 76498b7..aaa147a 100644
--- a/bin/init.d/Makefile
+++ b/bin/init.d/Makefile
@@ -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 at .service.d
+ install -m 0644 pve.conf ${SERVICEDIR}/ceph-mon at .service.d
+ install -d ${SERVICEDIR}/ceph-osd at .service.d
+ install -m 0644 pve.conf ${SERVICEDIR}/ceph-osd at .service.d
+ install -d ${SERVICEDIR}/ceph-disk at .service.d
+ install -m 0644 pve.conf ${SERVICEDIR}/ceph-disk at .service.d
+ install -d ${SERVICEDIR}/ceph-mds at .service.d
+ install -m 0644 pve.conf ${SERVICEDIR}/ceph-mds at .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
index 0000000..a080c46
--- /dev/null
+++ b/bin/init.d/ceph.service
@@ -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
index 0000000..f54bb1d
--- /dev/null
+++ b/bin/init.d/pve.conf
@@ -0,0 +1,2 @@
+[Unit]
+After=pve-cluster.service
--
2.1.4
More information about the pve-devel
mailing list