]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: skip any invalid fsid(s) during infer 35578/head
authorMichael Fritch <mfritch@suse.com>
Mon, 15 Jun 2020 21:22:23 +0000 (15:22 -0600)
committerMichael Fritch <mfritch@suse.com>
Mon, 15 Jun 2020 21:22:23 +0000 (15:22 -0600)
Fixes: https://tracker.ceph.com/issues/45999
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index a195338d5bf5dcf92a21b338ad915510a55717a2..8c6aeb2c4c75e2d0b36622f245e1fac91cd673f5 100755 (executable)
@@ -1072,9 +1072,14 @@ def infer_fsid(func):
         fsids = set()
         daemon_list = list_daemons(detail=False)
         for daemon in daemon_list:
-            if 'name' not in args or not args.name:
+            if not is_fsid(daemon['fsid']):
+                # 'unknown' fsid
+                continue
+            elif 'name' not in args or not args.name:
+                # args.name not specified
                 fsids.add(daemon['fsid'])
             elif daemon['name'] == args.name:
+                # args.name is a match
                 fsids.add(daemon['fsid'])
         fsids = sorted(fsids)