From 8ccae777f04a5d7c6d00ddd0a8cd13ad4e4233d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 10 Oct 2017 11:54:54 +0200 Subject: [PATCH] ceph: disable OSD unit in destroyosd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit while OSDs units should only be runtime enable and disappear on reboots, this serves as an additional safeguard to ensure no leftover units can exist. Signed-off-by: Fabian Grünbichler --- PVE/API2/Ceph.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm index f89b7bfe..e523ecac 100644 --- a/PVE/API2/Ceph.pm +++ b/PVE/API2/Ceph.pm @@ -379,7 +379,10 @@ __PACKAGE__->register_method ({ print "destroy OSD $osdsection\n"; - eval { PVE::CephTools::ceph_service_cmd('stop', $osdsection); }; + eval { + PVE::CephTools::ceph_service_cmd('stop', $osdsection); + PVE::CephTools::ceph_service_cmd('disable', $osdsection); + }; warn $@ if $@; print "Remove $osdsection from the CRUSH map\n";