From: Tim Serong Date: Thu, 16 Apr 2020 05:09:10 +0000 (+1000) Subject: cephadm: don't throw when disabling ceph-volume simple unit X-Git-Tag: v15.2.2~59^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6a51b63eb4c4a9599877b2cffd3cb518af7d41c4;p=ceph.git 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) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index f305f47081f..678059a444f 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.