]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: don't throw when disabling ceph-volume simple unit
authorTim Serong <tserong@suse.com>
Thu, 16 Apr 2020 05:09:10 +0000 (15:09 +1000)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 22 Apr 2020 13:06:38 +0000 (15:06 +0200)
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 <tserong@suse.com>
(cherry picked from commit 6834ad983762b7cbf950c6a6e71aa44ec6657c32)

src/cephadm/cephadm

index f305f47081f15669f45a69ae9753802cf7a81151..678059a444f7d6f75c79d26148307c37f692ba3c 100755 (executable)
@@ -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.