[pve-devel] [pve-manager] Fix shutdown order of ceph daemons.

Wolfgang Link w.link at proxmox.com
Fri Apr 21 12:38:09 CEST 2017


It is important that ceph stop after pveproxy.

If ceph stops to early and the shutdown is cluster wide the vm loses disks
and can not shutdown.

This can ends in fencing the node.
---
 bin/init.d/Makefile                          | 6 ++++++
 bin/init.d/ceph-shutdown-after-pveproxy.conf | 3 +++
 2 files changed, 9 insertions(+)
 create mode 100644 bin/init.d/ceph-shutdown-after-pveproxy.conf

diff --git a/bin/init.d/Makefile b/bin/init.d/Makefile
index 475f01d..e4d5c6e 100644
--- a/bin/init.d/Makefile
+++ b/bin/init.d/Makefile
@@ -35,6 +35,12 @@ install: ${SCRIPTS}
 	install -m 0644 ceph-after-pve-cluster.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
+	install -d ${SERVICEDIR}/ceph-mon.target.d
+	install -m 0644 ceph-shutdown-after-pveproxy.conf ${SERVICEDIR}/ceph-mon.target.d
+	install -d ${SERVICEDIR}/ceph-osd.target.d
+	install -m 0644 ceph-shutdown-after-pveproxy.conf ${SERVICEDIR}/ceph-osd.target.d
+	install -d ${SERVICEDIR}/ceph-mds.target.d
+	install -m 0644 ceph-shutdown-after-pveproxy.conf ${SERVICEDIR}/ceph-mds.target.d
 
 .PHONY: clean
 clean:
diff --git a/bin/init.d/ceph-shutdown-after-pveproxy.conf b/bin/init.d/ceph-shutdown-after-pveproxy.conf
new file mode 100644
index 0000000..92303ab
--- /dev/null
+++ b/bin/init.d/ceph-shutdown-after-pveproxy.conf
@@ -0,0 +1,3 @@
+[Unit]
+Requires=pveproxy.service
+Before=pveproxy.service
-- 
2.1.4





More information about the pve-devel mailing list