From 31c974e5de1ebc0bc968444d2eb4e23f5fe8bf27 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 23 Oct 2019 10:49:20 -0500 Subject: [PATCH] ceph-daemon: unconditionally enable and start crash unit Even if it exists, (re)try to enable and start it. Signed-off-by: Sage Weil --- src/ceph-daemon | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ceph-daemon b/src/ceph-daemon index 35afdc448ab5..c6b1ad183af1 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -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): -- 2.47.3