From 912aa8014d6eaef3056d1ebdf5be1fc6d4c630f2 Mon Sep 17 00:00:00 2001 From: Travis Rhoden Date: Thu, 16 Jul 2015 14:48:33 -0700 Subject: [PATCH] [RM-12374] Pass mon host list from ceph.conf to mon_create When using mon_create_initial(), we already have list of initial mon members from the config file. Pass it to mon_create() in args.mon so that mon_create() does not throw an exception when it finds that args.mon does not exist. This is actually an optimization as well. mon_create_initial() always looked up mon_initial_members from the config file, but didn't pass that to mon_create(). mon_create() would then see that args.mon was empty and then look up mon_initial_members *again*. Now we only need to open and read the file once. Fixes: #12374 Signed-off-by: Travis Rhoden --- ceph_deploy/mon.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ceph_deploy/mon.py b/ceph_deploy/mon.py index 93ede58..8de59da 100644 --- a/ceph_deploy/mon.py +++ b/ceph_deploy/mon.py @@ -395,6 +395,7 @@ def mon_create_initial(args): mon_initial_members = get_mon_initial_members(args, error_on_empty=True) # create them normally through mon_create + args.mon = mon_initial_members mon_create(args) # make the sets to be able to compare late -- 2.47.3