]> git.proxmox.com Git - pve-manager.git/commitdiff
fix ceph.service for Ceph Jewel >= 10.2.6
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 9 Mar 2017 09:34:57 +0000 (10:34 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 13 Mar 2017 13:20:14 +0000 (14:20 +0100)
having our ceph.service pulled in by ceph.target does not
work anymore, because "systemctl start ceph.target" hangs
forever on ceph-common upgrades. multi-user.target seems to
work as well, and we are ordered after pve-cluster anyway.

only replace the old ceph.service if it is an exact match.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
bin/init.d/ceph.service
debian/postinst

index 623becd95ec8bec3735d29708bcaf9dcaf17591d..450856e67990b170aee899712f5d5dd1a3c915e3 100644 (file)
@@ -8,4 +8,4 @@ ExecStart=/usr/sbin/ceph-disk --log-stdout activate-all
 Type=oneshot
 
 [Install]
-WantedBy=ceph.target
+WantedBy=multi-user.target
index 13fda4c10a5af2c82b8a6b3d057a13ae8b5cce2d..6aac8f85a3346d29e18d821d0a0b005a624be89a 100755 (executable)
@@ -79,6 +79,17 @@ EOF
     # disable fancy init messages (bad with bootlogd)
     test -f /etc/lsb-base-logging.sh || echo "FANCYTTY=0" >/etc/lsb-base-logging.sh
 
+    if [ -f /etc/systemd/system/ceph.service ]; then
+       md5=$(md5sum /etc/systemd/system/ceph.service)
+       if [[ "$md5" == "21b2e7a7c4ffcf92ad0ec2c905e88e5b  /etc/systemd/system/ceph.service" ]]; then
+           echo "Updating PVE ceph.service to correct install target.."
+           cp /usr/share/doc/pve-manager/examples/ceph.service /etc/systemd/system/ceph.service
+           systemctl --system daemon-reload >/dev/null || true
+           systemctl --system disable ceph.service
+           systemctl --system enable ceph.service
+           echo " done"
+       fi
+    fi
 
     systemctl --system daemon-reload >/dev/null || true