]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: sort the list of inferred fsids
authorMichael Fritch <mfritch@suse.com>
Mon, 15 Jun 2020 21:22:08 +0000 (15:22 -0600)
committerMichael Fritch <mfritch@suse.com>
Mon, 15 Jun 2020 21:22:08 +0000 (15:22 -0600)
$ cephadm shell
ERROR: Cannot infer an fsid, one must be specified: ['1d5df33f-eb94-4a4f-b192-1d5e770ed0e7', 'unknown']
$ cephadm shell
ERROR: Cannot infer an fsid, one must be specified: ['unknown', '1d5df33f-eb94-4a4f-b192-1d5e770ed0e7']

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index 7c0cb328ee270687a5e4fa68d95308cda8c70b7d..a195338d5bf5dcf92a21b338ad915510a55717a2 100755 (executable)
@@ -1076,7 +1076,7 @@ def infer_fsid(func):
                 fsids.add(daemon['fsid'])
             elif daemon['name'] == args.name:
                 fsids.add(daemon['fsid'])
-        fsids = list(fsids)
+        fsids = sorted(fsids)
 
         if not fsids:
             # some commands do not always require an fsid