[pve-devel] [PATCH RFC manager 1/1] ceph: remove obsolete ceph.service and do not distribute it anymore

Dominik Csapak d.csapak at proxmox.com
Thu Jun 27 14:51:36 CEST 2019


in nautilus there is no ceph-disk anymore and osd activation
does not use udev anymore so this service is not needed anymore

remove it and do not copy it when installing a new ceph cluster

in pve-storage.target we replace ceph.service with ceph.target

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/CLI/pveceph.pm          | 14 --------------
 services/Makefile           |  1 -
 services/ceph.service       | 11 -----------
 services/pve-storage.target |  2 +-
 4 files changed, 1 insertion(+), 27 deletions(-)
 delete mode 100644 services/ceph.service

diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index 4e291e8f..ae1b2573 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -131,20 +131,6 @@ __PACKAGE__->register_method ({
 
 	print "\ninstalled ceph $cephver successfully\n";
 
-	if (! -e '/etc/systemd/system/ceph.service') {
-	    print "\nreplacing ceph init script with own ceph.service\n";
-	    eval {
-		run_command('cp -v /usr/share/doc/pve-manager/examples/ceph.service /etc/systemd/system/ceph.service');
-		run_command('systemctl daemon-reload');
-		run_command('systemctl enable ceph.service');
-	    };
-	    if (my $err = $@) {
-		warn "WARNING: could not install ceph.service: $@\n";
-	    } else {
-		print "installed ceph.service successfully\n";
-	    }
-	}
-
 	return undef;
     }});
 
diff --git a/services/Makefile b/services/Makefile
index a68126e8..a3d04a2f 100644
--- a/services/Makefile
+++ b/services/Makefile
@@ -31,7 +31,6 @@ install: ${SERVICES}
 	install -d ${SERVICEDIR}/ceph-mds at .service.d
 	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
 
 .PHONY: clean
 clean:
diff --git a/services/ceph.service b/services/ceph.service
deleted file mode 100644
index 450856e6..00000000
--- a/services/ceph.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[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=multi-user.target
diff --git a/services/pve-storage.target b/services/pve-storage.target
index 4bf0831c..7e2f2fd0 100644
--- a/services/pve-storage.target
+++ b/services/pve-storage.target
@@ -2,7 +2,7 @@
 Description=PVE Storage Target
 Wants=remote-fs.target
 After=remote-fs.target
-After=ceph.service
+After=ceph.target
 After=ceph-mon.target
 After=ceph-osd.target
 After=ceph-mds.target
-- 
2.20.1





More information about the pve-devel mailing list