From 6a51b63eb4c4a9599877b2cffd3cb518af7d41c4 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Thu, 16 Apr 2020 15:09:10 +1000 Subject: [PATCH] cephadm: don't throw when disabling ceph-volume simple unit When adopting OSDs, if a ceph-volume simple service is already disabled (or otherwise missing) the previous implementation would raise an error, thus killing the adopt. Signed-off-by: Tim Serong (cherry picked from commit 6834ad983762b7cbf950c6a6e71aa44ec6657c32) --- src/cephadm/cephadm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index f305f47081f15..678059a444f7d 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -3251,9 +3251,8 @@ def command_adopt_ceph(daemon_type, daemon_id, fsid): logger.info('Renaming %s -> %s', simple_fn, new_fn) os.rename(simple_fn, new_fn) logger.info('Disabling host unit ceph-volume@ simple unit...') - call_throws(['systemctl', 'disable', - 'ceph-volume@simple-%s-%s.service' % ( - daemon_id, osd_fsid)]) + call(['systemctl', 'disable', + 'ceph-volume@simple-%s-%s.service' % (daemon_id, osd_fsid)]) else: # assume this is an 'lvm' c-v for now, but don't error # out if it's not. -- 2.39.5