]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: stop + reset-failed existing unit on daemon deploy
authorSage Weil <sage@redhat.com>
Thu, 31 Oct 2019 15:22:35 +0000 (10:22 -0500)
committerSage Weil <sage@redhat.com>
Mon, 4 Nov 2019 14:03:48 +0000 (08:03 -0600)
Normally it won't exist, but it will on a re-deploy.

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

index e6aebed80c8b2da3cffb5fad3677001f7c3bb934..b37f0d212b615b017187db8e4234ba4eaa624872 100755 (executable)
@@ -503,6 +503,10 @@ def deploy_daemon_units(fsid, uid, gid, daemon_type, daemon_id, c,
     call_throws(['systemctl', 'daemon-reload'])
 
     unit_name = get_unit_name(fsid, daemon_type, daemon_id)
+    call(['systemctl', 'stop', unit_name],
+         verbose_on_failure=False)
+    call(['systemctl', 'reset-failed', unit_name],
+         verbose_on_failure=False)
     if enable:
         call_throws(['systemctl', 'enable', unit_name])
     if start: