From 0ea4b78d696b1fdf18b30e7fb4e9e5d7ac899f1d Mon Sep 17 00:00:00 2001 From: taodd Date: Tue, 24 Sep 2019 18:19:38 +0800 Subject: [PATCH] Sync charms.ceph to get fix Change-Id: Ib3d4b79690eb5931b4f0680b937590b317a91427 Closes-Bug: #1841021 (cherry picked from commit 777256051058c5201e8d9035aabcd8d85ce12a79) Signed-off-by: taodd --- lib/ceph/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ceph/utils.py b/lib/ceph/utils.py index 972f1ad3..31447037 100644 --- a/lib/ceph/utils.py +++ b/lib/ceph/utils.py @@ -1912,9 +1912,10 @@ def osdize_dir(path, encrypt=False, bluestore=False): ' skipping'.format(path)) return - if os.path.exists(os.path.join(path, 'upstart')): - log('Path {} is already configured as an OSD - bailing'.format(path)) - return + for t in ['upstart', 'systemd']: + if os.path.exists(os.path.join(path, t)): + log('Path {} is already used as an OSD dir - bailing'.format(path)) + return if cmp_pkgrevno('ceph', "0.56.6") < 0: log('Unable to use directories for OSDs with ceph < 0.56.6',