From: Sage Weil Date: Sat, 23 Nov 2019 15:02:28 +0000 (-0600) Subject: ceph-daemon: make infer_fsid behave when /var/lib/ceph dne X-Git-Tag: v15.1.0~784^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6e19593b6046f6732e6c5c191bc3dcdfb72a4bd7;p=ceph.git ceph-daemon: make infer_fsid behave when /var/lib/ceph dne Signed-off-by: Sage Weil --- diff --git a/src/ceph-daemon/ceph-daemon b/src/ceph-daemon/ceph-daemon index 9e4216f3b3d1..85bc175afe2c 100755 --- a/src/ceph-daemon/ceph-daemon +++ b/src/ceph-daemon/ceph-daemon @@ -219,10 +219,10 @@ def infer_fsid(func): return func() fsid_list = [] - for i in os.listdir(args.data_dir): - if is_fsid(i): - fsid_list.append(i) - + if os.path.exists(args.data_dir): + for i in os.listdir(args.data_dir): + if is_fsid(i): + fsid_list.append(i) logger.debug('Found fsids %s' % str(fsid_list)) if not fsid_list: