]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: make rm-daemon reset-failed 31365/head
authorSage Weil <sage@redhat.com>
Thu, 31 Oct 2019 18:42:56 +0000 (13:42 -0500)
committerSage Weil <sage@redhat.com>
Mon, 4 Nov 2019 15:41:14 +0000 (09:41 -0600)
We did this with rm-cluster and forgot to update rm-daemon too.  Also,
switch to call instead of call_throws.

Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon

index 62f678e3ca3fa3acc2eb2339428bb6492186627d..0aa57bb7f1265bc404223e6f07c4a5cf22c15a69 100755 (executable)
@@ -1411,8 +1411,12 @@ def command_rm_daemon():
         raise RuntimeError('must pass --force to proceed: '
                            'this command may destroy precious data!')
     unit_name = get_unit_name(args.fsid, daemon_type, daemon_id)
-    call_throws(['systemctl', 'stop', unit_name])
-    call_throws(['systemctl', 'disable', unit_name])
+    call(['systemctl', 'stop', unit_name],
+         verbose_on_failure=False)
+    call(['systemctl', 'reset-failed', unit_name],
+         verbose_on_failure=False)
+    call(['systemctl', 'disable', unit_name],
+         verbose_on_failure=False)
     data_dir = get_data_dir(args.fsid, daemon_type, daemon_id)
     call_throws(['rm', '-rf', data_dir])