]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: unconditionally enable and start crash unit
authorSage Weil <sage@redhat.com>
Wed, 23 Oct 2019 15:49:20 +0000 (10:49 -0500)
committerSage Weil <sage@redhat.com>
Wed, 23 Oct 2019 19:45:34 +0000 (14:45 -0500)
Even if it exists, (re)try to enable and start it.

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

index 35afdc448ab571ecb5e709bc52061e0e0e4d0c5e..c6b1ad183af1e9821e8b3df32fde6e708ff9b725 100755 (executable)
@@ -522,7 +522,6 @@ def deploy_crash(fsid, uid, gid, config, keyring):
         f.write(config)
 
     # ceph-crash unit
-    existed = os.path.exists(args.unit_dir + '/ceph-%s-crash.service' % fsid)
     mounts = {
         crash_dir: '/var/lib/ceph/crash:z',
         os.path.join(crash_dir, 'config'): '/etc/ceph/ceph.conf:z',
@@ -559,9 +558,8 @@ def deploy_crash(fsid, uid, gid, config, keyring):
         )
         os.rename(os.path.join(args.unit_dir, unit_name + '.new'),
                   os.path.join(args.unit_dir, unit_name))
-    if not existed:
-        subprocess.check_output(['systemctl', 'enable', unit_name])
-        subprocess.check_output(['systemctl', 'start', unit_name])
+    subprocess.check_output(['systemctl', 'enable', unit_name])
+    subprocess.check_output(['systemctl', 'start', unit_name])
 
 
 def get_unit_file(fsid):